Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=_-w,O=Math.floor,L=String.fromCharCode;y={version:"1.3.2",ucs2:{decode:l,encode:u},decode:f,encode:p,toASCII:m,toUnicode:g},void 0!==(r=function(){return y}.call(exports,t,exports,e))&&(e.exports=r)}()}).call(exports,t(37)(e),t(21))},function(e,exports,t){var n,r;/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.18.12
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/
!function(i,o){"use strict";"object"==typeof e&&e.exports?e.exports=o():(n=o,void 0!==(r="function"==typeof n?n.call(exports,t,exports,e):n)&&(e.exports=r))}(0,function(e){"use strict";function t(e){var t=e.toLowerCase(),n=t.split(":"),r=n.length,i=8;""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[r-1]&&""===n[r-2]&&n.pop(),r=n.length,-1!==n[r-1].indexOf(".")&&(i=7);var o;for(o=0;o1);l++)s.splice(0,1);n[a]=s.join("")}var u=-1,c=0,d=0,h=-1,f=!1;for(a=0;ac&&(u=h,c=d)):"0"===n[a]&&(f=!0,h=a,d=1);d>c&&(u=h,c=d),c>1&&n.splice(u,c,""),r=n.length;var p="";for(""===n[0]&&(p=":"),a=0;a=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return!1;var i=n.list[e.slice(t+1)];return!!i&&i.indexOf(" "+e.slice(r+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var r=n.list[e.slice(t+1)];return!!r&&r.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return null;var i=n.list[e.slice(t+1)];return i?i.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({list:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";var n=Object.prototype.hasOwnProperty,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),i=function(e){for(var t;e.length;){var n=e.pop();if(t=n.obj[n.prop],Array.isArray(t)){for(var r=[],i=0;i=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?n+=t.charAt(i):o<128?n+=r[o]:o<2048?n+=r[192|o>>6]+r[128|63&o]:o<55296||o>=57344?n+=r[224|o>>12]+r[128|o>>6&63]+r[128|63&o]:(i+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(i)),n+=r[240|o>>18]+r[128|o>>12&63]+r[128|o>>6&63]+r[128|63&o])}return n},exports.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r0&&(h=h.filter(function(t){return t!==e}),0===h.length&&d())}var u=e(t),d=void 0,h=[];return o({},u,{listenBeforeUnload:i,registerBeforeUnloadHook:c.default(s,"registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead"),unregisterBeforeUnloadHook:c.default(l,"unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead")})}}exports.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===t.iframeFix?"iframe":t.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=$(this);return $("
").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=$.ui.safeActiveElement(this.document[0]);$(e.target).closest(t).length||$.ui.safeBlur(t)},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),$.ui.ddmanager&&($.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===$(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),$.ui.ddmanager&&!t.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),$.ui.ddmanager&&$.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(e,t){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!t){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new $.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",$.ui.ddmanager&&$.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var t=this,n=!1;return $.ui.ddmanager&&!this.options.dropBehaviour&&(n=$.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||$.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==t._trigger("stop",e)&&t._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),$.ui.ddmanager&&$.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),$.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new $.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!$(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var t=this.options,n=$.isFunction(t.helper),r=n?$(t.helper.apply(this.element[0],[e])):"clone"===t.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===t.appendTo?this.element[0].parentNode:t.appendTo),n&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),$.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==t&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,r=this.options,i=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(this.containment=[$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$(window).scrollLeft()+$(window).width()-this.helperProportions.width-this.margins.left,$(window).scrollTop()+($(window).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,$(i).width()-this.helperProportions.width-this.margins.left,($(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),t=$(r.containment),void((n=t[0])&&(e=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t))):void(this.containment=null)},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,r,i,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,u=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(r=this.relativeContainer.offset(),n=[this.containment[0]+r.left,this.containment[1]+r.top,this.containment[2]+r.left,this.containment[3]+r.top]):n=this.containment,e.pageX-this.offset.click.leftn[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),s.grid&&(i=s.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,u=n?i-this.offset.click.top>=n[1]||i-this.offset.click.top>n[3]?i:i-this.offset.click.top>=n[1]?i-s.grid[1]:i+s.grid[1]:i,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,t,n){return n=n||this._uiHash(),$.ui.plugin.call(this,e,[t,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),$.Widget.prototype._trigger.call(this,e,t,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),$.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,n){var r=$.extend({},t,{item:n.element});n.sortables=[],$(n.options.connectToSortable).each(function(){var t=$(this).sortable("instance");t&&!t.options.disabled&&(n.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,r))})},stop:function(e,t,n){var r=$.extend({},t,{item:n.element});n.cancelHelperRemoval=!1,$.each(n.sortables,function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,r))})},drag:function(e,t,n){$.each(n.sortables,function(){var r=!1,i=this;i.positionAbs=n.positionAbs,i.helperProportions=n.helperProportions,i.offset.click=n.offset.click,i._intersectsWith(i.containerCache)&&(r=!0,$.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==i&&this._intersectsWith(this.containerCache)&&$.contains(i.element[0],this.element[0])&&(r=!1),r})),r?(i.isOver||(i.isOver=1,n._parent=t.helper.parent(),i.currentItem=t.helper.appendTo(i.element).data("ui-sortable-item",!0),i.options._helper=i.options.helper,i.options.helper=function(){return t.helper[0]},e.target=i.currentItem[0],i._mouseCapture(e,!0),i._mouseStart(e,!0,!0),i.offset.click.top=n.offset.click.top,i.offset.click.left=n.offset.click.left,i.offset.parent.left-=n.offset.parent.left-i.offset.parent.left,i.offset.parent.top-=n.offset.parent.top-i.offset.parent.top,n._trigger("toSortable",e),n.dropped=i.element,$.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,i.fromOutside=n),i.currentItem&&(i._mouseDrag(e),t.position=i.position)):i.isOver&&(i.isOver=0,i.cancelHelperRemoval=!0,i.options._revert=i.options.revert,i.options.revert=!1,i._trigger("out",e,i._uiHash(i)),i._mouseStop(e,!0),i.options.revert=i.options._revert,i.options.helper=i.options._helper,i.placeholder&&i.placeholder.remove(),t.helper.appendTo(n._parent),n._refreshOffsets(e),t.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,$.each(n.sortables,function(){this.refreshPositions()}))})}}),$.ui.plugin.add("draggable","cursor",{start:function(e,t,n){var r=$("body"),i=n.options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(e,t,n){var r=n.options;r._cursor&&$("body").css("cursor",r._cursor)}}),$.ui.plugin.add("draggable","opacity",{start:function(e,t,n){var r=$(t.helper),i=n.options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(e,t,n){var r=n.options;r._opacity&&$(t.helper).css("opacity",r._opacity)}}),$.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,t,n){var r=n.options,i=!1,o=n.scrollParentNotHidden[0],s=n.document[0];o!==s&&"HTML"!==o.tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+o.offsetHeight-e.pageY=0;d--)a=n.snapElements[d].left-n.margins.left,l=a+n.snapElements[d].width,u=n.snapElements[d].top-n.margins.top,c=u+n.snapElements[d].height,ml+p||yc+p||!$.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,$.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(r=Math.abs(u-y)<=p,i=Math.abs(c-v)<=p,o=Math.abs(a-m)<=p,s=Math.abs(l-g)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:a-n.helperProportions.width}).left),s&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l}).left)),h=r||i||o||s,"outer"!==f.snapMode&&(r=Math.abs(u-v)<=p,i=Math.abs(c-y)<=p,o=Math.abs(a-g)<=p,s=Math.abs(l-m)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:a}).left),s&&(t.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(r||i||o||s||h)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,$.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=r||i||o||s||h)}}),$.ui.plugin.add("draggable","stack",{start:function(e,t,n){var r,i=n.options,o=$.makeArray($(i.stack)).sort(function(e,t){return(parseInt($(e).css("zIndex"),10)||0)-(parseInt($(t).css("zIndex"),10)||0)});o.length&&(r=parseInt($(o[0]).css("zIndex"),10)||0,$(o).each(function(e){$(this).css("zIndex",r+e)}),this.css("zIndex",r+o.length))}}),$.ui.plugin.add("draggable","zIndex",{start:function(e,t,n){var r=$(t.helper),i=n.options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(e,t,n){var r=n.options;r._zIndex&&$(t.helper).css("zIndex",r._zIndex)}}),$.ui.draggable})},function(e,exports,t){var n,r,i;/*!
* jQuery UI Mouse 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
!function(o){r=[t(12),t(311),t(25),t(89)],n=o,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}(function($){var e=!1;return $(document).on("mouseup",function(){e=!1}),$.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===$.data(t.target,e.widgetName+".preventClickEvent"))return $.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,r=1===t.which,i=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&$(t.target).closest(this.options.cancel).length;return!(r&&!i&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===$.data(t.target,this.widgetName+".preventClickEvent")&&$.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),e=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if($.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&$.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,e=!1,t.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(65),i=n(r),o=t(23),s=n(o),a=t(66),l=n(a);i.default.namespace("Rickshaw.Fixtures.Graylog2Time");var u=function(){var e=this;this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.units=[{name:"decade",seconds:315576e3,formatter:function(t){return e.formatDate(t)}},{name:"year",seconds:31557600,formatter:function(t){return e.formatDate(t)}},{name:"month",seconds:2635200,formatter:function(t){return e.formatDate(t)}},{name:"week",seconds:604800,formatter:function(t){return e.formatDate(t)}},{name:"day",seconds:86400,formatter:function(t){return e.formatDate(t)}},{name:"3 hours",seconds:10800,formatter:function(t){return e.formatDateTime(t)}},{name:"hour",seconds:3600,formatter:function(t){return e.formatDateTime(t)}},{name:"15 minutes",seconds:900,formatter:function(t){return e.formatDateTime(t)}},{name:"5 minutes",seconds:300,formatter:function(t){return e.formatDateTime(t)}},{name:"minute",seconds:60,formatter:function(t){return e.formatDateTime(t)}},{name:"15 second",seconds:15,formatter:function(t){return e.formatDateTime(t)}},{name:"second",seconds:1,formatter:function(t){return e.formatDateTime(t)}},{name:"millisecond",seconds:.001,formatter:function(t){return e.formatDateTime(t)}}],this.unit=function(e){return this.units.filter(function(t){return e==t.name}).shift()},this.formatDateTime=l.default.customDateTimeFormat(),this.formatDate=l.default.customDateTimeFormat(0),this.ceil=function(e,t){var n=void 0,r=void 0;if("week"==t.name){var i=s.default.utc(1e3*e);return i.startOf("isoWeek"),i.unix()==e?e:(i.add(1,"week"),i.unix())}if("month"==t.name){if(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),n.getUTCMonth())/1e3==e)return e;r=n.getUTCFullYear();var o=n.getUTCMonth();return 11==o?(o=0,r+=1):o+=1,Date.UTC(r,o)/1e3}return"year"==t.name?(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),0)/1e3==e?e:(r=n.getUTCFullYear()+1,Date.UTC(r,0)/1e3)):Math.ceil(e/t.seconds)*t.seconds}};i.default.Fixtures.Graylog2Time=u,exports.default=u,e.exports=exports.default},function(t,exports,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var i=n(12),o=r(i);n(318);var s=n(65),a=r(s),l=n(30),u=r(l),c=n(20),d=r(c),h=n(7),f=r(h),p=f.default.getStore("Search");a.default.namespace("Rickshaw.Graph.Graylog2Selector");var g=a.default.Class.create({initialize:function(e){var t=this,n=e.graph;this.graph=e.graph,this.build(),n.onUpdate(function(){t.update()})},build:function(){var t=this.graph,n=t.element.getElementsByTagName("svg")[0],r=!1,i=this.position={},s=document.createElement("div");s.setAttribute("class","graph-range-selector"),t.element.appendChild(s),n.oncontextmenu=function(){e.preventDefault()};var a=function(){s.style.transition="opacity 0.2s ease-out",s.style.opacity=0,setTimeout(function(){s.style.width=0,s.style.height=0,s.style.top=0,s.style.left=0},200),n.style.pointerEvents="auto",t.element.style.cursor="auto"},l=function(e){!0===r&&(n.style.pointerEvents="none"),t.element.style.cursor="crosshair",t.element.addEventListener("mousemove",function(t){if(!0!==r)return!1;i.x=t.offsetX|t.layerX,i.deltaX=Math.round(Math.max(i.x,e)-Math.min(i.x,e)),i.minX=Math.min(i.x,e),i.maxX=i.minX+i.deltaX,s.style.transition="none",s.style.opacity="1",s.style.width=i.deltaX+"px",s.style.height="100%",s.style.left=i.minX+"px"},!1)};t.element.addEventListener("mousedown",function(e){if(e.stopPropagation(),e.preventDefault(),0===e.button|1===e.button){var t=e.layerX;s.style.left=e.layerX,r=!0,l(t)}},!0),t.element.addEventListener("mouseup",function(e){r=!1,i.xMin=Math.round(t.x.invert(i.minX)),i.xMax=Math.round(t.x.invert(i.maxX));(0,o.default)("#universalsearch .absolute .absolute-from-human"),(0,o.default)("#universalsearch .absolute .absolute-to-human");if(!u.default.isNumber(i.xMin)||!u.default.isNumber(i.xMax))return void a();var n=new d.default(1e3*i.xMin),s=new d.default(1e3*i.xMax);p.changeTimeRange("absolute",{from:n.toString(),to:s.toString()}),(0,o.default)(".timerange-selector-container").effect("bounce",{complete:function(){e.altKey&&submitSearch()}}),a()},!1),t.dataDomain()[0]===i.xMin&&(t.window.xMin=void 0),t.dataDomain()[1]===i.xMax&&(t.window.xMax=void 0),t.window.xMin=i.xMin,t.window.xMax=i.xMax},update:function(){var e=this.graph,t=this.position;e.window.xMin=t.xMin,e.window.xMax=t.xMax,null===e.window.xMin&&(t.xMin=e.dataDomain()[0]),null===e.window.xMax&&(t.xMax=e.dataDomain()[1]),t.xMin=e.window.xMin,t.xMax=e.window.xMax}});a.default.Graph.Graylog2Selector=g,exports.default=g,t.exports=exports.default},function(e,exports,t){!function(){var n=t(352),r=t(141).utf8,i=t(353),o=t(141).bin,s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var a=n.bytesToWords(e),l=8*e.length,u=1732584193,c=-271733879,d=-1732584194,h=271733878,f=0;f>>24)|4278255360&(a[f]<<24|a[f]>>>8);a[l>>>5]|=128<>>9<<4)]=l;for(var p=s._ff,g=s._gg,m=s._hh,v=s._ii,f=0;f>>0,c=c+b>>>0,d=d+_>>>0,h=h+w>>>0}return n.endian([u,c,d,h])};s._ff=function(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+(i>>>0)+s;return(a<>>32-o)+t},s._gg=function(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+(i>>>0)+s;return(a<>>32-o)+t},s._hh=function(e,t,n,r,i,o,s){var a=e+(t^n^r)+(i>>>0)+s;return(a<>>32-o)+t},s._ii=function(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+(i>>>0)+s;return(a<>>32-o)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(s(e,t));return t&&t.asBytes?r:t&&t.asString?o.bytesToString(r):n.bytesToHex(r)}}()},function(e,exports){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce(function(r,i){var o=t[i];return n(e,o)&&r.push(i),r},[])}Object.defineProperty(exports,"__esModule",{value:!0}),exports.dayMatchesModifier=n,exports.getModifiersForDay=r;var i=t(55),o=t(96);exports.default={dayMatchesModifier:n,getModifiersForDay:r}},function(e,exports,t){e.exports=t(10)(283)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(148),u=n(l),c=s.default.createClass({displayName:"PageHeader",propTypes:{title:i.default.oneOfType([i.default.node,i.default.string]).isRequired,children:i.default.oneOfType([i.default.array,i.default.node]),experimental:i.default.bool,subpage:i.default.bool},getDefaultProps:function(){return{experimental:!1,subpage:!1}},render:function(){var e=void 0!==this.props.children&&void 0!==this.props.children.length?this.props.children:[this.props.children],t=void 0;this.props.experimental&&(t=s.default.createElement("span",{style:{cursor:"help",marginLeft:5,fontSize:14,lineHeight:"20px",verticalAlign:"text-top"}},s.default.createElement(a.OverlayTrigger,{placement:"bottom",overlay:s.default.createElement(a.Tooltip,{id:"experimental"},"This feature of Graylog is new and should be considered experimental.")},s.default.createElement(a.Label,{bsStyle:"primary"},"Experimental"))));var n=this.props.subpage?"content-head":"content content-head";return s.default.createElement("div",null,s.default.createElement(a.Row,{className:n},s.default.createElement(a.Col,{sm:12},e[2]&&s.default.createElement("div",{className:"actions-lg visible-lg visible-md"},s.default.createElement("div",{className:"actions-container"},e[2])),s.default.createElement("h1",null,this.props.title," ",s.default.createElement("small",null,t)),e[0]&&s.default.createElement("p",{className:"description"},e[0]),e[1]&&s.default.createElement(u.default,null,e[1])),e[2]&&s.default.createElement(a.Col,{sm:12,lgHidden:!0,mdHidden:!0,className:"actions-sm"},e[2])))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=s.default.createClass({displayName:"SupportLink",propTypes:{small:i.default.bool,children:i.default.node.isRequired},render:function(){var e=this.props.small?"fa-stack":"fa-stack fa-lg";return s.default.createElement("table",{className:"description-tooltips",style:{marginBottom:"10px"}},s.default.createElement("tbody",null,s.default.createElement("tr",null,s.default.createElement("td",{style:{width:"40px"}},s.default.createElement("span",{className:e},s.default.createElement("i",{className:"fa fa-circle fa-stack-2x"}),s.default.createElement("i",{className:"fa fa-lightbulb-o fa-stack-1x fa-inverse"}))),s.default.createElement("td",null,s.default.createElement("strong",null,this.props.children)))))}});exports.default=a,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){"undefined"!=typeof SVGElement&&g.default.findDOMNode(this)instanceof SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(e){!e.position||this.props.position&&e.position.x===this.props.position.x&&e.position.y===this.props.position.y||this.setState({x:e.position.x,y:e.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var e,t={},n=null,i=Boolean(this.props.position),o=!i||this.state.dragging,s=this.props.position||this.props.defaultPosition,l={x:(0,b.canDragX)(this)&&o?this.state.x:s.x,y:(0,b.canDragY)(this)&&o?this.state.y:s.y};this.state.isElementSVG?n=(0,y.createSVGTransform)(l):t=(0,y.createCSSTransform)(l);var u=this.props,c=u.defaultClassName,h=u.defaultClassNameDragging,f=u.defaultClassNameDragged,p=(0,v.default)(this.props.children.props.className||"",c,(e={},r(e,h,this.state.dragging),r(e,f,this.state.dragged),e));return d.default.createElement(A.default,a({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),d.default.cloneElement(d.default.Children.only(this.props.children),{className:p,style:a({},this.props.children.props.style,t),transform:n}))}}]),t}(d.default.Component);x.displayName="Draggable",x.propTypes=a({},A.default.propTypes,{axis:f.default.oneOf(["both","x","y","none"]),bounds:f.default.oneOfType([f.default.shape({left:f.default.number,right:f.default.number,top:f.default.number,bottom:f.default.number}),f.default.string,f.default.oneOf([!1])]),defaultClassName:f.default.string,defaultClassNameDragging:f.default.string,defaultClassNameDragged:f.default.string,defaultPosition:f.default.shape({x:f.default.number,y:f.default.number}),position:f.default.shape({x:f.default.number,y:f.default.number}),className:_.dontSetMe,style:_.dontSetMe,transform:_.dontSetMe}),x.defaultProps=a({},A.default.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null}),exports.default=x},function(t,exports){t.exports=e},function(e,exports,t){if("production"!=={DRAGGABLE_DEBUG:void 0}.NODE_ENV){var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,r=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n};e.exports=t(4)(r,!0)}else e.exports=t(10)()},function(e,exports,t){"use strict";var n=t(5),r=t(6),i=t(7),o=t(8),s=t(9);e.exports=function(e,t){function a(e){var t=e&&(C&&e[C]||e[E]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function u(e){this.message=e,this.stack=""}function c(e){function n(n,l,c,d,h,f,p){if(d=d||x,f=f||c,p!==o)if(t)r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!=={DRAGGABLE_DEBUG:void 0}.NODE_ENV&&"undefined"!=typeof console){var g=d+":"+c;!s[g]&&a<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",f,d),s[g]=!0,a++)}return null==l[c]?n?new u(null===l[c]?"The "+h+" `"+f+"` is marked as required in `"+d+"`, but its value is `null`.":"The "+h+" `"+f+"` is marked as required in `"+d+"`, but its value is `undefined`."):null:e(l,c,d,h,f)}if("production"!=={DRAGGABLE_DEBUG:void 0}.NODE_ENV)var s={},a=0;var l=n.bind(null,!1);return l.isRequired=n.bind(null,!0),l}function d(e){function t(t,n,r,i,o,s){var a=t[n];if(_(a)!==e)return new u("Invalid "+i+" `"+o+"` of type `"+w(a)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return c(t)}function h(e){function t(t,n,r,i,s){if("function"!=typeof e)return new u("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){return new u("Invalid "+i+" `"+s+"` of type `"+_(a)+"` supplied to `"+r+"`, expected an array.")}for(var l=0;l>" ,S="{array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:function(){return" c(n.thatReturnsNull)}(),arrayOf:h,element:function(){function t(t,n,r,i,o){var s="t[n];if(!e(s)){return" new u("Invalid "+i+" `"+o+"` of type `"+_(s)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return c(t)}(),instanceOf:f,node:function(){function e(e,t,n,r,i){return y(e[t])?null:new u("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}return c(e)}(),objectOf:g,oneOf:p,oneOfType:m,shape:v};return u.prototype="Error.prototype,S.checkPropTypes=s,S.PropTypes=S,S}},function(e,exports){"use" strict";function t(e){return function(){return e}}var n="function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return" this},n.thatReturnsArgument="function(e){return" e},e.exports="n},function(e,exports,t){"use" strict";function n(e,t,n,i,o,s,a,l){if(r(t),!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,i,o,s,a,l],d=0;u=new" Error(t.replace( %s g,function(){return c[d++]})),u.name="Invariant Violation" }throw u.framesToPop="1,u}}var" r="function(e){};"production"!=={DRAGGABLE_DEBUG:void" 0}.NODE_ENV&&(r="function(e){if(void" 0="==e)throw" new Error("invariant requires an error message argument")}),e.exports="n},function(e,exports,t){"use" strict";var n="t(5),r=n;"production"!=={DRAGGABLE_DEBUG:void" 0}.NODE_ENV&&function(){var e="function(e){for(var" t="arguments.length,n=Array(t">1?t-1:0),r=1;r2?r-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};return b({touchAction:"none"},e)}Object.defineProperty(exports,"__esModule",{value:!0});var b=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var r=0;r1)for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var a=Object.assign||function(e){for(var t=1;te[a]&&(r=a)}return r}function r(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]}function i(e,t,n,r,i,a){if(e[n])return(0,s.cloneLayout)(e[n]);for(var l=e[r],u=o(t),c=u.slice(u.indexOf(n)),d=0,h=c.length;d0&&void 0!==arguments[0]?arguments[0]:l,t=arguments[1];switch(t.type){case a.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case a.HOVER:return n(e.clientOffset,t.clientOffset)?e:s({},e,{clientOffset:t.clientOffset});case a.END_DRAG:case a.DROP:return l;default:return e}}function i(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return t&&n&&r?{x:t.x+r.x-n.x,y:t.y+r.y-n.y}:null}function o(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?{x:t.x-n.x,y:t.y-n.y}:null}Object.defineProperty(exports,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=u&&(h=l,f=!1,t=new r(t));e:for(;++d
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},i=document.activeElement;try{i.id}catch(e){i=document.body}return e.wrap(n),(e[0]===i||$.contains(e[0],i))&&$(i).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):($.extend(t,{position:e.css("position"),zIndex:e.css("z-index")}),$.each(["top","left","bottom","right"],function(n,r){t[r]=e.css(r),isNaN(parseInt(t[r],10))&&(t[r]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),n.css(t).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===t||$.contains(e[0],t))&&$(t).trigger("focus")),e}}),$.extend($.effects,{version:"1.12.1",define:function(e,t,n){return n||(n=t,t="effect"),$.effects.effect[e]=n,$.effects.effect[e].mode=t,n},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var r="horizontal"!==n?(t||100)/100:1,i="vertical"!==n?(t||100)/100:1;return{height:e.height()*i,width:e.width()*r,outerHeight:e.outerHeight()*i,outerWidth:e.outerWidth()*r}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var r=e.queue();t>1&&r.splice.apply(r,[1,0].concat(r.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createPlaceholder:function(e){var t,n=e.css("position"),r=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",t=$("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data("ui-effects-placeholder",t)),e.css({position:n,left:r.left,top:r.top}),t},removePlaceholder:function(e){var t="ui-effects-placeholder",n=e.data(t);n&&(n.remove(),e.removeData(t))},cleanUp:function(e){$.effects.restoreStyle(e),$.effects.removePlaceholder(e)},setTransition:function(e,t,n,r){return r=r||{},$.each(t,function(t,i){var o=e.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])}),r}}),$.fn.extend({effect:function(){function n(t){function n(){a.removeData(e),$.effects.cleanUp(a),"hide"===r.mode&&a.hide(),s()}function s(){$.isFunction(l)&&l.call(a[0]),$.isFunction(t)&&t()}var a=$(this);r.mode=c.shift(),!1===$.uiBackCompat||o?"none"===r.mode?(a[u](),s()):i.call(a[0],r,n):(a.is(":hidden")?"hide"===u:"show"===u)?(a[u](),s()):i.call(a[0],r,s)}var r=t.apply(this,arguments),i=$.effects.effect[r.effect],o=i.mode,s=r.queue,a=s||"fx",l=r.complete,u=r.mode,c=[],d=function(t){var n=$(this),r=$.effects.mode(n,u)||o;n.data(e,!0),c.push(r),o&&("show"===r||r===o&&"hide"===r)&&n.show(),o&&"none"===r||$.effects.saveStyle(n),$.isFunction(t)&&t()};return $.fx.off||!i?u?this[u](r.duration,l):this.each(function(){l&&l.call(this)}):!1===s?this.each(d).each(n):this.queue(a,d).queue(a,n)},show:function(e){return function(r){if(n(r))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}($.fn.show),hide:function(e){return function(r){if(n(r))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}($.fn.hide),toggle:function(e){return function(r){if(n(r)||"boolean"==typeof r)return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}($.fn.toggle),cssUnit:function(e){var t=this.css(e),n=[];return $.each(["em","px","%","pt"],function(e,r){t.indexOf(r)>0&&(n=[parseFloat(t),r])}),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(e,t){var n=$(this),r=$(e.to),i="fixed"===r.css("position"),o=$("body"),s=i?o.scrollTop():0,a=i?o.scrollLeft():0,l=r.offset(),u={top:l.top-s,left:l.left-a,height:r.innerHeight(),width:r.innerWidth()},c=n.offset(),d=$("").appendTo("body").addClass(e.className).css({top:c.top-s,left:c.left-a,height:n.innerHeight(),width:n.innerWidth(),position:i?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),$.isFunction(t)&&t()})}}),$.fx.step.clip=function(e){e.clipInit||(e.start=$(e.elem).cssClip(),"string"==typeof e.end&&(e.end=r(e.end,e.elem)),e.clipInit=!0),$(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,n){e[n]=function(e){return Math.pow(e,t+2)}}),$.extend(e,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),$.each(e,function(e,t){$.easing["easeIn"+e]=t,$.easing["easeOut"+e]=function(e){return 1-t(1-e)},$.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}})}(),$.effects})},function(e,exports){!function(exports){function e(e){return e}function t(e,t){for(var n=0,r=t.length,i=new Array(r);n>>1;e(t[o])>>1;n>>1);--o>0;)r(e,o,i,t);return e}function n(e,t,n){for(var i,o=n-t;--o>0;)i=e[t],e[t]=e[t+o],e[t+o]=i,r(e,1,o,t);return e}function r(t,n,r,i){for(var o,s=t[--i+n],a=e(s);(o=n<<1)<=r&&(oe(t[i+o+1])&&o++,!(a<=e(t[i+o])));)t[i+n]=t[i+o],n=o;t[i+n]=s}return t.sort=n,t}function i(e){function t(t,r,i,o){var s,a,l,u=new Array(o=Math.min(i-r,o));for(a=0;as&&(u[0]=l,s=e(n(u,0,o)[0]))}while(++rn&&e(t[o-1])>a;--o)t[o]=t[o-1];t[o]=s}return t}return t}function s(e){function t(e,t,i){return(i-t>1,c=u-s,d=u+s,h=n[a],f=e(h),p=n[c],g=e(p),m=n[u],v=e(m),y=n[d],b=e(y),_=n[l],w=e(_);f>g&&(o=h,h=p,p=o,o=f,f=g,g=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o),f>v&&(o=h,h=m,m=o,o=f,f=v,v=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),f>b&&(o=h,h=y,y=o,o=f,f=b,b=o),v>b&&(o=m,m=y,y=o,o=v,v=b,b=o),g>w&&(o=p,p=_,_=o,o=g,g=w,w=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o);var A=p,C=g,E=y,x=b;n[a]=h,n[c]=n[r],n[u]=m,n[d]=n[i-1],n[l]=_;var S=r+1,F=i-2,k=C<=x&&C>=x;if(k)for(var T=S;T<=F;++T){var D=n[T],M=e(D);if(MC)for(;;){var R=e(n[F]);{if(!(R>C)){if(Rx)for(;;){var R=e(n[F]);{if(!(R>x)){Rl){for(var O,R;(O=e(n[S]))<=C&&O>=C;)++S;for(;(R=e(n[F]))<=x&&R>=x;)--F;for(var T=S;T<=F;T++){var D=n[T],M=e(D);if(M<=C&&M>=C)T!==S&&(n[T]=n[S],n[S]=D),S++;else if(M<=x&&M>=x)for(;;){var R=e(n[F]);{if(!(R<=x&&R>=x)){R32)throw new Error("invalid array width!");return e}function c(e,t){return function(n){var r=n.length;return[e.left(n,t,0,r),e.right(n,t,0,r)]}}function d(e,t){var n=t[0],r=t[1];return function(t){var i=t.length;return[e.left(t,n,0,i),e.left(t,r,0,i)]}}function h(e){return[0,e.length]}function f(){return null}function p(){return 0}function g(e){return e+1}function m(e){return e-1}function v(e){return function(t,n){return t+ +e(n)}}function y(e){return function(t,n){return t-e(n)}}function b(){function n(e){var t=S,n=e.length;return n&&(E=E.concat(e),M=k(M,S+=n),O.forEach(function(r){r(e,t,n)})),b}function o(){for(var e=_(S,S),t=[],n=0,r=0;nr;)M[--S]=0}function a(n){function o(e,r,i){q=e.map(n),K=J(w(i),0,i),q=t(q,K);var o,s=ee(q),a=s[0],l=s[1];if(Y)for(o=0;ore)for(r=re,i=Math.min(t,ie);rie)for(r=Math.max(t,ie),i=n;r=re&&e>0;)M[t=V[r]]||(n.push(E[t]),--e);return n}function z(e){for(var t,n=[],r=re;r0;)M[t=V[r]]||(n.push(E[t]),--e),r++;return n}function H(t){function n(e,n,r,i){function o(){++q===G&&(y=T(y,U<<=1),B=T(B,U),G=A(U))}var c,d,h,p,g,m,v=P,y=_(q,G),b=j,w=H,C=q,x=0,F=0;for(X&&(b=w=f),P=new Array(q),q=0,B=C>1?k(B,S):_(S,G),C&&(h=(d=v[0]).key);F=p);)++F;for(;Fm||(B[c=n[F]+r]=q,M[c]&Z||(g.value=b(g.value,E[c])),++F>=i));)p=t(e[F]);o()}for(;xx)for(x=0;x1?(K=s,Y=l):(!q&&J&&(q=1,P=[{key:null,value:w()}]),1===q?(K=a,Y=u):(K=f,Y=f),B=null),R[c]=K}function o(){if(q>1){for(var e=q,t=P,n=_(e,e),r=0,i=0;r1)for(var r=0;r1?(Y=l,K=s):1===q?(Y=u,K=a):Y=K=f}else if(1===q){if(J)return;for(var r=0;r=0&&R.splice(e,1),e=te.indexOf(n),e>=0&&te.splice(e,1),e=L.indexOf(o),e>=0&&L.splice(e,1),O}var O={top:d,all:c,reduce:h,reduceCount:b,reduceSum:w,order:C,orderNatural:x,size:F,dispose:D,remove:D};ne.push(O);var P,B,I,N,j,z,H,U=8,G=A(U),q=0,K=f,Y=f,X=!0,J=t===f;return arguments.length<1&&(t=e),R.push(K),te.push(n),L.push(o),n(W,V,0,S),b().orderNatural()}function U(){var e=H(f),t=e.all;return delete e.all,delete e.top,delete e.order,delete e.orderNatural,delete e.size,e.value=function(){return t()[0].value},e}function G(){ne.forEach(function(e){e.dispose()});var e=O.indexOf(o);return e>=0&&O.splice(e,1),e=O.indexOf(a),e>=0&&O.splice(e,1),e=L.indexOf(l),e>=0&&L.splice(e,1),F&=Z,B()}var W,V,q,K,Y,X={filter:b,filterExact:x,filterRange:P,filterFunction:I,filterAll:B,top:j,bottom:z,group:H,groupAll:U,dispose:G,remove:G},Q=~F&-~F,Z=~Q,J=s(function(e){return q[e]}),ee=h,te=[],ne=[],re=0,ie=0;return O.unshift(o),O.push(a),L.push(l),F|=Q,(D>=32?!Q:F&-(1<=0&&R.splice(n),n=O.indexOf(e),n>=0&&O.splice(n),h}var l,u,c,d,h={reduce:r,reduceCount:i,reduceSum:o,value:s,dispose:a,remove:a},f=!0;return R.push(t),O.push(e),e(E,0,S),i()}function u(){return S}var b={add:n,remove:o,dimension:a,groupAll:l,size:u},E=[],S=0,F=0,D=8,M=x(0),R=[],O=[],L=[];return arguments.length?n(arguments[0]):b}function _(e,t){return(t<257?x:t<65537?S:F)(e)}function w(e){for(var t=_(e,e),n=-1;++n=t)return e;var n=new e.constructor(t);return n.set(e),n},T=function(e,t){var n;switch(t){case 16:n=S(e.length);break;case 32:n=F(e.length);break;default:throw new Error("invalid array width!")}return n.set(e),n}),exports.crossfilter=b}(void 0!==exports&&exports||this)},function(e,exports,t){e.exports=t(322).crossfilter},function(e,exports){!function(exports){function e(e){return e}function t(e,t){for(var n=0,r=t.length,i=new Array(r);n>>1;e(t[o])>>1;n>>1);--o>0;)r(e,o,i,t);return e}function n(e,t,n){for(var i,o=n-t;--o>0;)i=e[t],e[t]=e[t+o],e[t+o]=i,r(e,1,o,t);return e}function r(t,n,r,i){for(var o,s=t[--i+n],a=e(s);(o=n<<1)<=r&&(oe(t[i+o+1])&&o++,!(a<=e(t[i+o])));)t[i+n]=t[i+o],n=o;t[i+n]=s}return t.sort=n,t}function i(e){function t(t,r,i,o){var s,a,l,u=new Array(o=Math.min(i-r,o));for(a=0;as&&(u[0]=l,s=e(n(u,0,o)[0]))}while(++rn&&e(t[o-1])>a;--o)t[o]=t[o-1];t[o]=s}return t}return t}function s(e){function t(e,t,i){return(i-t>1,c=u-s,d=u+s,h=n[a],f=e(h),p=n[c],g=e(p),m=n[u],v=e(m),y=n[d],b=e(y),_=n[l],w=e(_);f>g&&(o=h,h=p,p=o,o=f,f=g,g=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o),f>v&&(o=h,h=m,m=o,o=f,f=v,v=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),f>b&&(o=h,h=y,y=o,o=f,f=b,b=o),v>b&&(o=m,m=y,y=o,o=v,v=b,b=o),g>w&&(o=p,p=_,_=o,o=g,g=w,w=o),g>v&&(o=p,p=m,m=o,o=g,g=v,v=o),b>w&&(o=y,y=_,_=o,o=b,b=w,w=o);var A=p,C=g,E=y,x=b;n[a]=h,n[c]=n[r],n[u]=m,n[d]=n[i-1],n[l]=_;var S=r+1,F=i-2,k=C<=x&&C>=x;if(k)for(var T=S;T<=F;++T){var D=n[T],M=e(D);if(MC)for(;;){var R=e(n[F]);{if(!(R>C)){if(Rx)for(;;){var R=e(n[F]);{if(!(R>x)){Rl){for(var O,R;(O=e(n[S]))<=C&&O>=C;)++S;for(;(R=e(n[F]))<=x&&R>=x;)--F;for(var T=S;T<=F;T++){var D=n[T],M=e(D);if(M<=C&&M>=C)T!==S&&(n[T]=n[S],n[S]=D),S++;else if(M<=x&&M>=x)for(;;){var R=e(n[F]);{if(!(R<=x&&R>=x)){R32)throw new Error("invalid array width!");return e}function c(e,t){return function(n){var r=n.length;return[e.left(n,t,0,r),e.right(n,t,0,r)]}}function d(e,t){var n=t[0],r=t[1];return function(t){var i=t.length;return[e.left(t,n,0,i),e.left(t,r,0,i)]}}function h(e){return[0,e.length]}function f(){return null}function p(){return 0}function g(e){return e+1}function m(e){return e-1}function v(e){return function(t,n){return t+ +e(n)}}function y(e){return function(t,n){return t-e(n)}}function b(){function n(e){var t=S,n=e.length;return n&&(E=E.concat(e),M=k(M,S+=n),O.forEach(function(r){r(e,t,n)})),b}function o(){for(var e=_(S,S),t=[],n=0,r=0;nr;)M[--S]=0}function a(n){function o(e,r,i){q=e.map(n),K=J(w(i),0,i),q=t(q,K);var o,s=ee(q),a=s[0],l=s[1];if(Y)for(o=0;ore)for(r=re,i=Math.min(t,ie);rie)for(r=Math.max(t,ie),i=n;r=re&&e>0;)M[t=V[r]]||(n.push(E[t]),--e);return n}function z(e){for(var t,n=[],r=re;r0;)M[t=V[r]]||(n.push(E[t]),--e),r++;return n}function H(t){function n(e,n,r,i){function o(){++q===G&&(y=T(y,U<<=1),B=T(B,U),G=A(U))}var c,d,h,p,g,m,v=P,y=_(q,G),b=j,w=H,C=q,x=0,F=0;for(X&&(b=w=f),P=new Array(q),q=0,B=C>1?k(B,S):_(S,G),C&&(h=(d=v[0]).key);F=p);)++F;for(;Fm||(B[c=n[F]+r]=q,M[c]&Z||(g.value=b(g.value,E[c])),++F>=i));)p=t(e[F]);o()}for(;xx)for(x=0;x1?(K=s,Y=l):(!q&&J&&(q=1,P=[{key:null,value:w()}]),1===q?(K=a,Y=u):(K=f,Y=f),B=null),R[c]=K}function o(){if(q>1){for(var e=q,t=P,n=_(e,e),r=0,i=0;r1)for(var r=0;r1?(Y=l,K=s):1===q?(Y=u,K=a):Y=K=f}else if(1===q){if(J)return;for(var r=0;r=0&&R.splice(e,1),e=te.indexOf(n),e>=0&&te.splice(e,1),e=L.indexOf(o),e>=0&&L.splice(e,1),O}var O={top:d,all:c,reduce:h,reduceCount:b,reduceSum:w,order:C,orderNatural:x,size:F,dispose:D,remove:D};ne.push(O);var P,B,I,N,j,z,H,U=8,G=A(U),q=0,K=f,Y=f,X=!0,J=t===f;return arguments.length<1&&(t=e),R.push(K),te.push(n),L.push(o),n(W,V,0,S),b().orderNatural()}function U(){var e=H(f),t=e.all;return delete e.all,delete e.top,delete e.order,delete e.orderNatural,delete e.size,e.value=function(){return t()[0].value},e}function G(){ne.forEach(function(e){e.dispose()});var e=O.indexOf(o);return e>=0&&O.splice(e,1),e=O.indexOf(a),e>=0&&O.splice(e,1),e=L.indexOf(l),e>=0&&L.splice(e,1),F&=Z,B()}var W,V,q,K,Y,X={filter:b,filterExact:x,filterRange:P,filterFunction:I,filterAll:B,top:j,bottom:z,group:H,groupAll:U,dispose:G,remove:G},Q=~F&-~F,Z=~Q,J=s(function(e){return q[e]}),ee=h,te=[],ne=[],re=0,ie=0;return O.unshift(o),O.push(a),L.push(l),F|=Q,(D>=32?!Q:F&-(1<=0&&R.splice(n),n=O.indexOf(e),n>=0&&O.splice(n),h}var l,u,c,d,h={reduce:r,reduceCount:i,reduceSum:o,value:s,dispose:a,remove:a},f=!0;return R.push(t),O.push(e),e(E,0,S),i()}function u(){return S}var b={add:n,remove:o,dimension:a,groupAll:l,size:u},E=[],S=0,F=0,D=8,M=x(0),R=[],O=[],L=[];return arguments.length?n(arguments[0]):b}function _(e,t){return(t<257?x:t<65537?S:F)(e)}function w(e){for(var t=_(e,e),n=-1;++n=t)return e;var n=new e.constructor(t);return n.set(e),n},T=function(e,t){var n;switch(t){case 16:n=S(e.length);break;case 32:n=F(e.length);break;default:throw new Error("invalid array width!")}return n.set(e),n}),exports.crossfilter=b}(void 0!==exports&&exports||this)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(23),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i={startOfResolution:function(e,t){var n=t;return"week"===t&&(n="isoWeek"),(0,r.default)(e).startOf(n)}};exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(3).default,r=t(7),i=r.getStore("Search"),o=t(6),s=t(9),a=t(5),l={getQuickValues:function(e){var t=i.getOriginalSearchURLParams(),r=i.searchInStream?i.searchInStream.id:null,l=t.get("rangetype"),u={};switch(l){case"relative":u.range=t.get("relative");break;case"absolute":u.from=t.get("from"),u.to=t.get("to");break;case"keyword":u.keyword=t.get("keyword")}var c=s.UniversalSearchApiController.fieldTerms(l,t.get("q")||"*",e,u,r).url;c=a.qualifyUrl(c);var d=n("GET",c);return d.catch(function(e){o.error("Loading quick values failed with status: "+e,"Could not load quick values")}),d}};e.exports=l},function(e,exports,t){"use strict";var n=t(9),r=t(3).default,i=t(6),o=t(5),s={loadFields:function(){var e=n.SystemApiController.fields().url,t=r("GET",o.qualifyUrl(e));return t=t.then(function(e){return e.fields}),t.catch(function(e){i.error("Loading field information failed with status: "+e.additional.message,"Could not load field information")}),t}};e.exports=s},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(3).default,r=t(16),i=t(9),o=t(5),s=t(6),a=t(7),l=a.getStore("Search"),u={FUNCTIONS:r.OrderedMap({count:"Total",mean:"Mean",min:"Minimum",max:"Maximum",std_deviation:"Std. deviation",variance:"Variance",sum:"Sum",cardinality:"Cardinality"}),getFieldStatistics:function(e){var t=l.getOriginalSearchURLParams(),r=l.searchInStream?l.searchInStream.id:null,a=t.get("rangetype"),u={};switch(a){case"relative":u.range=t.get("relative");break;case"absolute":u.from=t.get("from"),u.to=t.get("to");break;case"keyword":u.keyword=t.get("keyword")}var c=i.UniversalSearchApiController.fieldStats(a,t.get("q")||"*",e,u,r).url;c=o.qualifyUrl(c);var d=n("GET",c);return d.catch(function(e){s.error("Loading field statistics failed with status: "+e,"Could not load field statistics")}),d}};e.exports=u},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(12),s=n(o),a=i.default.createStore({focus:!0,init:function(){var e=this;(0,s.default)(window).blur(function(){e.trigger({focus:!1}),e.focus=!1}),(0,s.default)(window).focus(function(){e.trigger({focus:!0}),e.focus=!0})},getInitialState:function(){return{focus:this.focus}}});exports.default=a,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(3),s=n(o),a=t(8),l=n(a),u=t(6),c=n(u),d=t(5),h=n(d),f=l.default.getActions("GettingStarted"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/gettingstarted",status:void 0,init:function(){this.getStatus()},getInitialState:function(){return{status:this.status}},get:function(){return this.status},getStatus:function(){var e=this,t=(0,s.default)("GET",h.default.qualifyUrl(this.sourceUrl));t.then(function(t){return e.status=t,e.trigger({status:e.status}),t},function(e){return console.error(e)}),f.getStatus.promise(t)},dismiss:function(){var e=this,t=(0,s.default)("POST",h.default.qualifyUrl(this.sourceUrl+"/dismiss"),"{}");t.then(function(t){return e.getStatus(),t},function(e){c.default.error("Dismissing Getting Started Guide failed with status: "+e,"Could not dismiss guide")}),f.dismiss.promise(t)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(7),s=n(o),a=t(8),l=n(a),u=s.default.getStore("Metrics"),c=l.default.getActions("Metrics"),d=i.default.createStore({listenables:[],metrics:{input:"org.graylog2.throughput.input.1-sec-rate",output:"org.graylog2.throughput.output.1-sec-rate"},init:function(){c.addGlobal(this.metrics.input),c.addGlobal(this.metrics.output),this.listenTo(u,this.updateMetrics),setInterval(c.list,this.INTERVAL)},INTERVAL:2e3,updateMetrics:function(e){var t=this;if(e.metrics){var n={input:0,output:0};Object.keys(e.metrics).forEach(function(r){var i=e.metrics[r][t.metrics.input],o=e.metrics[r][t.metrics.output];i&&(n.input+=i.metric.value),o&&(n.output+=o.metric.value)}),this.trigger({throughput:n})}}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(6),r=t(5),i=t(3).default,o=t(3).fetchPlainText,s={URL:r.qualifyUrl("/system/grok"),loadPatterns:function(e){var t=function(e){n.error("Loading Grok patterns failed with status: "+e.message,"Could not load Grok patterns")};i("GET",this.URL).then(function(t){var n=t.patterns;return n.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}),e(n),t},t)},savePattern:function(e,t){var r,o=function(t){n.error('Saving Grok pattern "'+e.name+'" failed with status: '+t.message,"Could not save Grok pattern")},s={id:e.id,pattern:e.pattern,name:e.name,content_pack:e.content_pack},a=this.URL;""===e.id?r="POST":(a+="/"+e.id,r="PUT"),i(r,a,s).then(function(r){t();var i=""===e.id?"created":"updated",o='Grok pattern "'+e.name+'" successfully '+i;return n.success(o),r},o)},deletePattern:function(e,t){var r=function(t){n.error('Deleting Grok pattern "'+e.name+'" failed with status: '+t.message,"Could not delete Grok pattern")};i("DELETE",this.URL+"/"+e.id).then(function(r){return t(),n.success('Grok pattern "'+e.name+'" successfully deleted'),r},r)},bulkImport:function(e,t){var r=function(e){n.error("Importing Grok pattern file failed with status: "+e.message,"Could not load Grok patterns")},i=o("POST",this.URL+"?replace="+t,e);return i.catch(r),i}};e.exports=s},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(3),l=n(a),u=t(6),c=n(u),d=t(43),h=n(d),f=t(45),p=n(f),g=t(8),m=n(g),v=m.default.getActions("HistogramData"),y=i.default.createStore({listenables:[v],sourceUrl:"/search/universal/relative/histogram",histogram:void 0,getInitialState:function(){return{histogram:this.histogram}},load:function(e,t,n){var r=(0,h.default)(s.default.qualifyUrl(this.sourceUrl)),i={};void 0!==t&&t instanceof Array?i.query=t.map(function(e){return"source:"+e}).join(" OR "):i.query="*";var o="minute",a=Number(e);a>=31536e3||0===a?o="day":a>=2678400&&(o="hour"),i.range=e,i.interval=o,r.query(i);var u=(0,l.default)("GET",r.toString()).then(function(e){return e.histogram=p.default.format(e.results,e.queried_timerange,o,n,0===a,null),e},function(e){c.default.warning("Loading of histogram data failed with status: "+e,"Could not load histogram data")});v.load.promise(u)}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("IndexerCluster"),p=i.default.createStore({listenables:[f],state:{},init:function(){this.update()},update:function(){var e=this;Promise.all([this.health().then(function(t){e.state.health=t}),this.name().then(function(t){e.state.name=t.name})]).then(function(){return e.trigger(e.state)})},getInitialState:function(){return this.state},health:function(){var e=s.default.qualifyUrl(l.default.IndexerClusterApiController.health().url),t=(0,c.default)("GET",e);return f.health.promise(t),t},name:function(){var e=s.default.qualifyUrl(l.default.IndexerClusterApiController.name().url),t=(0,c.default)("GET",e);return f.name.promise(t),t}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(23),s=n(o),a=t(6),l=(n(a),t(5)),u=n(l),c=t(9),d=n(c),h=t(3),f=n(h),p=i.default.createStore({listenables:[],list:function(e,t){var n=u.default.qualifyUrl(d.default.IndexerFailuresApiController.list(e,t).url);return(0,f.default)("GET",n)},count:function(e){var t=e.format?e:(0,s.default)(e),n=t.format("YYYY-MM-DDTHH:mm:ss.SSS"),r=u.default.qualifyUrl(d.default.IndexerFailuresApiController.count(n).url);return(0,f.default)("GET",r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("IndexerOverview"),p=i.default.createStore({listenables:[f],list:function(e){var t=this,n=s.default.qualifyUrl(l.default.IndexerOverviewApiResource.list(e).url),r=(0,c.default)("GET",n);return r.then(function(e){t.trigger({indexerOverview:e,indexerOverviewError:void 0})},function(e){if(e.additional&&503===e.additional.status){var n=e.additional.body&&e.additional.body.message?e.additional.body.message:"Elasticsearch is unavailable. Check your configuration and logs for more information.";t.trigger({indexerOverviewError:n})}}),f.list.promise(r),r}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),s=n(o),a=t(5),l=n(a),u=t(9),c=n(u),d=t(3),h=n(d),f=t(8),p=n(f),g=p.default.getActions("IndexRanges"),m=i.default.createStore({listenables:[g],indexRanges:void 0,getInitialState:function(){return{indexRanges:this.indexRanges}},init:function(){g.list()},list:function(){var e=this,t=l.default.qualifyUrl(c.default.IndexRangesApiController.list().url),n=(0,h.default)("GET",t).then(function(t){e.indexRanges=t.ranges,e.trigger(e.getInitialState())});g.list.promise(n)},recalculate:function(e){var t=l.default.qualifyUrl(c.default.IndexRangesApiController.rebuild(e).url),n=(0,h.default)("POST",t);n.then(s.default.success("Index ranges will be recalculated shortly")).catch(function(e){s.default.error("Could not create a job to start index ranges recalculation, reason: "+e,"Error starting index ranges recalculation")}),g.recalculate.promise(n)},recalculateIndex:function(e){var t=l.default.qualifyUrl(c.default.IndexRangesApiController.rebuildSingle(e).url),n=(0,h.default)("POST",t);n.then(s.default.success("Index ranges for "+e+" will be recalculated shortly")).catch(function(t){s.default.error("Could not create a job to start index ranges recalculation for "+e+", reason: "+t,"Error starting index ranges recalculation for "+e)}),g.recalculateIndex.promise(n)}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(9),s=n(o),a=t(3),l=n(a),u=t(5),c=n(u),d=t(6),h=n(d),f=t(8),p=n(f),g=p.default.getActions("IndexSets"),m=i.default.createStore({listenables:[g],list:function(e){var t=this,n=c.default.qualifyUrl(s.default.IndexSetsApiController.list(e).url),r=(0,l.default)("GET",n);r.then(function(e){return t.trigger({indexSetsCount:e.total,indexSets:e.index_sets,indexSetStats:e.stats})},function(e){h.default.error("Fetching index sets list failed: "+e.message,"Could not retrieve index sets.")}),g.list.promise(r)},listPaginated:function(e,t,n){var r=this,i=c.default.qualifyUrl(s.default.IndexSetsApiController.listPaginated(e,t,n).url),o=(0,l.default)("GET",i);o.then(function(e){return r.trigger({indexSetsCount:e.total,indexSets:e.index_sets,indexSetStats:e.stats})},function(e){h.default.error("Fetching index sets list failed: "+r._errorMessage(e),"Could not retrieve index sets.")}),g.listPaginated.promise(o)},get:function(e){var t=this,n=c.default.qualifyUrl(s.default.IndexSetsApiController.get(e).url),r=(0,l.default)("GET",n);r.then(function(e){return t.trigger({indexSet:e}),e},function(n){h.default.error("Fetching index set '"+e+"' failed with status: "+t._errorMessage(n),"Could not retrieve index set.")}),g.get.promise(r)},update:function(e){var t=this,n=c.default.qualifyUrl(s.default.IndexSetsApiController.get(e.id).url),r=(0,l.default)("PUT",n,e);r.then(function(n){return h.default.success("Successfully updated index set '"+e.title+"'","Success"),t.trigger({indexSet:n}),n},function(n){h.default.error("Updating index set '"+e.title+"' failed with status: "+t._errorMessage(n),"Could not update index set.")}),g.update.promise(r)},create:function(e){var t=this,n=c.default.qualifyUrl(s.default.IndexSetsApiController.create().url),r=(0,l.default)("POST",n,e);r.then(function(n){return h.default.success("Successfully created index set '"+e.title+"'","Success"),t.trigger({indexSet:n}),n},function(n){h.default.error("Creating index set '"+e.title+"' failed with status: "+t._errorMessage(n),"Could not create index set.")}),g.create.promise(r)},delete:function(e,t){var n=this,r=c.default.qualifyUrl(s.default.IndexSetsApiController.delete(e.id,t).url),i=(0,l.default)("DELETE",r);i.then(function(){h.default.success("Successfully deleted index set '"+e.title+"'","Success")},function(t){h.default.error("Deleting index set '"+e.title+"' failed with status: "+n._errorMessage(t),"Could not delete index set.")}),g.delete.promise(i)},setDefault:function(e){var t=this,n=c.default.qualifyUrl(s.default.IndexSetsApiController.setDefault(e.id).url),r=(0,l.default)("PUT",n);r.then(function(){h.default.success("Successfully set index set '"+e.title+"' as default","Success")},function(n){h.default.error("Setting index set '"+e.title+"' as default failed with status: "+t._errorMessage(n),"Could not set default index set.")}),g.setDefault.promise(r)},_errorMessage:function(e){try{return e.additional.body.message}catch(t){return e.message}}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("Indices"),p=i.default.createStore({listenables:[f],indices:void 0,closedIndices:void 0,registrations:{},getInitialState:function(){return{indices:this.indices,closedIndices:this.closedIndices}},list:function(e){var t=this,n=s.default.qualifyUrl(l.default.IndicesApiController.list(e).url),r=(0,c.default)("GET",n).then(function(e){return t.indices=e.all.indices,t.closedIndices=e.closed.indices,t.trigger({indices:t.indices,closedIndices:t.closedIndices}),{indices:t.indices,closedIndices:t.closedIndices}});f.list.promise(r)},listAll:function(){var e=this,t=s.default.qualifyUrl(l.default.IndicesApiController.listAll().url),n=(0,c.default)("GET",t).then(function(t){return e.indices=t.all.indices,e.closedIndices=t.closed.indices,e.trigger({indices:e.indices,closedIndices:e.closedIndices}),{indices:e.indices,closedIndices:e.closedIndices}});f.listAll.promise(n)},multiple:function(){var e=this,t=Object.keys(this.registrations);if(!(t.length<=0)){var n=s.default.qualifyUrl(l.default.IndicesApiController.multiple().url),r={indices:t},i=(0,c.default)("POST",n,r).then(function(t){return e.indices?Object.keys(t).forEach(function(n){e.indices[n]=t[n]}):e.indices=t,e.trigger({indices:e.indices,closedIndices:e.closedIndices}),{indices:e.indices,closedIndices:e.closedIndices}});f.multiple.promise(i)}},close:function(e){var t=s.default.qualifyUrl(l.default.IndicesApiController.close(e).url),n=(0,c.default)("POST",t);f.close.promise(n)},delete:function(e){var t=s.default.qualifyUrl(l.default.IndicesApiController.delete(e).url),n=(0,c.default)("DELETE",t);f.delete.promise(n)},reopen:function(e){var t=s.default.qualifyUrl(l.default.IndicesApiController.reopen(e).url),n=(0,c.default)("POST",t);f.reopen.promise(n)},subscribe:function(e){this.registrations[e]=this.registrations[e]?this.registrations[e]+1:1},unsubscribe:function(e){this.registrations[e]=this.registrations[e]>0?this.registrations[e]-1:0,0===this.registrations[e]&&delete this.registrations[e]}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),s=n(o),a=t(5),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("IndicesConfiguration"),p=i.default.createStore({listenables:[f],rotationStrategies:void 0,retentionStrategies:void 0,getInitialState:function(){return{activeRotationConfig:void 0,rotationStrategies:void 0,activeRetentionConfig:void 0,retentionStrategies:void 0}},_url:function(e){return l.default.qualifyUrl("/system/indices"+e)},loadRotationStrategies:function(){var e=this,t=(0,c.default)("GET",this._url("/rotation/strategies"));t.then(function(t){e.rotationStrategies=t.strategies,e.trigger({rotationStrategies:t.strategies})},function(e){s.default.error("Fetching rotation strategies failed: "+e,"Could not retrieve rotation strategies")}),f.loadRotationStrategies.promise(t)},loadRetentionStrategies:function(){var e=this,t=(0,c.default)("GET",this._url("/retention/strategies"));t.then(function(t){e.retentionStrategies=t.strategies,e.trigger({retentionStrategies:t.strategies})},function(e){s.default.error("Fetching retention strategies failed: "+e,"Could not retrieve retention strategies")}),f.loadRetentionStrategies.promise(t)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(3),l=n(a),u=t(6),c=n(u),d=t(7),h=n(d),f=t(8),p=n(f),g=h.default.getStore("InputStaticFields"),m=p.default.getActions("Inputs"),v=i.default.createStore({listenables:[m],sourceUrl:"/system/inputs",inputs:void 0,input:void 0,init:function(){this.trigger({inputs:this.inputs,input:this.input}),this.listenTo(g,this.list)},list:function(){var e=this,t=(0,l.default)("GET",s.default.qualifyUrl(this.sourceUrl));t.then(function(t){return e.inputs=t.inputs,e.trigger({inputs:e.inputs}),e.inputs},function(e){c.default.error("Fetching Inputs failed with status: "+e,"Could not retrieve Inputs")}),m.list.promise(t)},get:function(e){return this.getOptional(e,!0)},getOptional:function(e,t){var n=this,r=(0,l.default)("GET",s.default.qualifyUrl(this.sourceUrl+"/"+e));r.then(function(e){return n.input=e,n.trigger({input:n.input}),n.input},function(r){t?c.default.error("Fetching input "+e+" failed with status: "+r,"Could not retrieve input"):n.trigger({input:{}})}),m.get.promise(r)},create:function(e){var t=(0,l.default)("POST",s.default.qualifyUrl(this.sourceUrl),e);t.then(function(){c.default.success("Input '"+e.title+"' launched successfully"),m.list()},function(t){c.default.error("Launching input '"+e.title+"' failed with status: "+t,"Could not launch input")}),m.create.promise(t)},delete:function(e){var t=e.id,n=e.title,r=(0,l.default)("DELETE",s.default.qualifyUrl(this.sourceUrl+"/"+t));r.then(function(){c.default.success("Input '"+n+"' deleted successfully"),m.list()},function(e){c.default.error("Deleting input '"+n+"' failed with status: "+e,"Could not delete input")}),m.delete.promise(r)},update:function(e,t){var n=(0,l.default)("PUT",s.default.qualifyUrl(this.sourceUrl+"/"+e),t);n.then(function(){c.default.success("Input '"+t.title+"' updated successfully"),m.list()},function(e){c.default.error("Updating input '"+t.title+"' failed with status: "+e,"Could not update input")}),m.update.promise(n)}});v.inputsAsMap=function(e){var t={};return e.forEach(function(e){t[e.id]=e}),t},exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),s=n(o),a=t(5),l=n(a),u=t(9),c=n(u),d=t(3),h=n(d),f=i.default.createStore({listenables:[],init:function(){this.list()},getInitialState:function(){return{inputStates:this.inputStates}},list:function(){var e=this,t=l.default.qualifyUrl(c.default.ClusterInputStatesController.list().url);return(0,h.default)("GET",t).then(function(t){var n={};return Object.keys(t).forEach(function(e){t[e]&&t[e].forEach(function(t){n[t.id]||(n[t.id]={}),n[t.id][e]=t})}),e.inputStates=n,e.trigger({inputStates:e.inputStates}),n})},_checkInputStateChangeResponse:function(e,t,n){var r=Object.keys(t).filter(function(t){return!!e.global||t===e.node}),i=r.filter(function(e){return null===t[e]});0===i.length?s.default.success("Request to "+n.toLowerCase()+" input '"+e.title+"' was sent successfully.","Input '"+e.title+"' will be "+("START"===n?"started":"stopped")+" shortly"):i.length===r.length?s.default.error("Request to "+n.toLowerCase()+" input '"+e.title+"' failed. Check your Graylog logs for more information.","Input '"+e.title+"' could not be "+("START"===n?"started":"stopped")):s.default.warning("Request to "+n.toLowerCase()+" input '"+e.title+"' failed in some nodes. Check your Graylog logs for more information.","Input '"+e.title+"' could not be "+("START"===n?"started":"stopped")+" in all nodes")},start:function(e){var t=this,n=l.default.qualifyUrl(c.default.ClusterInputStatesController.start(e.id).url);return(0,h.default)("PUT",n).then(function(n){return t._checkInputStateChangeResponse(e,n,"START"),t.list(),n},function(t){s.default.error("Error starting input '"+e.title+"': "+t,"Input '"+e.title+"' could not be started")})},stop:function(e){var t=this,n=l.default.qualifyUrl(c.default.ClusterInputStatesController.stop(e.id).url);return(0,h.default)("DELETE",n).then(function(n){return t._checkInputStateChangeResponse(e,n,"STOP"),t.list(),n},function(t){s.default.error("Error stopping input '"+e.title+"': "+t,"Input '"+e.title+"' could not be stopped")})}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),s=n(o),a=t(5),l=n(a),u=t(9),c=(n(u),t(3)),d=n(c),h=i.default.createStore({listenables:[],sourceUrl:function(e){return"/system/inputs/"+e+"/staticfields"},create:function(e,t,n){var r=this,i=l.default.qualifyUrl(this.sourceUrl(e.id)),o=(0,d.default)("POST",i,{key:t,value:n});return o.then(function(n){return r.trigger({}),s.default.success("Static field '"+t+"' added to '"+e.title+"' successfully"),n},function(t){s.default.error("Adding static field to input failed with: "+t,"Could not add static field to input '"+e.title+"'")}),o},destroy:function(e,t){var n=this,r=l.default.qualifyUrl(this.sourceUrl(e.id)+"/"+t),i=(0,d.default)("DELETE",r);return i.then(function(r){return n.trigger({}),s.default.success("Static field '"+t+"' removed from '"+e.title+"' successfully"),r},function(n){s.default.error("Removing static field from input failed with: "+n,"Could not remove static field '"+t+" from input '"+e.title+"'")}),i}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(3),l=n(a),u=t(6),c=n(u),d=t(8),h=n(d),f=h.default.getActions("InputTypes"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/inputs/types",inputTypes:void 0,inputDescriptions:void 0,init:function(){this.list()},getInitialState:function(){return{inputTypes:this.inputTypes,inputDescriptions:this.inputDescriptions}},list:function(){var e=this,t=(0,l.default)("GET",s.default.qualifyUrl(this.sourceUrl)),n=(0,l.default)("GET",s.default.qualifyUrl(this.sourceUrl+"/all")),r=Promise.all([t,n]);r.then(function(t){e.inputTypes=t[0].types,e.inputDescriptions=t[1],e.trigger(e.getInitialState())},function(e){c.default.error("Fetching Input Types failed with status: "+e,"Could not retrieve Inputs")}),f.list.promise(r)},get:function(e){var t=(0,l.default)("GET",s.default.qualifyUrl(this.sourceUrl+"/"+e));t.catch(function(t){c.default.error("Fetching input "+e+" failed with status: "+t,"Could not retrieve input")}),f.get.promise(t)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(6),l=n(a),u=t(3),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/journal"},get:function(e){var t=(0,c.default)("GET",s.default.qualifyUrl(this.sourceUrl(e)));return t.catch(function(t){l.default.error("Getting journal information on node "+e+" failed: "+t,"Could not get journal information")}),t}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(6),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("LdapGroups"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/ldap",groups:void 0,mapping:void 0,getInitialState:function(){return{groups:this.groups,mapping:this.mapping}},loadGroups:function(){var e=this,t=s.default.qualifyUrl(this.sourceUrl+"/groups"),n=(0,c.default)("GET",t);n.then(function(t){e.groups=t,e.trigger({groups:e.groups})},function(e){400!==e.additional.status&&l.default.error("Loading LDAP group list failed with status: "+e,"Could not load LDAP group list")}),f.loadGroups.promise(n)},loadMapping:function(){var e=this,t=s.default.qualifyUrl(this.sourceUrl+"/settings/groups"),n=(0,c.default)("GET",t);n.then(function(t){e.mapping=t,e.trigger({mapping:e.mapping})},function(e){l.default.error("Loading LDAP group mapping failed with status: "+e,"Could not load LDAP group mapping")}),f.loadMapping.promise(n)},saveMapping:function(e){var t=this,n=s.default.qualifyUrl(this.sourceUrl+"/settings/groups"),r=(0,c.default)("PUT",n,e);r.then(function(){t.loadMapping(),l.default.success("LDAP group mapping successfully updated.")},function(e){l.default.error("Updating LDAP group mapping failed with status: "+e,"Could not update LDAP group mapping")}),f.saveMapping.promise(r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(6),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("Ldap"),p=i.default.createStore({listenables:[f],sourceUrl:"/system/ldap/",ldapSettings:void 0,getInitialState:function(){return{ldapSettings:this.ldapSettings}},loadSettings:function(){var e=this,t=s.default.qualifyUrl(this.sourceUrl+"/settings"),n=(0,c.default)("GET",t);n.then(function(t){e.ldapSettings=t,e.trigger({ldapSettings:t})}),f.loadSettings.promise(n)},update:function(e){var t=this,n=s.default.qualifyUrl(this.sourceUrl+"/settings"),r=(0,c.default)("PUT",n,e);r.then(function(){t.loadSettings(),l.default.success("LDAP settings saved successfully")},function(e){return l.default.error("Saving LDAP settings failed: "+e,"Could not save LDAP settings")}),f.update.promise(r)},_ldapTest:function(e){var t=s.default.qualifyUrl(this.sourceUrl+"/test");return(0,c.default)("POST",t,e)},testServerConnection:function(e){var t={test_connect_only:!0,ldap_uri:e.ldap_uri,system_username:e.system_username,system_password:e.system_password,use_start_tls:e.use_start_tls,trust_all_certificates:e.trust_all_certificates,active_directory:e.active_directory},n=this._ldapTest(t);f.testServerConnection.promise(n)},testLogin:function(e,t,n){var r={test_connect_only:!1,principal:t,password:n,ldap_uri:e.ldap_uri,system_username:e.system_username,system_password:e.system_password,use_start_tls:e.use_start_tls,trust_all_certificates:e.trust_all_certificates,active_directory:e.active_directory,search_base:e.search_base,search_pattern:e.search_pattern,group_search_base:e.group_search_base,group_id_attribute:e.group_id_attribute,group_search_pattern:e.group_search_pattern},i=this._ldapTest(r);f.testLogin.promise(i)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("Loggers"),p=i.default.createStore({listenables:[f],state:{availableLoglevels:["fatal","error","warn","info","debug","trace"]},init:function(){this.loggers(),this.subsystems()},getInitialState:function(){return this.state},loggers:function(){var e=this,t=s.default.qualifyUrl(l.default.ClusterLoggersResource.loggers().url),n=(0,c.default)("GET",t).then(function(t){return e.state.loggers=t,e.trigger(e.state),t});f.loggers.promise(n)},subsystems:function(){var e=this,t=s.default.qualifyUrl(l.default.ClusterLoggersResource.subsystems().url),n=(0,c.default)("GET",t).then(function(t){return e.state.subsystems=t,e.trigger(e.state),t});f.loggers.promise(n)},setSubsystemLoggerLevel:function(e,t,n){var r=this,i=s.default.qualifyUrl(l.default.ClusterLoggersResource.setSubsystemLoggerLevel(e,t,n).url),o=(0,c.default)("PUT",i);o.then(function(){r.init()}),f.setSubsystemLoggerLevel.promise(o)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),s=n(o),a=t(5),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("LookupTables"),p=i.default.createStore({listenables:[f],init:function(){this.pagination={page:1,per_page:10,total:0,count:0,query:null}},getInitialState:function(){return{pagination:this.pagination,errorStates:{tables:{},caches:{},dataAdapters:{}}}},reloadPage:function(){var e=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return f.reloadPage.promise(e),e},searchPaginated:function(e,t,n){var r=this,i=void 0;i=n?this._url("tables?page="+e+"&per_page="+t+"&query="+encodeURIComponent(n)+"&resolve=true"):this._url("tables?page="+e+"&per_page="+t+"&resolve=true");var o=(0,c.default)("GET",i);return o.then(function(e){r.pagination={count:e.count,total:e.total,page:e.page,per_page:e.per_page,query:e.query},r.trigger({tables:e.lookup_tables,caches:e.caches,dataAdapters:e.data_adapters,pagination:r.pagination})},this._errorHandler("Fetching lookup tables failed","Could not retrieve the lookup tables")),f.searchPaginated.promise(o),o},get:function(e){var t=this,n=this._url("tables/"+e+"?resolve=true"),r=(0,c.default)("GET",n);return r.then(function(e){var n=e.lookup_tables[0];t.trigger({table:n,cache:e.caches[n.cache_id],dataAdapter:e.data_adapters[n.data_adapter_id]})},this._errorHandler("Fetching lookup table "+e+" failed","Could not retrieve lookup table")),f.get.promise(r),r},create:function(e){var t=this._url("tables"),n=(0,c.default)("POST",t,e);return n.catch(this._errorHandler("Creating lookup table failed",'Could not create lookup table "'+e.name+'"')),f.create.promise(n),n},update:function(e){var t=this._url("tables/"+e.id),n=(0,c.default)("PUT",t,e);return n.catch(this._errorHandler("Updating lookup table failed",'Could not update lookup table "'+e.name+'"')),f.update.promise(n),n},delete:function(e){var t=this._url("tables/"+e),n=(0,c.default)("DELETE",t);return n.catch(this._errorHandler("Deleting lookup table failed",'Could not delete lookup table "'+e+'"')),f.delete.promise(n),n},getErrors:function(e,t,n){var r=this,i={};e&&(i.tables=e),t&&(i.caches=t),n&&(i.data_adapters=n);var o=(0,c.default)("POST",this._url("errorstates"),i);return o.then(function(e){r.trigger({errorStates:{tables:e.tables||{},caches:e.caches||{},dataAdapters:e.data_adapters||{}}})},this._errorHandler("Fetching lookup table error state failed.","Could not error states")),f.getErrors.promise(o),o},lookup:function(e,t){var n=this,r=(0,c.default)("GET",this._url("tables/"+e+"/query?key="+t));return r.then(function(e){n.trigger({lookupResult:e})},this._errorHandler("Lookup failed",'Could not lookup value for key "'+t+'" in lookup table "'+e+'"')),f.lookup.promise(r),r},purgeKey:function(e,t){var n=(0,c.default)("POST",this._url("tables/"+e.id+"/purge?key="+t));return n.then(function(){s.default.success('Purging cache key "'+t+'" for lookup table "'+e.name+'"',"Success!")},this._errorHandler('Could not purge cache for key "'+t+'" in lookup table "'+e.name+'"',"Failed!")),f.purgeKey.promise(n),n},purgeAll:function(e){var t=(0,c.default)("POST",this._url("tables/"+e.id+"/purge"));return t.then(function(){s.default.success('Purging cache for lookup table "'+e.name+'"',"Success!")},this._errorHandler('Could not purge cache for lookup table "'+e.name+'"',"Failed!")),f.purgeAll.promise(t),t},validate:function(e){var t=this,n=this._url("tables/validate"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({validationErrors:e.errors})},this._errorHandler("Lookup table validation failed",'Could not validate lookup table "'+e.name+'"')),f.validate.promise(r),r},_errorHandler:function(e,t,n){return function(r){try{if(r.additional.body[0].message_template)return}catch(e){}var i=void 0;try{i=r.additional.body.message}catch(e){i=r.message}s.default.error(e+": "+i,t),n&&n(r)}},_url:function(e){return l.default.qualifyUrl("/system/lookup/"+e)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),s=n(o),a=t(5),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("LookupTableCaches"),p=i.default.createStore({listenables:[f],init:function(){this.pagination={page:1,per_page:10,total:0,count:0,query:null}},getInitialState:function(){return{caches:void 0,pagination:this.pagination,validationErrors:{}}},reloadPage:function(){var e=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return f.reloadPage.promise(e),e},searchPaginated:function(e,t,n){var r=this,i=void 0;i=n?this._url("caches?page="+e+"&per_page="+t+"&query="+encodeURIComponent(n)):this._url("caches?page="+e+"&per_page="+t);var o=(0,c.default)("GET",i);return o.then(function(e){r.pagination={count:e.count,total:e.total,page:e.page,per_page:e.per_page,query:e.query},r.trigger({pagination:r.pagination,caches:e.caches})},this._errorHandler("Fetching lookup table caches failed","Could not retrieve the lookup caches")),f.searchPaginated.promise(o),o},get:function(e){var t=this,n=this._url("caches/"+e),r=(0,c.default)("GET",n);return r.then(function(e){t.trigger({cache:e})},this._errorHandler("Fetching lookup table cache "+e+" failed","Could not retrieve lookup table cache")),f.get.promise(r),r},create:function(e){var t=this,n=this._url("caches"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({cache:e})},this._errorHandler("Creating lookup table cache failed",'Could not create lookup table cache "'+e.name+'"')),f.create.promise(r),r},update:function(e){var t=this,n=this._url("caches/"+e.id),r=(0,c.default)("PUT",n,e);return r.then(function(e){t.trigger({cache:e})},this._errorHandler("Updating lookup table cache failed",'Could not update lookup table cache "'+e.name+'"')),f.update.promise(r),r},getTypes:function(){var e=this,t=this._url("types/caches"),n=(0,c.default)("GET",t);return n.then(function(t){e.trigger({types:t})},this._errorHandler("Fetching available types failed","Could not fetch the available lookup table cache types")),f.getTypes.promise(n),n},delete:function(e){var t=this._url("caches/"+e),n=(0,c.default)("DELETE",t);return n.catch(this._errorHandler("Deleting lookup table cache failed",'Could not delete lookup table cache "'+e+'"')),f.delete.promise(n),n},validate:function(e){var t=this,n=this._url("caches/validate"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({validationErrors:e.errors})},this._errorHandler("Lookup table cache validation failed",'Could not validate lookup table cache "'+e.name+'"')),f.validate.promise(r),r},_errorHandler:function(e,t,n){return function(r){var i=void 0;try{i=r.additional.body.message}catch(e){i=r.message}s.default.error(e+": "+i,t),n&&n(r)}},_url:function(e){return l.default.qualifyUrl("/system/lookup/"+e)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(6),s=n(o),a=t(5),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("LookupTableDataAdapters"),p=i.default.createStore({listenables:[f],init:function(){this.pagination={page:1,per_page:10,total:0,count:0,query:null}},getInitialState:function(){return{dataAdapters:void 0,pagination:this.pagination,validationErrors:{}}},reloadPage:function(){var e=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return f.reloadPage.promise(e),e},searchPaginated:function(e,t,n){var r=this,i=void 0;i=n?this._url("adapters?page="+e+"&per_page="+t+"&query="+encodeURIComponent(n)):this._url("adapters?page="+e+"&per_page="+t);var o=(0,c.default)("GET",i);return o.then(function(e){r.pagination={count:e.count,total:e.total,page:e.page,per_page:e.per_page,query:e.query},r.trigger({pagination:r.pagination,dataAdapters:e.data_adapters})},this._errorHandler("Fetching lookup table data adapters failed","Could not retrieve the lookup dataAdapters")),f.searchPaginated.promise(o),o},get:function(e){var t=this,n=this._url("adapters/"+e),r=(0,c.default)("GET",n);return r.then(function(e){t.trigger({dataAdapter:e})},this._errorHandler("Fetching lookup table data adapter "+e+" failed","Could not retrieve lookup table data adapter")),f.get.promise(r),r},create:function(e){var t=this,n=this._url("adapters"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({dataAdapter:e})},this._errorHandler("Creating lookup table data adapter failed",'Could not create lookup table data adapter "'+e.name+'"')),f.create.promise(r),r},update:function(e){var t=this,n=this._url("adapters/"+e.id),r=(0,c.default)("PUT",n,e);return r.then(function(e){t.trigger({dataAdapter:e})},this._errorHandler("Updating lookup table data adapter failed",'Could not update lookup table data adapter "'+e.name+'"')),f.update.promise(r),r},getTypes:function(){var e=this,t=this._url("types/adapters"),n=(0,c.default)("GET",t);return n.then(function(t){e.trigger({types:t})},this._errorHandler("Fetching available types failed","Could not fetch the available lookup table data adapter types")),f.getTypes.promise(n),n},delete:function(e){var t=this._url("adapters/"+e),n=(0,c.default)("DELETE",t);return n.catch(this._errorHandler("Deleting lookup table data adapter failed",'Could not delete lookup table data adapter "'+e+'"')),f.delete.promise(n),n},lookup:function(e,t){var n=this,r=(0,c.default)("GET",this._url("adapters/"+e+"/query?key="+t));return r.then(function(e){n.trigger({lookupResult:e})},this._errorHandler("Lookup failed",'Could not lookup value for key "'+t+'" in lookup table data adapter "'+e+'"')),f.lookup.promise(r),r},validate:function(e){var t=this,n=this._url("adapters/validate"),r=(0,c.default)("POST",n,e);return r.then(function(e){t.trigger({validationErrors:e.errors})},this._errorHandler("Lookup table data adapter validation failed",'Could not validate lookup table data adapter "'+e.name+'"')),f.validate.promise(r),r},_errorHandler:function(e,t,n){return function(r){var i=void 0;try{i=r.additional.body.message}catch(e){i=r.message}s.default.error(e+": "+i,t),n&&n(r)}},_url:function(e){return l.default.qualifyUrl("/system/lookup/"+e)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("MessageCounts"),p=i.default.createStore({listenables:[f],events:void 0,init:function(){this.total()},total:function(){var e=this,t=s.default.qualifyUrl(l.default.CountsApiController.total().url),n=(0,c.default)("GET",t).then(function(t){return e.events=t.events,e.trigger({events:t.events}),t.events});return f.total.promise(n),n}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(140),s=n(o),a=t(5),l=n(a),u=t(9),c=n(u),d=t(3),h=n(d),f=i.default.createStore({listenables:[],fields:void 0,init:function(){this.list()},getInitialState:function(){return{fields:this.fields}},list:function(){var e=this,t=l.default.qualifyUrl(c.default.MessageFieldsApiController.list().url);return(0,h.default)("GET",t).then(function(t){var n=t.fields.map(function(e){return{hash:(0,s.default)(e),name:e,standard_selected:"message"===e||"source"===e}});return e.fields=n,e.trigger(e.getInitialState()),n})}});exports.default=f,e.exports=exports.default},function(e,exports){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}};e.exports=n}()},function(e,exports){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh
* @license MIT
*/
e.exports=function(e){return null!=e&&(t(e)||n(e)||!!e._isBuffer)}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(3),s=n(o),a=t(93),l=n(a),u=t(9),c=n(u),d=t(5),h=n(d),f=t(6),p=n(f),g=t(27),m=n(g),v=t(8),y=n(v),b=y.default.getActions("Messages"),_=i.default.createStore({listenables:[b],sourceUrl:"",getInitialState:function(){return{}},loadMessage:function(e,t){var n=c.default.MessagesController.single(e.trim(),t.trim()).url,r=(0,s.default)("GET",h.default.qualifyUrl(n)).then(function(e){return l.default.formatResultMessage(e)},function(e){p.default.error("Loading message information failed with status: "+e,"Could not load message information")});b.loadMessage.promise(r)},fieldTerms:function(e,t){var n=c.default.MessagesController.analyze(e,encodeURIComponent(m.default.stringify(t))).url,r=(0,s.default)("GET",h.default.qualifyUrl(n)).then(function(e){return e.tokens},function(e){p.default.error("Loading field terms failed with status: "+e,"Could not load field terms.")});b.fieldTerms.promise(r)},loadRawMessage:function(e,t,n,r){var i=c.default.MessagesController.parse().url,o={message:e,remote_address:t,codec:n,configuration:r},a=(0,s.default)("POST",h.default.qualifyUrl(i),o).then(function(e){return l.default.formatResultMessage(e)},function(e){if(e.additional&&400===e.additional.status)return void p.default.error("Please ensure the selected codec and its configuration are right. Check your server logs for more information.","Could not load raw message");p.default.error("Loading raw message failed with status: "+e,"Could not load raw message")});b.loadRawMessage.promise(a)}});exports.default=_,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={FILTERED_FIELDS:["_id","_ttl","_source","_all","_index","_type","_score","gl2_source_node","gl2_source_input","gl2_source_collector","gl2_source_collector_input","gl2_remote_ip","gl2_remote_port","gl2_remote_hostname","streams","gl2_source_radio","gl2_source_radio_input"],filterFields:function(e){var t=this,n={};return Object.keys(e).forEach(function(r){t.FILTERED_FIELDS.indexOf(r)<0&&(n[r]=e[r])}),n}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(94),h=n(d),f=t(7),p=n(f),g=t(8),m=n(g),v=p.default.getStore("Session"),y=p.default.getStore("Nodes"),b=m.default.getActions("Session"),_=m.default.getActions("Metrics"),w=i.default.createStore({listenables:[_,b],namespace:"org",registrations:{},globalRegistrations:{},promises:{},init:function(){this.listenTo(y,this.updateNodes)},getInitialState:function(){return{metricsNames:this.metricsNames,metrics:this.metrics}},updateNodes:function(e){this.nodes=e.nodes},_allResults:function(e){var t=[],n=Promise.resolve(null);return e.forEach(function(e){n=n.then(function(){return e}).then(function(e){return t.push(e)},function(e){return t.push(e)})}),n.then(function(){return t})},_metricsToFetch:function(e,t){var n={};return Object.keys(e).filter(function(t){return Object.keys(e[t].length>0)}).forEach(function(t){Object.keys(e[t]).filter(function(n){return e[t][n]>0}).forEach(function(e){n[e]=1})}),Object.keys(t).filter(function(e){return t[e]>0}).forEach(function(e){n[e]=1}),n},_buildMetricsFromResponse:function(e){var t={};return Object.keys(e).forEach(function(n){var r={};e[n]&&(e[n].metrics.forEach(function(e){r[e.full_name]=e}),t[n]=r)}),t},list:function(){var e=this;if(v.isLoggedIn()){var t=this._metricsToFetch(this.registrations,this.globalRegistrations),n=s.default.qualifyUrl(l.default.ClusterMetricsApiController.multipleAllNodes().url);if(!this.promises.list){var r=(0,u.fetchPeriodically)("POST",n,{metrics:Object.keys(t)}).finally(function(){return delete e.promises.list});r.then(function(t){return e.metrics=e._buildMetricsFromResponse(t),e.trigger({metrics:e.metrics,metricsUpdatedAt:h.default.nowInSeconds()}),e.metrics}),this.promises.list=r}return _.list.promise(this.promises.list),this.promises.list}},names:function(){var e=this;if(!this.nodes)return void console.warn("Node list not yet available, not fetching metrics.");var t=this._allResults(Object.keys(this.nodes).map(function(t){var n=s.default.qualifyUrl(l.default.ClusterMetricsApiController.byNamespace(t,e.namespace).url);return(0,c.default)("GET",n).then(function(e){return{nodeId:t,names:e.metrics}})})).then(function(t){var n={};return t.forEach(function(e){e.nodeId&&(n[e.nodeId]=e.names)}),e.trigger({metricsNames:n}),e.metricsNames=n,n});_.names.promise(t)},add:function(e,t){this.registrations[e]||(this.registrations[e]={}),this.registrations[e][t]=this.registrations[e][t]?this.registrations[e][t]+1:1},addGlobal:function(e){this.globalRegistrations[e]?this.globalRegistrations[e]+=1:this.globalRegistrations[e]=1},remove:function(e,t){this.registrations[e]&&(this.registrations[e][t]=this.registrations[e][t]>0?this.registrations[e][t]-1:0,0===this.registrations[e][t]&&delete this.registrations[e][t])},removeGlobal:function(e){this.globalRegistrations[e]&&(this.globalRegistrations[e]=this.globalRegistrations[e]>0?this.globalRegistrations[e]-1:0,0===this.globalRegistrations[e]&&delete this.globalRegistrations[e])}});exports.default=w,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(3),l=t(9),u=n(l),c=t(52),d=n(c),h=d.default.get("Nodes"),f=h.NodesActions,p=d.default.get("Session"),g=p.SessionStore,m=i.default.createStore({listenables:[f],nodes:void 0,clusterId:void 0,nodeCount:0,INTERVAL:5e3,promises:{},init:function(){void 0===this.nodes&&(this._triggerList(),setInterval(this._triggerList,this.INTERVAL))},_triggerList:function(){g.isLoggedIn()&&f.list()},getInitialState:function(){return this.getNodesInfo()},getNodesInfo:function(){return{nodes:this.nodes,clusterId:this.clusterId,nodeCount:this.nodeCount}},list:function(){var e=this,t=this.promises.list||(0,a.fetchPeriodically)("GET",s.default.qualifyUrl(u.default.ClusterApiResource.list().url)).then(function(t){return e.nodes={},t.nodes.forEach(function(t){e.nodes[t.node_id]=t}),e.clusterId=e._clusterId(),e.nodeCount=e._nodeCount(),e._propagateState(),t}).finally(function(){return delete e.promises.list});this.promises.list=t,f.list.promise(t)},getNode:function(e){return this.nodes[e]},_clusterId:function(){var e=this,t=Object.keys(this.nodes).map(function(t){return e.nodes[t]}).find(function(e){return e.cluster_id});return t?t.cluster_id.toUpperCase():void 0},_nodeCount:function(){return Object.keys(this.nodes).length},_propagateState:function(){this.trigger(this.getNodesInfo())}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("Notifications"),p=i.default.createStore({listenables:[f],notifications:void 0,promises:{},init:function(){this.list()},getInitialState:function(){return this.notifications?this.notifications:{}},list:function(){var e=this,t=s.default.qualifyUrl(l.default.NotificationsApiController.list().url),n=this.promises.list||(0,u.fetchPeriodically)("GET",t).finally(function(){return delete e.promises.list});this.promises.list=n,f.list.promise(n)},listCompleted:function(e){this.notifications=e,this.trigger(e)},delete:function(e){var t=s.default.qualifyUrl(l.default.NotificationsApiController.delete(e).url),n=(0,c.default)("DELETE",t);f.delete.promise(n)},deleteCompleted:function(){this.list()}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(6),r=t(5),i=t(9),o=t(3).default,s={OUTPUTS_URL:r.qualifyUrl(i.OutputsApiController.index().url),load:function(e){o("GET",this.OUTPUTS_URL).then(e,this._failCallback)},loadForStreamId:function(e,t){var n=r.qualifyUrl(i.StreamOutputsApiController.index(e).url);o("GET",n).then(t,this._failCallback)},loadAvailableTypes:function(e){var t=r.qualifyUrl(i.OutputsApiController.availableTypes().url);o("GET",t).then(e,this._failCallback)},loadAvailable:function(e,t){var n=r.qualifyUrl(i.OutputsApiController.availableTypes().url);o("GET",n).then(function(t){return t.types[e]},this._failCallback).then(t)},remove:function(e,t){var s=r.qualifyUrl(i.OutputsApiController.delete(e).url);o("DELETE",s).then(t,function(e){n.error("Terminating output failed with status: "+e,"Could not terminate output")})},save:function(e,t){var s=function(t){n.error('Saving Output "'+e.title+'" failed with status: '+t,"Could not save Output")},a=r.qualifyUrl(i.OutputsApiController.create().url);o("POST",a,e).then(t,s)},update:function(e,t,s){var a=function(t){n.error('Updating Output "'+e.title+'" failed with status: '+t,"Could not update Output")},l=r.qualifyUrl(i.OutputsApiController.update(e.id).url);o("PUT",l,t).then(s,a)},_failCallback:function(e){n.error("Loading outputs failed with status: "+e,"Could not load outputs")}};e.exports=s},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(6),l=n(a),u=t(3),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/plugins"},list:function(e){return(0,c.default)("GET",s.default.qualifyUrl(this.sourceUrl(e))).then(function(e){return e.plugins},function(t){return l.default.error('Getting plugins on node "'+e+'" failed: '+t,"Could not get plugins")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(6),r=t(5),i=t(3).default,o={URL:r.qualifyUrl("/users/"),convertPreferenceMapToArray:function(e){e=e||{};var t=Object.keys(e).map(function(t){return{name:t,value:e[t]}});return t=t.sort(function(e,t){return e.name.localeCompare(t.name)})},convertPreferenceArrayToMap:function(e){var t={};return e.forEach(function(e){t[e.name]=!0===e.value||"true"===e.value}),t},saveUserPreferences:function(e,t){var r=this;if(!this._userName)throw new Error("Need to load user preferences before you can save them");var o=this.convertPreferenceArrayToMap(e),s=this.URL+this._userName+"/preferences";i("PUT",s,{preferences:o}).then(function(){n.success("User preferences successfully saved"),t(e)},function(e){n.error('Saving of preferences for "'+r._userName+'" failed with status: '+e,"Could not save user preferences")})},loadUserPreferences:function(e,t){var r=this;this._userName=e;var o=this.URL+e,s=function(e){var n=r.convertPreferenceMapToArray(e.preferences);t(n)},a=function(t){n.error('Loading of user preferences for "'+e+'" failed with status: '+t+". Try reloading the page","Could not retrieve user preferences from server")};i("GET",o).then(s,a)}};e.exports=o},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(8),s=n(o),a=s.default.getActions("Refresh"),l=i.default.createStore({listenables:[a],interval:5e3,enabled:!1,getInitialState:function(){return{interval:this.interval,enabled:this.enabled}},changeInterval:function(e){this.interval=e,this._update()},disable:function(){this.enabled=!1,this._update()},enable:function(){this.enabled=!0,this._update()},_update:function(){this.trigger(this.getInitialState())}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(6),r=t(5),i=t(9),o=t(3).default,s={loadRoles:function(){return o("GET",r.qualifyUrl(i.RolesApiController.listRoles().url)).then(function(e){return e.roles},function(e){404!==e.additional.status&&n.error("Loading role list failed with status: "+e,"Could not load role list")})},createRole:function(e){var t=r.qualifyUrl(i.RolesApiController.createRole().url),s=o("POST",t,e);return s.then(function(e){n.success('Role "'+e.name+'" was created successfully')},function(t){n.error('Creating role "'+e.name+'" failed with status: '+t,"Could not create role")}),s},updateRole:function(e,t){var s=o("PUT",r.qualifyUrl(i.RolesApiController.updateRole(encodeURIComponent(e)).url),t);return s.then(function(e){n.success('Role "'+e.name+'" was updated successfully')},function(e){404!==e.additional.status&&n.error("Updating role failed with status: "+e,"Could not update role")}),s},deleteRole:function(e){var t=r.qualifyUrl(i.RolesApiController.deleteRole(encodeURIComponent(e)).url),s=o("DELETE",t);return s.then(function(){n.success('Role "'+e+'" was deleted successfully')},function(e){404!==e.additional.status&&n.error("Deleting role failed with status: "+e,"Could not delete role")}),s},getMembers:function(e){var t=r.qualifyUrl(i.RolesApiController.loadMembers(encodeURIComponent(e)).url),s=o("GET",t);return s.catch(function(e){404!==e.additional.status&&n.error("Could not load role's members with status: "+e,"Could not load role members")}),s}};e.exports=s},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(63),s=n(o),a=t(3),l=n(a),u=t(9),c=n(u),d=t(14),h=n(d),f=t(8),p=n(f),g=t(7),m=n(g),v=t(5),y=n(v),b=t(6),_=n(b),w=p.default.getActions("SavedSearches"),A=m.default.getStore("Search"),C=i.default.createStore({listenables:[w],sourceUrl:"/search/saved",savedSearches:void 0,init:function(){this.trigger({savedSearches:this.savedSearches})},list:function(){var e=this,t=(0,l.default)("GET",y.default.qualifyUrl(y.default.concatURLPath(this.sourceUrl))).then(function(t){return e.savedSearches=t.searches,e.trigger({savedSearches:e.savedSearches}),t},function(e){_.default.error("Fetching saved searches failed with status: "+e,"Could not get saved searches")});w.list.promise(t)},getSavedSearch:function(e){for(var t=void 0,n=0;n0?e:"*"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){void 0===this._page?this._page=e:this._reloadSearchWithNewParam("page",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeType",{get:function(){return this._rangeType},set:function(e){this._rangeType=e,this.rangeParams=this.originalSearch.get("rangeType")===e?this.originalSearch.get("rangeParams"):n.Map(),void 0!==this.onParamsChanged&&this.onParamsChanged(this.getParams())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalRangeType",{get:function(){return this.originalSearch.get("rangeType")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeParams",{get:function(){return this._rangeParams},set:function(e){this._rangeParams=e,void 0!==this.onParamsChanged&&this.onParamsChanged(this.getParams())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalRangeParams",{get:function(){return this.originalSearch.get("rangeParams")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(e){void 0===this._resolution?this._resolution=e:this._reloadSearchWithNewParam("interval",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return this._fields},set:function(e){this._fields=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"highlightMessage",{get:function(){return this._highlightMessage},set:function(e){this._highlightMessage=e},enumerable:!0,configurable:!0}),e.prototype.sort=function(e,t){this._reloadSearchWithNewParams(n.Map({sortField:e,sortOrder:t}))},e._initializeOriginalSearch=function(e){var t=n.Map();t=t.set("query",e.get("q","")),t=t.set("resolution",e.get("interval")),t=t.set("page",Math.max(e.get("page",1),1)),t=t.set("rangeType",e.get("rangetype","relative")),t=t.set("sortField",e.get("sortField","timestamp")),t=t.set("sortOrder",e.get("sortOrder","desc")),t=t.set("highlightMessage",e.get("highlightMessage","")),void 0!==e.get("saved")&&(t=t.set("saved",e.get("saved")));var r;switch(t.get("rangeType")){case"relative":r=n.Map({relative:Number(e.get("relative",300))});break;case"absolute":r=n.Map({from:e.get("from",null),to:e.get("to",null)});break;case"keyword":r=n.Map({keyword:e.get("keyword","")});break;default:throw"Unsupported range type "+t.get("rangeType")}return t.set("rangeParams",r)},e.prototype.addSearchTerm=function(t,n,r){var i=n;if("timestamp"===t){i=new a(n).toTimeZone("UTC").toString(a.Formats.TIMESTAMP)}var o=t+":"+e.escape(i),s=r||e.AND_OPERATOR;this.addQueryTerm(o,s)},e.prototype.changeTimeRange=function(e,t){this.rangeType=e,this.rangeParams=n.fromJS(t)},e.prototype._submitSearch=function(e){void 0!==this.onSubmitSearch&&this.onSubmitSearch()},e.prototype.savedSearchDeleted=function(e){e===this.savedSearch&&this._submitSearch(null)},e.isPhrase=function(e){return-1!==String(e).indexOf(" ")},e.escape=function(e){var t=String(e);return t=t.replace(/\r\n/g," "),t=t.replace(/\n/g," "),t=t.replace(/ /g," "),this.isPhrase(t)?(t=String(t).replace(/\"/g,'\\"'),t='"'+t+'"'):t=String(t).replace(/(&&|\|\||[\:\\\/\+\-\!\(\)\{\}\[\]\^\"\~\*\?])/g,"\\$&"),t},e.prototype.queryContainsTerm=function(e){return-1!=this.query.indexOf(e)},e.prototype.addQueryTerm=function(e,t){if(!this.queryContainsTerm(e)){var n="";void 0!==t&&""!==this.query&&"*"!==this.query&&(n=this.query+" "+t+" "),n+=e,this.query=n,void 0!==this.onAddQueryTerm&&this.onAddQueryTerm()}},e.prototype.getParams=function(){return{query:this.query,rangeType:this.rangeType,rangeParams:this.rangeParams}},e.prototype.getOriginalSearchParams=function(){var e=n.Map();return e=e.set("range_type",this.originalSearch.get("rangeType")),e=e.merge(this.originalSearch.get("rangeParams")),e=e.set("query",this.originalSearch.get("query")),e=e.set("interval",this.originalSearch.get("resolution")),this.searchInStream&&(e=e.set("streamId",this.searchInStream.id)),e},e.prototype.getOriginalSearchParamsWithFields=function(){var e=this.getOriginalSearchParams();return e=e.set("fields",this.fields.join(","))},e.prototype.getOriginalSearchURLParams=function(){var e=n.Map();return e=e.set("rangetype",this.originalSearch.get("rangeType")),e=e.merge(this.originalSearch.get("rangeParams")),e=e.set("q",this.originalSearch.get("query")),e=e.set("interval",this.originalSearch.get("resolution")),e=e.set("page",this.originalSearch.get("page")),e=e.set("fields",this.fields?this.fields.join(","):""),e=e.set("sortField",this.originalSearch.get("sortField")),e=e.set("sortOrder",this.originalSearch.get("sortOrder")),this.originalSearch.has("saved")&&(e=e.set("saved",this.originalSearch.get("saved"))),e},e.prototype.searchBaseLocation=function(e){return this.searchInStream?r.stream_search(this.searchInStream.id):r.SEARCH},e.prototype._reloadSearchWithNewParam=function(e,t){var n=this.getOriginalSearchURLParams();n=n.set("width",this.width),n=n.set(e,t),this.executeSearch(this.searchBaseLocation("index")+"?"+i.stringify(n.toJS()))},e.prototype._reloadSearchWithNewParams=function(e){var t=this.getOriginalSearchURLParams();t=t.set("width",this.width),t=t.merge(e),this.executeSearch(this.searchBaseLocation("index")+"?"+i.stringify(t.toJS()))},e.prototype.executeSearch=function(e){s.pushState(null,e)},e.prototype.searchSurroundingMessages=function(t,n,r,o){var s=this.getOriginalSearchParamsWithFields().toJS(),a=Object.keys(o).filter(function(e){return o[e]}).map(function(t){return t+':"'+e.escape(o[t])+'"'}).join(" AND "),l={rangetype:"absolute",from:n,to:r,q:a,highlightMessage:t,fields:s.fields};return this.searchBaseLocation("index")+"?"+i.stringify(l)},e.NOT_OPERATOR="NOT",e.OR_OPERATOR="OR",e.AND_OPERATOR="AND",e}(),u=new l;e.exports=u},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=t(8),d=n(c),h=d.default.getActions("ServerAvailability"),f=i.default.createStore({listenables:[h],server:{up:!0},init:function(){this.ping()},getInitialState:function(){return{server:this.server}},ping:function(){return new u.Builder("GET",s.default.qualifyUrl(l.default.ping().url)).setHeader("Accept","application/json").setHeader("X-Graylog-No-Session-Extension","true").build().then(function(){return h.reportSuccess()},function(e){return h.reportError(e)})},reportError:function(e){this.server.up&&(this.server={up:!1,error:e},this.trigger({server:this.server}))},reportSuccess:function(){this.server.up||(this.server={up:!0},this.trigger({server:this.server}))}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(135),s=n(o),a=t(5),l=n(a),u=t(9),c=n(u),d=t(3),h=t(8),f=n(h),p=f.default.getActions("Session"),g=i.default.createStore({listenables:[p],sourceUrl:"/system/sessions",sessionId:void 0,username:void 0,validatingSession:!1,init:function(){this.validate()},getInitialState:function(){return this.getSessionInfo()},login:function(e,t,n){var r=new d.Builder("POST",l.default.qualifyUrl(this.sourceUrl)).json({username:e,password:t,host:n}),i=r.build().then(function(t){return{sessionId:t.session_id,username:e}});p.login.promise(i)},logout:function(e){var t=this,n=new d.Builder("DELETE",l.default.qualifyUrl(this.sourceUrl+"/"+e)).authenticated().build().then(function(e){(e.ok||401===e.status)&&t._removeSession()},this._removeSession);p.logout.promise(n)},validate:function(){var e=this,t=s.default.get("sessionId"),n=s.default.get("username");this.validatingSession=!0,this._propagateState(),this._validateSession(t).then(function(r){return r.is_valid?p.login.completed({sessionId:t||r.session_id,username:n||r.username}):(t&&n&&e._removeSession(),r)}).finally(function(){e.validatingSession=!1,e._propagateState()})},_validateSession:function(e){return new d.Builder("GET",l.default.qualifyUrl(c.default.SessionsApiController.validate().url)).session(e).json().build()},_removeSession:function(){s.default.delete("sessionId"),s.default.delete("username"),this.sessionId=void 0,this.username=void 0,this._propagateState()},_propagateState:function(){this.trigger(this.getSessionInfo())},loginCompleted:function(e){s.default.set("sessionId",e.sessionId),s.default.set("username",e.username),this.sessionId=e.sessionId,this.username=e.username,this._propagateState()},isLoggedIn:function(){return void 0!==this.sessionId&&null!==this.sessionId},getSessionId:function(){return this.sessionId},getSessionInfo:function(){return{sessionId:this.sessionId,username:this.username,validatingSession:this.validatingSession}}});exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(3),l=n(a),u=t(8),c=n(u),d=c.default.getActions("SingleNode"),h=i.default.createStore({listenables:[d],sourceUrl:"/system/cluster/node",node:void 0,init:function(){this._propagateState()},getInitialState:function(){return this._getNodeInfo()},_getNodeInfo:function(){return{node:this.node}},_propagateState:function(){this.trigger(this._getNodeInfo())},get:function(e){var t=this,n=(0,l.default)("GET",s.default.qualifyUrl(e?s.default.concatURLPath(this.sourceUrl,e):this.sourceUrl)).then(function(e){t.node=e,t._propagateState()});d.get.promise(n)}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";var $=t(12),n=t(6),r=t(5),i=t(27),o=t(3).default,s=function(e){var t=0,n=[];return $.each(e,function(e,r){t+=Number(r),n.push({name:i.escapeHTML(e),message_count:r})}),n.forEach(function(e){e.percentage=e.message_count/t*100}),n},a={SOURCES_URL:"/sources",loadSources:function(e,t){var i=r.qualifyUrl(this.SOURCES_URL);void 0!==e&&(i+="?range="+e),o("GET",i).then(function(e){var n=s(e.sources);t(n)}).catch(function(e){n.error("Loading of sources data failed with status: "+e+". Try reloading the page.","Could not load sources data")})}};e.exports=a},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(9),s=n(o),a=t(6),l=n(a),u=t(5),c=n(u),d=t(3),h=n(d),f=i.default.createStore({listenables:[],set:function(e,t,n){var r=this,i=c.default.qualifyUrl(s.default.UsersApiController.update(e).url),o={};return t&&n&&(o.type=t,o.id=n),(0,h.default)("PUT",i,{startpage:o}).then(function(e){return r.trigger(),l.default.success("Your start page was changed successfully"),e},function(e){return l.default.error("Changing your start page failed with error: "+e,"Could not change your start page")})}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(9),r=t(6),i=t(5),o=t(3).default,s=t(87),a=function(){function e(){this.callbacks=[]}return e.prototype.types=function(e){return o("GET",i.qualifyUrl("/streams/null/rules/types"))},e.prototype.list=function(e,t){var s=function(e){r.error("Fetching Stream Rules failed with status: "+e,"Could not retrieve Stream Rules")};o("GET",i.qualifyUrl(n.StreamRulesApiController.list(e).url)).then(t,s)},e.prototype.update=function(e,t,s,a){var l=function(e){r.error("Updating Stream Rule failed with status: "+e,"Could not update Stream Rule")},u=i.qualifyUrl(n.StreamRulesApiController.update(e,t).url),c={field:s.field,type:s.type,value:s.value,inverted:s.inverted,description:s.description};o("PUT",u,c).then(a,l).then(this._emitChange.bind(this))},e.prototype.remove=function(e,t,s){var a=function(e){r.error("Deleting Stream Rule failed with status: "+e,"Could not delete Stream Rule")},l=i.qualifyUrl(n.StreamRulesApiController.delete(e,t).url);o("DELETE",l).then(s,a).then(this._emitChange.bind(this))},e.prototype.create=function(e,t,s){var a=function(e){r.error("Creating Stream Rule failed with status: "+e,"Could not create Stream Rule")},l=i.qualifyUrl(n.StreamRulesApiController.create(e).url);o("POST",l,t).then(s,a).then(this._emitChange.bind(this))},e.prototype.onChange=function(e){this.callbacks.push(e)},e.prototype._emitChange=function(){this.callbacks.forEach(function(e){return e()})},e.prototype.unregister=function(e){s.pull(this.callbacks,e)},e}(),l=new a;e.exports=l},function(e,exports,t){"use strict";var n=t(6),r=t(5),i=t(9),o=t(3).default,s=t(87),a=function(){function e(){this.callbacks=[]}return e.prototype.listStreams=function(){return o("GET",r.qualifyUrl("/streams")).then(function(e){return e.streams}).catch(function(e){n.error("Loading streams failed with status: "+e,"Could not load streams")})},e.prototype.load=function(e){this.listStreams().then(function(t){e(t)})},e.prototype.get=function(e,t){var s=function(e){n.error("Loading Stream failed with status: "+e,"Could not retrieve Stream")},a=i.StreamsApiController.get(e).url;o("GET",r.qualifyUrl(a)).then(t,s)},e.prototype.remove=function(e,t){var s=function(e){n.error("Removing Stream failed with status: "+e,"Could not remove Stream")},a=r.qualifyUrl(i.StreamsApiController.delete(e).url);o("DELETE",a).then(t,s).then(this._emitChange.bind(this))},e.prototype.pause=function(e,t){var s=this,a=function(e){n.error("Pausing Stream failed with status: "+e,"Could not pause Stream")},l=r.qualifyUrl(i.StreamsApiController.pause(e).url);return o("POST",l).then(t,a).then(function(e){return s._emitChange(),e})},e.prototype.resume=function(e,t){var s=this,a=function(e){n.error("Resuming Stream failed with status: "+e,"Could not resume Stream")},l=r.qualifyUrl(i.StreamsApiController.resume(e).url);return o("POST",l).then(t,a).then(function(e){return s._emitChange(),e})},e.prototype.save=function(e,t){var s=function(e){n.error("Saving Stream failed with status: "+e,"Could not save Stream")},a=r.qualifyUrl(i.StreamsApiController.create().url);o("POST",a,e).then(t,s).then(this._emitChange.bind(this))},e.prototype.update=function(e,t,s){var a=function(e){n.error("Updating Stream failed with status: "+e,"Could not update Stream")},l=r.qualifyUrl(i.StreamsApiController.update(e).url);o("PUT",l,t).then(s,a).then(this._emitChange.bind(this))},e.prototype.cloneStream=function(e,t,s){var a=function(e){n.error("Cloning Stream failed with status: "+e,"Could not clone Stream")},l=r.qualifyUrl(i.StreamsApiController.cloneStream(e).url);o("POST",l,t).then(s,a).then(this._emitChange.bind(this))},e.prototype.removeOutput=function(e,t,s){var a=r.qualifyUrl(i.StreamOutputsApiController.delete(e,t).url);o("DELETE",a).then(s,function(e){n.error("Removing output from stream failed with status: "+e,"Could not remove output from stream")}).then(this._emitChange.bind(this))},e.prototype.addOutput=function(e,t,s){var a=r.qualifyUrl(i.StreamOutputsApiController.add(e,t).url);o("POST",a,{outputs:[t]}).then(s,function(e){n.error("Adding output to stream failed with status: "+e,"Could not add output to stream")}).then(this._emitChange.bind(this))},e.prototype.testMatch=function(e,t,s){var a=r.qualifyUrl(i.StreamsApiController.testMatch(e).url);o("POST",a,t).then(s,function(e){n.error("Testing stream rules of stream failed with status: "+e.message,"Could not test stream rules of stream")})},e.prototype.onChange=function(e){this.callbacks.push(e)},e.prototype._emitChange=function(){this.callbacks.forEach(function(e){return e()})},e.prototype.unregister=function(e){s.pull(this.callbacks,e)},e}(),l=new a;e.exports=l},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=i.default.createStore({system:void 0,locales:void 0,init:function(){var e=this;this.info().then(function(t){e.trigger({system:t}),e.system=t}),this.systemLocales().then(function(t){e.trigger({locales:t}),e.locales=t.locales})},getInitialState:function(){return{system:this.system,locales:this.locales}},info:function(){var e=s.default.qualifyUrl(l.default.SystemApiController.info().url);return(0,c.default)("GET",e)},jvm:function(){var e=s.default.qualifyUrl(l.default.SystemApiController.jvm().url);return(0,c.default)("GET",e)},systemLocales:function(){var e=s.default.qualifyUrl(l.default.SystemApiController.locales().url);return(0,c.default)("GET",e)}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=n(u),d=t(8),h=n(d),f=h.default.getActions("SystemJobs"),p=i.default.createStore({listenables:[f],jobsById:{},getInitialState:function(){return{jobs:this.jobs,jobsById:this.jobsById}},list:function(){var e=this,t=s.default.qualifyUrl(l.default.SystemJobsApiController.list().url),n=(0,u.fetchPeriodically)("GET",t).then(function(t){return e.jobs=t,e.trigger({jobs:t}),t});f.list.promise(n)},getJob:function(e){var t=this,n=s.default.qualifyUrl(l.default.SystemJobsApiController.getJob(e).url),r=(0,c.default)("GET",n).then(function(e){return t.jobsById[e.id]=e,t.trigger({jobsById:t.jobsById}),e},function(){delete t.jobsById[e],t.trigger({jobsById:t.jobsById})});f.getJob.promise(r)},cancelJob:function(e){var t=this,n=s.default.qualifyUrl(l.default.SystemJobsApiController.cancelJob(e).url),r=(0,c.default)("DELETE",n).then(function(e){delete t.jobsById[e.id]});f.cancelJob.promise(r)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(6),l=n(a),u=t(3),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/lbstatus"},override:function(e,t){var n=this;return(0,c.default)("PUT",s.default.qualifyUrl(this.sourceUrl(e)+"/override/"+t)).then(function(){n.trigger({}),l.default.success("Load balancer status successfully changed do '"+t+"' in node '"+e+"'")},function(n){l.default.error("Changing load balancer status in '"+e+"' failed: "+n,"Could not change load balancer status to '"+t+"' in node '"+e+"'")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(9),l=n(a),u=t(3),c=i.default.createStore({listenables:[],all:function(e){var t=s.default.qualifyUrl(l.default.SystemMessagesApiController.all(e).url);return(0,u.fetchPeriodically)("GET",t)}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(6),l=n(a),u=t(3),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/processing"},pause:function(e){var t=this;return(0,c.default)("POST",s.default.qualifyUrl(this.sourceUrl(e)+"/pause")).then(function(){t.trigger({}),l.default.success("Message processing paused successfully in '"+e+"'")},function(t){l.default.error("Pausing message processing in '"+e+"' failed: "+t,"Could not pause message processing in node '"+e+"'")})},resume:function(e){var t=this;return(0,c.default)("POST",s.default.qualifyUrl(this.sourceUrl(e)+"/resume")).then(function(){t.trigger({}),l.default.success("Message processing resumed successfully in '"+e+"'")},function(t){l.default.error("Resuming message processing in '"+e+"' failed: "+t,"Could not resume message processing in node '"+e+"'")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(5),s=n(o),a=t(6),l=n(a),u=t(3),c=n(u),d=i.default.createStore({sourceUrl:function(e){return"/cluster/"+e+"/shutdown"},shutdown:function(e){var t=this;return(0,c.default)("POST",s.default.qualifyUrl(this.sourceUrl(e))).then(function(){t.trigger({}),l.default.success("Node '"+e+"' will shutdown shortly")},function(t){l.default.error("Shutting down node '"+e+"' failed: "+t,"Could not send shutdown signal to node '"+e+"'")})}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(9),r=t(5),i=t(6),o=t(3).default,s={testNaturalDate:function(e){var t=n.ToolsApiController.naturalDateTest(e).url,s=o("GET",r.qualifyUrl(t));return s.catch(function(e){422!==e.additional.status&&i.error("Loading keyword preview failed with status: "+e,"Could not load keyword preview")}),s},testGrok:function(e,t,s){var a=n.ToolsApiController.grokTest().url,l=o("POST",r.qualifyUrl(a),{pattern:e,string:s,named_captures_only:t});return l.catch(function(e){i.error("Details: "+e,"We were not able to run the grok extraction. Please check your parameters.")}),l},testJSON:function(e,t,s,a,l,u,c,d){var h=n.ToolsApiController.jsonTest().url,f={flatten:e,list_separator:t,key_separator:s,kv_separator:a,replace_key_whitespace:l,key_whitespace_replacement:u,key_prefix:c,string:d},p=o("POST",r.qualifyUrl(h),f);return p.catch(function(e){i.error("Details: "+e,"We were not able to run the JSON extraction. Please check your parameters.")}),p},testRegex:function(e,t){var s=n.ToolsApiController.regexTest().url,a=o("POST",r.qualifyUrl(s),{regex:e,string:t});return a.catch(function(e){i.error("Details: "+e,"Could not try regular expression. Make sure that it is valid.")}),a},testRegexReplace:function(e,t,s,a){var l=n.ToolsApiController.regexReplaceTest().url,u={regex:e,replacement:t,replace_all:s,string:a},c=o("POST",r.qualifyUrl(l),u);return c.catch(function(e){i.error("Details: "+e,"Could not try regular expression. Make sure that it is valid.")}),c},testSplitAndIndex:function(e,t,s){var a=n.ToolsApiController.splitAndIndexTest().url,l={split_by:e,index:t,string:s},u=o("POST",r.qualifyUrl(a),l);return u.catch(function(e){i.error("Details: "+e,"We were not able to run the split and index extraction. Please check your parameters.")}),u},testSubstring:function(e,t,s){var a=n.ToolsApiController.substringTest().url,l={start:e,end:t,string:s},u=o("POST",r.qualifyUrl(a),l);return u.catch(function(e){i.error("Details: "+e,"We were not able to run the substring extraction. Please check index boundaries.")}),u},testContainsString:function(e,t){var s=n.ToolsApiController.containsStringTest().url,a=o("POST",r.qualifyUrl(s),{search_string:e,string:t});return a.catch(function(e){i.error("Details: "+e,"Could not check if field contains the string")}),a},testLookupTable:function(e,t){var s=n.ToolsApiController.lookupTableTest().url,a=o("POST",r.qualifyUrl(s),{lookup_table_name:e,string:t});return a.catch(function(e){i.error("Details: "+e,"Could not check if lookup table translates the string")}),a}};e.exports=s},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(12),s=n(o),a=t(140),l=n(a),u=t(45),c=n(u),d=t(93),h=n(d),f=t(5),p=n(f),g=t(9),m=n(g),v=t(3),y=n(v),b=i.default.createStore({DEFAULT_LIMIT:150,listenables:[],search:function(e,t,n,r,i,o,a,u,c){var d=b.extractTimeRange(e,n),f=i||this.DEFAULT_LIMIT,g=(o-1)*f,v=p.default.qualifyUrl(m.default.UniversalSearchApiController.search(e,t,d,r,f,g,a,u,c).url);return(0,y.default)("GET",v).then(function(e){var t=s.default.extend({},e);return t.fields=e.fields.map(function(e){return{hash:(0,l.default)(e),name:e,standard_selected:"message"===e||"source"===e}}),t.messages=t.messages.map(function(e){return h.default.formatMessageSummary(e)}),t})},histogram:function(e,t,n,r,i,o){var s=b.extractTimeRange(e,n),a=p.default.qualifyUrl(m.default.UniversalSearchApiController.histogram(e,t,r,s,i).url);return(0,y.default)("GET",a).then(function(t){return t.histogram_boundaries=t.queried_timerange,t.histogram=c.default.format(t.results,t.histogram_boundaries,r,o,"relative"===e&&0===n.relative,null,!0),t})}});b.extractTimeRange=function(e,t){return"relative"===e?{range:t.relative}:t},exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(9),r=t(5),i=t(3).default,o=t(6),s={pluginEnabled:function(){var e=r.qualifyUrl(n.UsageStatsApiController.pluginEnabled().url),t=i("GET",e);return t=t.then(function(e){return e.enabled}).catch(function(){return!1})},getOptOutState:function(){var e=r.qualifyUrl(n.UsageStatsApiController.setOptOutState().url),t=i("GET",e);return t=t.catch(function(){return null})},setOptOut:function(e){return this._sendOptOutState({opt_out:!0},function(){!0===e&&o.success("No anonymous usage stats will be sent.","Opt-out created")},function(e){o.error("Please try again","Setting anonymous usage stats opt-out failed: "+e)})},setOptIn:function(e){return this._sendOptOutState({opt_out:!1},function(){!0===e&&o.success("Thank you for helping us making Graylog better!")},function(e){o.error("Please try again","Opt-in failed: "+e)})},_sendOptOutState:function(e,t,o){var s=r.qualifyUrl(n.UsageStatsApiController.setOptOutState().url),a=i("POST",s,JSON.stringify(e));return a.then(function(){return t()}).catch(function(e){return e(e)}),a}};e.exports=s},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(6),r=t(5),i=t(9),o=t(3).default;exports.UsersStore={editUserFormUrl:function(e){return r.qualifyUrl("/system/users/edit/"+e)},create:function(e){var t=r.qualifyUrl(i.UsersApiController.create().url);return o("POST",t,e)},loadUsers:function(){var e=r.qualifyUrl(i.UsersApiController.list().url);return o("GET",e).then(function(e){return e.users},function(e){404!==e.additional.status&&n.error("Loading user list failed with status: "+e,"Could not load user list")})},load:function(e){var t=r.qualifyUrl(i.UsersApiController.load(encodeURIComponent(e)).url),s=o("GET",t);return s.catch(function(t){n.error("Loading user failed with status: "+t,"Could not load user "+e)}),s},deleteUser:function(e){var t=r.qualifyUrl(i.UsersApiController.delete(encodeURIComponent(e)).url),s=o("DELETE",t);return s.then(function(){n.success('User "'+e+'" was deleted successfully')},function(e){404!==e.additional.status&&n.error("Delete user failed with status: "+e,"Could not delete user")}),s},changePassword:function(e,t){var n=r.qualifyUrl(i.UsersApiController.changePassword(encodeURIComponent(e)).url);return o("PUT",n,t)},update:function(e,t){var n=r.qualifyUrl(i.UsersApiController.update(encodeURIComponent(e)).url);return o("PUT",n,t)}},e.exports=exports.UsersStore},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=t(6),i=t(9),o=t(5),s=t(3).fetchPeriodically,a=t(3).default,l=t(8),u=l.getActions("Widgets"),c=n.createStore({listenables:[u],_serializeWidgetForUpdate:function(e){return{description:e.description,type:e.type,cache_time:e.cache_time,creator_user_id:e.creator_user_id,config:e.config}},addWidget:function(e,t,n,s){var l={description:n,type:t,config:s},u=o.qualifyUrl(i.DashboardsApiController.addWidget(e).url),c=a("POST",u,l);return c.then(function(e){return r.success("Widget created successfully"),e},function(e){404!==e.additional.status&&r.error("Creating widget failed with status: "+e,"Could not create widget")}),c},loadWidget:function(e,t){var n=o.qualifyUrl(i.DashboardsApiController.widget(e,t).url),a=s("GET",n);return a.catch(function(e){404!==e.additional.status&&r.error("Loading widget information failed with status: "+e,"Could not load widget information")}),a},updateWidget:function(e,t){var n=o.qualifyUrl(i.DashboardsApiController.updateWidget(e,t.id).url),s=a("PUT",n,this._serializeWidgetForUpdate(t));return s.then(function(e){return r.success("Widget updated successfully"),e},function(e){r.error('Updating widget "'+t.description+'" failed with status: '+e.message,"Could not update widget")}),s},loadValue:function(e,t,n){var r=o.qualifyUrl(i.DashboardsApiController.widgetValue(e,t,n).url);return s("GET",r)},removeWidget:function(e,t){var n=this,r=o.qualifyUrl(i.DashboardsApiController.removeWidget(e,t).url),s=a("DELETE",r).then(function(e){return n.trigger({delete:t}),e});return u.removeWidget.promise(s),s}});e.exports=c},function(e,exports){+function($){"use strict";function e(e){return this.each(function(){var n=$(this),r=n.data("bs.popover"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.popover",r=new t(this,i)),"string"==typeof e&&r[e]())})}var t=function(e,t){this.init("popover",e,t)};if(!$.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.7",t.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'
'}),t.prototype=$.extend({},$.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=$.fn.popover;$.fn.popover=e,$.fn.popover.Constructor=t,$.fn.popover.noConflict=function(){return $.fn.popover=n,this}}(jQuery)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(exports,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0)}},{key:"allowYearChange",value:function(){return this.props.canChangeMonth}},{key:"showMonth",value:function(e,t){var n=this;this.allowMonth(e)&&this.setState({currentMonth:E.startOfMonth(e)},function(){t&&t(),n.props.onMonthChange&&n.props.onMonthChange(n.state.currentMonth)})}},{key:"showNextMonth",value:function(e){if(this.allowNextMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,n=S.addMonths(this.state.currentMonth,t);this.showMonth(n,e)}}},{key:"showPreviousMonth",value:function(e){if(this.allowPreviousMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,n=S.addMonths(this.state.currentMonth,-t);this.showMonth(n,e)}}},{key:"showNextYear",value:function(){if(this.allowYearChange()){var e=S.addMonths(this.state.currentMonth,12);this.showMonth(e)}}},{key:"showPreviousYear",value:function(){if(this.allowYearChange()){var e=S.addMonths(this.state.currentMonth,-12);this.showMonth(e)}}},{key:"focusFirstDayOfMonth",value:function(){this.getDayNodes()[0].focus()}},{key:"focusLastDayOfMonth",value:function(){var e=this.getDayNodes();e[e.length-1].focus()}},{key:"focusPreviousDay",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);0===r?this.showPreviousMonth(function(){return t.focusLastDayOfMonth()}):n[r-1].focus()}},{key:"focusNextDay",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);r===n.length-1?this.showNextMonth(function(){return t.focusFirstDayOfMonth()}):n[r+1].focus()}},{key:"focusNextWeek",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);r>n.length-8?this.showNextMonth(function(){var e=n.length-r,i=7-e;t.getDayNodes()[i].focus()}):n[r+7].focus()}},{key:"focusPreviousWeek",value:function(e){var t=this,n=this.getDayNodes(),r=[].concat(o(n)).indexOf(e);r<=6?this.showPreviousMonth(function(){var e=t.getDayNodes();e[e.length-7+r].focus()}):n[r-7].focus()}},{key:"handleKeyDown",value:function(e){switch(e.persist(),e.keyCode){case L.default.LEFT:this.showPreviousMonth();break;case L.default.RIGHT:this.showNextMonth();break;case L.default.UP:this.showPreviousYear();break;case L.default.DOWN:this.showNextYear()}this.props.onKeyDown&&this.props.onKeyDown(e)}},{key:"handleDayKeyDown",value:function(e,t,n){switch(n.persist(),n.keyCode){case L.default.LEFT:E.cancelEvent(n),this.focusPreviousDay(n.target);break;case L.default.RIGHT:E.cancelEvent(n),this.focusNextDay(n.target);break;case L.default.UP:E.cancelEvent(n),this.focusPreviousWeek(n.target);break;case L.default.DOWN:E.cancelEvent(n),this.focusNextWeek(n.target);break;case L.default.ENTER:case L.default.SPACE:E.cancelEvent(n),this.props.onDayClick&&this.handleDayClick(e,t,n)}this.props.onDayKeyDown&&this.props.onDayKeyDown(e,t,n)}},{key:"handleDayClick",value:function(e,t,n){n.persist(),t.outside&&this.handleOutsideDayClick(e),this.props.onDayClick(e,t,n)}},{key:"handleOutsideDayClick",value:function(e){var t=this.state.currentMonth,n=this.props.numberOfMonths,r=E.getMonthsDiff(t,e);r>0&&r>=n?this.showNextMonth():r<0&&this.showPreviousMonth()}},{key:"renderNavbar",value:function(){var e=this.props,t=e.labels,n=e.locale,r=e.localeUtils,o=e.canChangeMonth,s=e.navbarElement,a=i(e,["labels","locale","localeUtils","canChangeMonth","navbarElement"]);if(!o)return null;var l={classNames:this.props.classNames,className:this.props.classNames.navBar,nextMonth:this.getNextNavigableMonth(),previousMonth:this.getPreviousNavigableMonth(),showPreviousButton:this.allowPreviousMonth(),showNextButton:this.allowNextMonth(),onNextClick:this.showNextMonth,onPreviousClick:this.showPreviousMonth,dir:a.dir,labels:t,locale:n,localeUtils:r};return h.default.isValidElement(s)?h.default.cloneElement(s,l):h.default.createElement(s,l)}},{key:"renderDayInMonth",value:function(e,t){var n=E.getModifiersFromProps(this.props),r=D.getModifiersForDay(e,n);S.isSameDay(e,new Date)&&!Object.prototype.hasOwnProperty.call(n,this.props.classNames.today)&&r.push(this.props.classNames.today),e.getMonth()!==t.getMonth()&&r.push(this.props.classNames.outside);var i=e.getMonth()!==t.getMonth(),o=null;this.props.onDayClick&&!i&&(o=-1,1===e.getDate()&&(o=this.props.tabIndex));var s=""+e.getFullYear()+e.getMonth()+e.getDate(),a={};return r.forEach(function(e){a[e]=!0}),h.default.createElement(_.default,{key:(i?"outside-":"")+s,classNames:this.props.classNames,day:e,modifiers:a,modifiersStyles:this.props.modifiersStyles,empty:i&&!this.props.enableOutsideDays&&!this.props.fixedWeeks,tabIndex:o,ariaLabel:this.props.localeUtils.formatDay(e,this.props.locale),ariaDisabled:i||r.indexOf("disabled")>-1,ariaSelected:r.indexOf("selected")>-1,onMouseEnter:this.props.onDayMouseEnter,onMouseLeave:this.props.onDayMouseLeave,onKeyDown:this.handleDayKeyDown,onTouchStart:this.props.onDayTouchStart,onTouchEnd:this.props.onDayTouchEnd,onFocus:this.props.onDayFocus,onClick:this.props.onDayClick?this.handleDayClick:void 0},this.props.renderDay(e,a))}},{key:"renderMonths",value:function(){for(var e=[],t=E.getFirstDayOfWeekFromProps(this.props),n=0;n1&&e.fromMonth){var r=E.getMonthsDiff(e.fromMonth,n);n=S.addMonths(e.fromMonth,Math.floor(r/e.numberOfMonths)*e.numberOfMonths)}return{currentMonth:n}},this.dayPicker=null,this.handleTodayButtonClick=function(t){e.showMonth(new Date),t.target.blur()}};exports.default=I},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=e.classNames,n=e.date,r=e.months,i=e.locale,s=e.localeUtils,a=e.onClick;return o.default.createElement("div",{className:t.caption,onClick:a,role:"heading"},r?r[n.getMonth()]+" "+n.getFullYear():s.formatMonthTitle(n,i))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(0),o=n(i),s=t(35),a=n(s);r.propTypes={date:a.default.instanceOf(Date),months:a.default.arrayOf(a.default.string),locale:a.default.string,localeUtils:a.default.localeUtils,onClick:a.default.func,classNames:a.default.shape({caption:a.default.string.isRequired}).isRequired}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=e.classNames,n=e.month,r=e.months,i=e.fixedWeeks,s=e.captionElement,a=e.weekdayElement,l=e.locale,h=e.localeUtils,f=e.weekdaysLong,p=e.weekdaysShort,g=e.firstDayOfWeek,m=e.onCaptionClick,v=e.children,y=e.footer,b=e.showWeekNumbers,_=e.onWeekClick,w={date:n,classNames:t,months:r,localeUtils:h,locale:l,onClick:m?function(e){return m(n,e)}:void 0},A=o.default.isValidElement(s)?o.default.cloneElement(s,w):o.default.createElement(s,w),C=(0,c.getWeekArray)(n,g,i);return o.default.createElement("div",{className:t.month,role:"grid"},A,o.default.createElement(u.default,{classNames:t,weekdaysShort:p,weekdaysLong:f,firstDayOfWeek:g,showWeekNumbers:b,locale:l,localeUtils:h,weekdayElement:a}),o.default.createElement("div",{className:t.body,role:"rowgroup"},C.map(function(e){var r=void 0;return b&&(r=(0,d.getWeekNumber)(e[0])),o.default.createElement("div",{key:e[0].getTime(),className:t.week,role:"row"},b&&o.default.createElement("div",{className:t.weekNumber,tabIndex:0,role:"gridcell",onClick:function(t){return _(r,e,t)}},r),e.map(function(e){return v(e,n)}))})),y&&o.default.createElement("div",{className:t.footer},y))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(0),o=n(i),s=t(35),a=n(s),l=t(393),u=n(l),c=t(96),d=t(55);r.propTypes={classNames:a.default.shape({month:a.default.string.isRequired,body:a.default.string.isRequired,week:a.default.string.isRequired}).isRequired,month:a.default.instanceOf(Date).isRequired,months:a.default.arrayOf(a.default.string),fixedWeeks:a.default.bool,captionElement:a.default.oneOfType([a.default.element,a.default.func,a.default.instanceOf(o.default.Component)]).isRequired,weekdayElement:a.default.oneOfType([a.default.element,a.default.func,a.default.instanceOf(o.default.Component)]),footer:a.default.node,showWeekNumbers:a.default.bool,onWeekClick:a.default.func,locale:a.default.string.isRequired,localeUtils:a.default.localeUtils.isRequired,weekdaysLong:a.default.arrayOf(a.default.string),weekdaysShort:a.default.arrayOf(a.default.string),firstDayOfWeek:a.default.number.isRequired,onCaptionClick:a.default.func,children:a.default.func.isRequired}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){for(var t=e.classNames,n=e.firstDayOfWeek,r=e.showWeekNumbers,i=e.weekdaysLong,s=e.weekdaysShort,a=e.locale,l=e.localeUtils,u=e.weekdayElement,c=[],d=0;d<7;d+=1){var h=(d+n)%7,f={key:d,className:t.weekday,weekday:h,weekdaysLong:i,weekdaysShort:s,localeUtils:l,locale:a},p=o.default.isValidElement(u)?o.default.cloneElement(u,f):o.default.createElement(u,f);c.push(p)}return o.default.createElement("div",{className:t.weekdays,role:"rowgroup"},o.default.createElement("div",{className:t.weekdaysRow,role:"row"},r&&o.default.createElement("div",{className:t.weekday}),c))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(0),o=n(i),s=t(35),a=n(s);r.propTypes={classNames:a.default.shape({weekday:a.default.string.isRequired,weekdays:a.default.string.isRequired,weekdaysRow:a.default.string.isRequired}).isRequired,firstDayOfWeek:a.default.number.isRequired,weekdaysLong:a.default.arrayOf(a.default.string),weekdaysShort:a.default.arrayOf(a.default.string),showWeekNumbers:a.default.bool,locale:a.default.string.isRequired,localeUtils:a.default.localeUtils.isRequired,weekdayElement:a.default.oneOfType([a.default.element,a.default.func,a.default.instanceOf(o.default.Component)])}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){if(e)return function(r){r.persist(),e(t,n,r)}}function i(e){var t=e.classNames,n=e.modifiersStyles,i=e.day,o=e.tabIndex,a=e.empty,u=e.modifiers,c=e.onMouseEnter,d=e.onMouseLeave,h=e.onClick,f=e.onKeyDown,p=e.onTouchStart,g=e.onTouchEnd,m=e.onFocus,v=e.ariaLabel,y=e.ariaDisabled,b=e.ariaSelected,_=e.children,w=t.day;t!==l.default?w+=" "+Object.keys(u).join(" "):w+=Object.keys(u).map(function(e){return" "+w+"--"+e}).join("");var A=void 0;return n&&Object.keys(u).filter(function(e){return!!n[e]}).forEach(function(e){A=Object.assign({},A,n[e])}),a?s.default.createElement("div",{role:"gridcell","aria-disabled":!0,className:w,style:A}):s.default.createElement("div",{className:w,tabIndex:o||0,style:A,role:"gridcell","aria-label":v,"aria-disabled":y.toString(),"aria-selected":b.toString(),onClick:r(h,i,u),onKeyDown:r(f,i,u),onMouseEnter:r(c,i,u),onMouseLeave:r(d,i,u),onTouchEnd:r(g,i,u),onTouchStart:r(p,i,u),onFocus:r(m,i,u)},_)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var o=t(0),s=n(o),a=t(95),l=n(a),u=t(35),c=n(u);i.propTypes={classNames:c.default.shape({day:c.default.string.isRequired}).isRequired,day:c.default.instanceOf(Date).isRequired,children:c.default.node.isRequired,ariaDisabled:c.default.bool,ariaLabel:c.default.string,ariaSelected:c.default.bool,empty:c.default.bool,modifiers:c.default.object,modifiersStyles:c.default.object,onClick:c.default.func,onKeyDown:c.default.func,onMouseEnter:c.default.func,onMouseLeave:c.default.func,onTouchEnd:c.default.func,onTouchStart:c.default.func,onFocus:c.default.func,tabIndex:c.default.number},i.defaultProps={modifiers:{},empty:!1}},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32,ESC:27}},function(e,exports,t){var n=t(397);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(18)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,'.DayPicker{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:relative;padding:1rem 0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.DayPicker,.DayPicker-Month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.DayPicker-Month{display:table;border-collapse:collapse;border-spacing:0;margin:0 1rem}.DayPicker-NavBar{position:absolute;left:0;right:0;padding:0 .5rem;top:1rem}.DayPicker-NavButton{position:absolute;width:1.5rem;height:1.5rem;background-repeat:no-repeat;background-position:50%;background-size:contain;cursor:pointer}.DayPicker-NavButton--prev{left:1rem;background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI2cHgiIGhlaWdodD0iNTBweCIgdmlld0JveD0iMCAwIDI2IDUwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnNrZXRjaD0iaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoL25zIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy4zLjIgKDEyMDQzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5wcmV2PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9InByZXYiIHNrZXRjaDp0eXBlPSJNU0xheWVyR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEzLjM5MzE5MywgMjUuMDAwMDAwKSBzY2FsZSgtMSwgMSkgdHJhbnNsYXRlKC0xMy4zOTMxOTMsIC0yNS4wMDAwMDApIHRyYW5zbGF0ZSgwLjg5MzE5MywgMC4wMDAwMDApIiBmaWxsPSIjNTY1QTVDIj4KICAgICAgICAgICAgPHBhdGggZD0iTTAsNDkuMTIzNzMzMSBMMCw0NS4zNjc0MzQ1IEwyMC4xMzE4NDU5LDI0LjcyMzA2MTIgTDAsNC4yMzEzODMxNCBMMCwwLjQ3NTA4NDQ1OSBMMjUsMjQuNzIzMDYxMiBMMCw0OS4xMjM3MzMxIEwwLDQ5LjEyMzczMzEgWiIgaWQ9InJpZ2h0IiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K")}.DayPicker-NavButton--next{right:1rem;background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI2cHgiIGhlaWdodD0iNTBweCIgdmlld0JveD0iMCAwIDI2IDUwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnNrZXRjaD0iaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoL25zIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy4zLjIgKDEyMDQzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5uZXh0PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9Im5leHQiIHNrZXRjaDp0eXBlPSJNU0xheWVyR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuOTUxNDUxLCAwLjAwMDAwMCkiIGZpbGw9IiM1NjVBNUMiPgogICAgICAgICAgICA8cGF0aCBkPSJNMCw0OS4xMjM3MzMxIEwwLDQ1LjM2NzQzNDUgTDIwLjEzMTg0NTksMjQuNzIzMDYxMiBMMCw0LjIzMTM4MzE0IEwwLDAuNDc1MDg0NDU5IEwyNSwyNC43MjMwNjEyIEwwLDQ5LjEyMzczMzEgTDAsNDkuMTIzNzMzMSBaIiBpZD0icmlnaHQiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=")}.DayPicker-Caption{display:table-caption;height:1.5rem;text-align:center}.DayPicker-Weekdays{display:table-header-group}.DayPicker-WeekdaysRow{display:table-row}.DayPicker-Weekday{display:table-cell;padding:.5rem;font-size:.875em;text-align:center;color:#8b9898}.DayPicker-Body{display:table-row-group}.DayPicker-Week{display:table-row}.DayPicker-Day{border:1px solid #eaecec;text-align:center}.DayPicker-Day,.DayPicker-WeekNumber{display:table-cell;padding:.5rem;cursor:pointer;vertical-align:middle}.DayPicker-WeekNumber{text-align:right;min-width:1rem;font-size:.75em;color:#8b9898}.DayPicker--interactionDisabled .DayPicker-Day{cursor:default}.DayPicker-Footer{display:table-caption;caption-side:bottom;padding-top:.5rem}.DayPicker-TodayButton{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;color:#4a90e2;font-size:.875em}.DayPicker-Day--today{color:#d0021b;font-weight:500}.DayPicker-Day--disabled{background-color:#eff1f1}.DayPicker-Day--disabled,.DayPicker-Day--outside{color:#dce0e0;cursor:default}.DayPicker-Day--sunday{background-color:#f7f8f8}.DayPicker-Day--sunday:not(.DayPicker-Day--today){color:#dce0e0}.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside){color:#fff;background-color:#4a90e2}.DayPickerInput{display:inline-block}.DayPickerInput-OverlayWrapper{position:relative}.DayPickerInput-Overlay{left:0;position:absolute;background:#fff;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.15);box-shadow:0 2px 5px rgba(0,0,0,.15)}',""])},function(e,exports){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=s.default.createClass({displayName:"DocumentTitle",propTypes:{title:i.default.string.isRequired,children:i.default.oneOfType([i.default.arrayOf(i.default.element),i.default.element]).isRequired},componentDidMount:function(){document.title=document.title+" - "+this.props.title},componentWillUnmount:function(){document.title=this.defaultTitle},defaultTitle:"Graylog",render:function(){return this.props.children}});exports.default=a,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=s.default.createClass({displayName:"EntityList",propTypes:{bsNoItemsStyle:i.default.oneOf(["info","success","warning"]),noItemsText:i.default.oneOfType([i.default.string,i.default.element]),items:i.default.array.isRequired},getDefaultProps:function(){return{bsNoItemsStyle:"info",noItemsText:"No items available"}},render:function(){return 0===this.props.items.length?s.default.createElement(a.Alert,{bsStyle:this.props.bsNoItemsStyle},s.default.createElement("i",{className:"fa fa-info-circle"})," ",this.props.noItemsText):s.default.createElement("ul",{className:"entity-list"},this.props.items)}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=s.default.createClass({displayName:"EntityListItem",propTypes:{title:i.default.oneOfType([i.default.string,i.default.node]),titleSuffix:i.default.any,description:i.default.any,actions:i.default.oneOfType([i.default.array,i.default.node]),createdFromContentPack:i.default.bool,contentRow:i.default.node},getDefaultProps:function(){return{createdFromContentPack:!1}},render:function(){var e=void 0;this.props.titleSuffix&&(e=s.default.createElement("small",null,this.props.titleSuffix));var t=s.default.createElement("div",{className:"item-actions text-right"},this.props.actions);return s.default.createElement("li",{className:"entity-list-item"},s.default.createElement(a.Row,{className:"row-sm"},s.default.createElement(a.Col,{md:12},s.default.createElement("div",{className:"pull-right hidden-xs"},t),s.default.createElement("h2",null,this.props.title," ",e),(this.props.createdFromContentPack||this.props.description)&&s.default.createElement("div",{className:"item-description"},this.props.createdFromContentPack&&s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-cube",title:"Created from content pack"})," "),s.default.createElement("span",null,this.props.description))),s.default.createElement(a.Col,{sm:12,lgHidden:!0,mdHidden:!0,smHidden:!0},t)),s.default.createElement(a.Row,{className:"row-sm"},this.props.contentRow))}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(7),c=n(u),d=t(33),h=n(d),f=c.default.getStore("CurrentUser"),p=s.default.createClass({displayName:"IfPermitted",propTypes:{children:i.default.node.isRequired,permissions:i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.string)]).isRequired,anyPermissions:i.default.bool},mixins:[l.default.connect(f),h.default],getDefaultProps:function(){return{anyPermissions:!1}},_checkPermissions:function(){return this.props.anyPermissions?this.isAnyPermitted(this.state.currentUser.permissions,this.props.permissions):this.isPermitted(this.state.currentUser.permissions,this.props.permissions)},render:function(){return this.state.currentUser&&this._checkPermissions()?s.default.Children.count(this.props.children)>1?s.default.createElement("span",null,this.props.children):this.props.children:null}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(13),l=t(404),u=n(l),c=s.default.createClass({displayName:"ISODurationInput",propTypes:{duration:i.default.string.isRequired,update:i.default.func.isRequired,label:i.default.string,help:i.default.string,validator:i.default.func,errorText:i.default.string,autoFocus:i.default.bool,required:i.default.bool},getDefaultProps:function(){return{label:"Duration",help:"as ISO8601 Duration",validator:function(){return!0},errorText:"invalid",autoFocus:!1,required:!1}},getInitialState:function(){return{duration:this.props.duration}},_onUpdate:function(){var e=this.refs.isoDuration.getValue().toUpperCase();e.startsWith("P")||(e="P"+e),this.setState({duration:e}),u.default.isValidDuration(e,this.props.validator)&&this.props.update(e)},render:function(){return s.default.createElement(a.Input,{type:"text",ref:"isoDuration",label:this.props.label,onChange:this._onUpdate,value:this.state.duration,help:this.props.help,addonAfter:u.default.humanizeDuration(this.state.duration,this.props.validator,this.props.errorText),bsStyle:u.default.durationStyle(this.state.duration,this.props.validator),autofocus:this.props.autoFocus,required:this.props.required})}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(23),r=function(e){return e&&e.__esModule?e:{default:e}}(n);t(405);var i={isValidDuration:function(e,t){return t(r.default.duration(e).asMilliseconds(),e)},durationStyle:function(e,t,n){var r=n;return r||(r="error"),this.isValidDuration(e,t)?null:r},formatDuration:function(e,t,n){var i=n;return i||(i="error"),this.isValidDuration(e,t)?r.default.duration(e).format():i},humanizeDuration:function(e,t,n){var i=n;return i||(i="error"),this.isValidDuration(e,t)?r.default.duration(e).humanize():i}};exports.default=i,e.exports=exports.default},function(e,exports,t){/*! Moment Duration Format v1.3.0
* https://github.com/jsmreese/moment-duration-format
* Date: 2014-07-15
*
* Duration format plugin function for the Moment.js library
* http://momentjs.com/
*
* Copyright 2014 John Madhavan-Reese
* Released under the MIT license
*/
!function(e,n){function r(e){var t="";if(!(e=parseInt(e,10))||e<1)return t;for(;e;)t+="0",e-=1;return t}function i(e,t,n){return null==e&&(e=""),e=""+e,(n?e:"")+r(t-e.length)+(n?"":e)}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}function s(e){return"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){for(var n=e.length;n-=1;)if(t(e[n]))return e[n]}function l(e,t){var n,r=0,i=e.length;for("function"!=typeof t&&(n=t,t=function(e){return e===n});r0?Math.floor(r):Math.ceil(r),o=r-i,s=n+1===b.length,a=!n,u(t,function(t){t.type===e&&(v(t,{value:r,wholeValue:i,decimalValue:o,isLeast:s,isMost:a}),a&&null==A.forceLength&&t.length>1&&(A.forceLength=!0))}),C.subtract(i,e)}),A.trim&&(t=("left"===A.trim?g:m)(t,function(e){return!(e.isLeast||null!=e.type&&e.wholeValue)})),_=!1,"right"===A.trim&&t.reverse(),t=c(t,function(e){var t,n;if(!e.type)return e.token;if(t=e.isLeast&&A.precision<0?(Math.floor(e.wholeValue*Math.pow(10,A.precision))*Math.pow(10,-A.precision)).toString():e.wholeValue.toString(),t=t.replace(/^\-/,""),e.length>1&&(_||e.isMost||A.forceLength)&&(t=i(t,e.length)),e.isLeast&&A.precision>0)switch(n=e.decimalValue.toString().replace(/^\-/,"").split(/\.|e\-/),n.length){case 1:t+="."+i(n[0],A.precision,!0).slice(0,A.precision);break;case 2:t+="."+i(n[1],A.precision,!0).slice(0,A.precision);break;case 3:t+="."+i(r(+n[2]-1)+(n[0]||"0")+n[1],A.precision,!0).slice(0,A.precision);break;default:throw"Moment Duration Format: unable to parse token decimal value."}return e.isMost&&e.value<0&&(t="-"+t),_=!0,t}),"right"===A.trim&&t.reverse(),t.join("")):d(t,"token").join("")},y.duration.fn.format.defaults={escape:/\[(.+?)\]/,years:/[Yy]+/,months:/M+/,weeks:/[Ww]+/,days:/[Dd]+/,hours:/[Hh]+/,minutes:/m+/,seconds:/s+/,milliseconds:/S+/,general:/.+?/,types:"escape years months weeks days hours minutes seconds milliseconds general",trim:"left",precision:0,forceLength:null,template:function(){var e=this.types,t=this.duration;switch(a(e,function(e){return t._data[e]})){case"seconds":return"h:mm:ss";case"minutes":return"d[d] h:mm";case"hours":return"d[d] h[h]";case"days":return"M[m] d[d]";case"weeks":return"y[y] w[w]";case"months":return"y[y] M[m]";case"years":return"y[y]";default:return"y[y] M[m] d[d] h:mm:ss"}}}}(this)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(146),c=t(7),d=n(c),h=t(14),f=n(h),p=t(11),g=d.default.getStore("Nodes"),m=s.default.createClass({displayName:"LinkToNode",propTypes:{nodeId:i.default.string.isRequired},mixins:[l.default.connect(g)],render:function(){if(!this.state.nodes)return s.default.createElement(p.Spinner,null);var e=this.state.nodes[this.props.nodeId];if(e){var t=e.is_master?"fa fa-star master-node":"fa fa-code-fork",n=e.is_master?"This is the master node in the cluster":"";return s.default.createElement(u.Link,{to:f.default.SYSTEM.NODES.SHOW(this.props.nodeId)},s.default.createElement("i",{className:t,title:n})," ",e.short_node_id," / ",e.hostname)}return s.default.createElement("i",null,"Unknown Node")}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(11),u=t(408),c=n(u),d=s.default.createClass({displayName:"LoadingIndicator",propTypes:{text:i.default.string},getDefaultProps:function(){return{text:"Loading..."}},render:function(){return s.default.createElement(a.Alert,{bsStyle:"info",className:c.default.loadingIndicator},s.default.createElement(l.Spinner,{text:this.props.text}))}});exports.default=d,e.exports=exports.default},function(e,exports,t){var n=t(409);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(18)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,"._1ORE6kbcLECH5aB8a-GArI.alert.alert-info{box-shadow:0 2px 10px rgba(0,0,0,.2);position:fixed;top:60px;left:50%;height:32px;width:200px;margin-left:-100px;padding:5px 10px;text-align:center;z-index:2000}",""]),exports.locals={loadingIndicator:"_1ORE6kbcLECH5aB8a-GArI"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;tr?1:0}))},_renderOption:function(e){return a.default.createElement("span",{key:e.value,title:"{option.value} [{option.value}]"},e.label," [",e.value,"]")},render:function(){if(!this.state.locales)return a.default.createElement(Spinner,null);var e=this._formatLocales(this.state.locales);return a.default.createElement(d.default,r({ref:"locale"},this.props,{placeholder:"Pick a locale",options:e,optionRenderer:this._renderOption}))}});exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";var n=Object.assign||function(e){for(var t=1;to.bottom||r.top-1)return!1;if(this.props.filterOption)return this.props.filterOption.call(this,e,n);var t=String(e[this.props.valueKey]),i=String(e[this.props.labelKey]);return this.props.ignoreCase&&(t=t.toLowerCase(),i=i.toLowerCase(),n=n.toLowerCase()),n&&"start"!==this.props.matchPos?"label"!==this.props.matchProp&&t.indexOf(n)>=0||"value"!==this.props.matchProp&&i.indexOf(n)>=0:"label"!==this.props.matchProp&&t.substr(0,n.length)===n||"value"!==this.props.matchProp&&i.substr(0,n.length)===n};return(e||[]).filter(i,this)},selectFocusedOption:function(){return this.props.allowCreate&&!this.state.focusedOption?this.selectValue(this.state.inputValue):this.state.focusedOption?this.selectValue(this.state.focusedOption):void 0},focusOption:function(e){this.setState({focusedOption:e})},focusNextOption:function(){this.focusAdjacentOption("next")},focusPreviousOption:function(){this.focusAdjacentOption("previous")},focusAdjacentOption:function(e){this._focusedOptionReveal=!0;var t=this.state.filteredOptions.filter(function(e){return!e.disabled});if(!this.state.isOpen)return void this.setState({isOpen:!0,inputValue:"",focusedOption:this.state.focusedOption||t["next"===e?0:t.length-1]},this._bindCloseMenuIfClickedOutside);if(t.length){for(var n=-1,r=0;r-1&&n0?t[n-1]:t[t.length-1]),this.setState({focusedOption:i})}},unfocusOption:function(e){this.state.focusedOption===e&&this.setState({focusedOption:null})},buildMenu:function(){var e=this,t=this.state.focusedOption?this.state.focusedOption[this.props.valueKey]:null,n=this.props.optionRenderer;n||(n=function(t){return t[e.props.labelKey]}),this.state.filteredOptions.length>0&&(t=null==t?this.state.filteredOptions[0]:t);var i=this.state.filteredOptions;if(this.props.allowCreate&&this.state.inputValue.trim()){var o=this.state.inputValue;i=i.slice();var a=this.props.newOptionCreator?this.props.newOptionCreator(o):{value:o,label:o,create:!0};i.unshift(a)}var l=Object.keys(i).map(function(e){var o=i[e],a=this.state.value===o[this.props.valueKey],l=t===o[this.props.valueKey],u=s({"Select-option":!0,"is-selected":a,"is-focused":l,"is-disabled":o.disabled}),c=l?"focused":null,d=this.focusOption.bind(this,o),h=this.unfocusOption.bind(this,o),f=this.selectValue.bind(this,o);return r.createElement(this.props.optionComponent,{key:"option-"+o[this.props.valueKey],className:u,renderFunc:n,mouseEnter:d,mouseLeave:h,mouseDown:f,click:f,addLabelText:this.props.addLabelText,option:o,ref:c})},this);if(l.length)return l;var u,c;return this.isLoading()?(c="Select-searching",u=this.props.searchingText):this.state.inputValue||!this.props.asyncOptions?(c="Select-noresults",u=this.props.noResultsText):(c="Select-search-prompt",u=this.props.searchPromptText),r.createElement("div",{className:c},u)},handleOptionLabelClick:function(e,t){this.props.onOptionLabelClick&&this.props.onOptionLabelClick(e,t)},isLoading:function(){return this.props.isLoading||this.state.isLoading},render:function(){var e=s("Select",this.props.className,{"Select--multi":this.props.multi,"is-searchable":this.props.searchable,"is-open":this.state.isOpen,"is-focused":this.state.isFocused,"is-loading":this.isLoading(),"is-disabled":this.props.disabled,"has-value":this.state.value}),t=[];if(this.props.multi&&this.state.values.forEach(function(e){var n=this.handleOptionLabelClick.bind(this,e),i=this.removeValue.bind(this,e),o=r.createElement(this.props.valueComponent,{key:e.value,option:e,renderer:this.props.valueRenderer,optionLabelClick:!!this.props.onOptionLabelClick,onOptionLabelClick:n,onRemove:i,disabled:this.props.disabled});t.push(o)},this),!(this.state.inputValue||this.props.multi&&t.length)){var i=this.state.values[0]||null;if(this.props.valueRenderer&&this.state.values.length)t.push(r.createElement(a,{key:0,option:i,renderer:this.props.valueRenderer,disabled:this.props.disabled}));else{var l=r.createElement(this.props.singleValueComponent,{key:"placeholder",value:i,placeholder:this.state.placeholder});t.push(l)}}var u,c,d=this.isLoading()?r.createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},r.createElement("span",{className:"Select-loading"})):null,h=this.props.clearable&&this.state.value&&!this.props.disabled&&!this.isLoading()?r.createElement("span",{className:"Select-clear-zone",title:this.props.multi?this.props.clearAllText:this.props.clearValueText,"aria-label":this.props.multi?this.props.clearAllText:this.props.clearValueText,onMouseDown:this.clearValue,onTouchEnd:this.clearValue,onClick:this.clearValue},r.createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})):null,f=r.createElement("span",{className:"Select-arrow-zone",onMouseDown:this.handleMouseDownOnArrow},r.createElement("span",{className:"Select-arrow",onMouseDown:this.handleMouseDownOnArrow}));this.state.isOpen&&(c={ref:"menu",className:"Select-menu",onMouseDown:this.handleMouseDownOnMenu},u=r.createElement("div",{ref:"selectMenuContainer",className:"Select-menu-outer"},r.createElement("div",c,this.buildMenu())));var p,g={ref:"input",className:"Select-input "+(this.props.inputProps.className||""),tabIndex:this.props.tabIndex||0,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur};for(var m in this.props.inputProps)this.props.inputProps.hasOwnProperty(m)&&"className"!==m&&(g[m]=this.props.inputProps[m]);return this.props.disabled?this.props.multi&&this.state.values.length||(p=r.createElement("div",{className:"Select-input"}," ")):p=this.props.searchable?r.createElement(o,n({value:this.state.inputValue,onChange:this.handleInputChange,minWidth:"5"},g)):r.createElement("div",g," "),r.createElement("div",{ref:"wrapper",className:e},r.createElement("input",{type:"hidden",ref:"value",name:this.props.name,value:this.state.value,disabled:this.props.disabled}),r.createElement("div",{className:"Select-control",ref:"control",onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},t,p,d,h,f),u)}});e.exports=d},function(e,exports,t){"use strict";var n=Object.assign||function(e){for(var t=1;t0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,".Select{position:relative}.Select,.Select div,.Select input,.Select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.Select.is-disabled>.Select-control{background-color:#f6f6f6}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none}.Select-control{background-color:#fff;border-color:#d9d9d9 #ccc #b3b3b3;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;height:36px;outline:none;overflow:hidden;position:relative;width:100%}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.is-searchable.is-open>.Select-control{cursor:text}.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control>.Select-arrow{border-color:transparent transparent #999;border-width:0 5px 5px}.is-searchable.is-focused:not(.is-open)>.Select-control{cursor:text}.is-focused:not(.is-open)>.Select-control{border-color:#08c #0099e6 #0099e6;box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 0 5px -1px rgba(0,136,204,.5)}.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value>.Select-control>.Select-placeholder{color:#333}.Select-value{color:#aaa;left:0;padding:8px 52px 8px 10px;position:absolute;right:-15px;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value>.Select-control>.Select-value{color:#333}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{background:none transparent;border:0 none;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;height:34px;margin:0;outline:none;padding:0;-webkit-appearance:none}.is-focused .Select-input>input{cursor:text}.Select-control:not(.is-searchable)>.Select-input{outline:none}.Select-loading-zone{cursor:pointer;display:table-cell;text-align:center}.Select-loading,.Select-loading-zone{position:relative;vertical-align:middle;width:16px}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;-o-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;-o-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#d0021b}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:25px;padding-right:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0}.is-open .Select-arrow,.Select-arrow-zone:hover>.Select-arrow{border-top-color:#666}@-webkit-keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1000;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{box-sizing:border-box;color:#666;cursor:pointer;display:block;padding:8px 10px}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-focused{background-color:#f2f9fc;color:#333}.Select-option.is-disabled{color:#ccc;cursor:not-allowed}.Select-noresults,.Select-search-prompt,.Select-searching{box-sizing:border-box;color:#999;cursor:default;display:block;padding:8px 10px}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input,.Select-item{margin-left:5px}.Select-item{background-color:#f2f9fc;border-radius:2px;border:1px solid #c9e6f2;color:#08c;display:inline-block;font-size:.9em;margin-top:5px;vertical-align:top}.Select-item-icon,.Select-item-label{display:inline-block;vertical-align:middle}.Select-item-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select-item-label .Select-item-label__a{color:#08c;cursor:pointer}.Select-item-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c9e6f2;padding:1px 5px 3px}.Select-item-icon:focus,.Select-item-icon:hover{background-color:#ddeff7;color:#0077b3}.Select-item-icon:active{background-color:#c9e6f2}.Select--multi.is-disabled .Select-item{background-color:#f2f2f2;border:1px solid #d9d9d9;color:#888}.Select--multi.is-disabled .Select-item-icon{cursor:not-allowed;border-right:1px solid #d9d9d9}.Select--multi.is-disabled .Select-item-icon:active,.Select--multi.is-disabled .Select-item-icon:focus,.Select--multi.is-disabled .Select-item-icon:hover{background-color:#f2f2f2}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}",""])},function(e,exports,t){var n,r=0,i=t(419);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(18)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,".select-sm .Select-control{height:28px}.select-sm .Select-placeholder{line-height:28px}.select-sm .Select-input,.select-sm .Select-input>input{height:28px}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(13),u=t(31),c=n(u),d=s.default.createClass({displayName:"KeyValueTable",propTypes:{pairs:i.default.object.isRequired,headers:i.default.array,editable:i.default.bool,onChange:i.default.func,className:i.default.string,containerClassName:i.default.string,actionsSize:i.default.oneOf(["large","medium","small","xsmall"])},getInitialState:function(){return{newKey:"",newValue:""}},getDefaultProps:function(){return{headers:["Name","Value","Actions"],editable:!1,actionsSize:"xsmall",className:"",containerClassName:""}},_onPairsChange:function(e){this.props.onChange&&this.props.onChange(e)},_bindValue:function(e){var t={};t[e.target.name]=e.target.value,this.setState(t)},_addRow:function(){var e=c.default.clone(this.props.pairs);e[this.state.newKey]=this.state.newValue,this._onPairsChange(e),this.setState({newKey:"",newValue:""})},_deleteRow:function(e){var t=this;return function(){if(window.confirm("Are you sure you want to delete property '"+e+"'?")){var n=c.default.clone(t.props.pairs);delete n[e],t._onPairsChange(n)}}},_formattedHeaders:function(e){var t=this;return s.default.createElement("tr",null,e.map(function(n,r){var i={};if(r===e.length-1){if(!t.props.editable)return null;i.width=75}return s.default.createElement("th",{key:n,style:i},n)}))},_formattedRows:function(e){var t=this;return Object.keys(e).sort().map(function(n){var r=void 0;if(t.props.editable){var i=[];i.push(s.default.createElement(a.Button,{key:"delete-"+n,bsStyle:"danger",bsSize:t.props.actionsSize,onClick:t._deleteRow(n)},"Delete")),r=s.default.createElement("td",null,i)}return s.default.createElement("tr",{key:n},s.default.createElement("td",null,n),s.default.createElement("td",null,e[n]),r)})},_newRow:function(){if(!this.props.editable)return null;var e=!this.state.newKey||!this.state.newValue;return s.default.createElement("tr",null,s.default.createElement("td",null,s.default.createElement(l.Input,{type:"text",name:"newKey",id:"newKey",bsSize:"small",placeholder:this.props.headers[0],value:this.state.newKey,onChange:this._bindValue})),s.default.createElement("td",null,s.default.createElement(l.Input,{type:"text",name:"newValue",id:"newValue",bsSize:"small",placeholder:this.props.headers[1],value:this.state.newValue,onChange:this._bindValue})),s.default.createElement("td",null,s.default.createElement(a.Button,{bsStyle:"success",bsSize:"small",onClick:this._addRow,disabled:e},"Add")))},render:function(){return s.default.createElement("div",null,s.default.createElement("div",{className:"table-responsive "+this.props.containerClassName},s.default.createElement("table",{className:"table table-striped "+this.props.className},s.default.createElement("thead",null,this._formattedHeaders(this.props.headers)),s.default.createElement("tbody",null,this._formattedRows(this.props.pairs),this._newRow()))))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,"body{background:url("+t(427)+") no-repeat 50% fixed;-moz-background-size:cover;-webkit-background-size:cover;-o-background-size:cover;background-size:cover}.jumbotron-container{height:82vh}.jumbotron{background-color:hsla(0,0%,100%,.8);text-align:center}.jumbotron h1{font-size:52px;margin-bottom:15px}",""])},function(e,exports,t){e.exports=t.p+"31a71554a7917f4d60fb34b775a158da.jpg"},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(13),u=s.default.createClass({displayName:"PaginatedList",propTypes:{children:i.default.node.isRequired,onChange:i.default.func.isRequired,pageSize:i.default.number,pageSizes:i.default.arrayOf(i.default.number),totalItems:i.default.number.isRequired,showPageSizeSelect:i.default.bool},getDefaultProps:function(){var e=[10,50,100];return{pageSizes:e,pageSize:e[0],showPageSizeSelect:!0}},getInitialState:function(){return{currentPage:1,pageSize:this.props.pageSize}},_onChangePageSize:function(e){e.preventDefault();var t=Number(e.target.value);this.setState({pageSize:t}),this.props.onChange(this.state.currentPage,t)},_onChangePage:function(e,t){t.preventDefault();var n=Number(e);this.setState({currentPage:n}),this.props.onChange(n,this.state.pageSize)},_pageSizeSelect:function(){return this.props.showPageSizeSelect?s.default.createElement("div",{className:"form-inline page-size",style:{float:"right"}},s.default.createElement(l.Input,{type:"select",bsSize:"small",label:"Show:",value:this.state.pageSize,onChange:this._onChangePageSize},this.props.pageSizes.map(function(e){return s.default.createElement("option",{key:"option-"+e,value:e},e)}))):null},render:function(){var e=Math.ceil(this.props.totalItems/this.state.pageSize);return 0===e?s.default.createElement("span",null,this.props.children):s.default.createElement("span",null,this._pageSizeSelect(),this.props.children,s.default.createElement("div",{className:"text-center"},s.default.createElement(a.Pagination,{bsSize:"small",items:e,maxButtons:10,activePage:this.state.currentPage,onSelect:this._onChangePage,prev:!0,next:!0,first:!0,last:!0})))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(27),l=n(a),u=s.default.createClass({displayName:"Pluralize",propTypes:{singular:i.default.string.isRequired,plural:i.default.string.isRequired,value:i.default.oneOfType([i.default.number,i.default.string]).isRequired},render:function(){return s.default.createElement("span",null,l.default.pluralize(this.props.value,this.props.singular,this.props.plural))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(431);t(438),t(440);var l=t(442),u=n(l),c=(0,a.WidthProvider)(a.Responsive),d={xxl:6,xl:5,lg:4,md:3,sm:2,xs:1},h={xxl:350*d.xxl,xl:350*d.xl,lg:350*d.lg,md:350*d.md,sm:350*d.sm,xs:350*d.xs},f=s.default.createClass({displayName:"ReactGridContainer",propTypes:{positions:i.default.object.isRequired,children:i.default.node.isRequired,onPositionsChange:i.default.func.isRequired,locked:i.default.bool},getDefaultProps:function(){return{locked:!1}},_onLayoutChange:function(e){var t=[];e.forEach(function(e){t.push({id:e.i,col:e.x+1,row:e.y+1,height:e.h,width:e.w})}),this.props.onPositionsChange(t)},render:function(){var e=this,t=Object.keys(this.props.positions).map(function(t){var n=e.props.positions[t];return{i:t,x:Math.max(n.col-1,0),y:n.row<=0?1/0:n.row-1,h:n.height,w:n.width}});return s.default.createElement(c,{className:u.default.reactGridLayout+" "+(this.props.locked?"locked":"unlocked"),layouts:{xxl:t,xl:t,lg:t,md:t,sm:t,xs:t},breakpoints:h,cols:d,rowHeight:200,margin:[10,10],onDragStop:this._onLayoutChange,onResizeStop:this._onLayoutChange,draggableHandle:this.props.locked?".no-handle":""},this.props.children)}});exports.default=f,e.exports=exports.default},function(e,exports,t){e.exports=t(149).default,e.exports.utils=t(56),e.exports.Responsive=t(436).default,e.exports.Responsive.utils=t(152),e.exports.WidthProvider=t(437).default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var s=Object.assign||function(e){for(var t=1;te.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):ne.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}exports.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t.react-resizable-handle{position:absolute;width:20px;height:20px;bottom:0;right:0;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg08IS0tIEdlbmVyYXRvcjogQWRvYmUgRmlyZXdvcmtzIENTNiwgRXhwb3J0IFNWRyBFeHRlbnNpb24gYnkgQWFyb24gQmVhbGwgKGh0dHA6Ly9maXJld29ya3MuYWJlYWxsLmNvbSkgLiBWZXJzaW9uOiAwLjYuMSAgLS0+DTwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DTxzdmcgaWQ9IlVudGl0bGVkLVBhZ2UlMjAxIiB2aWV3Qm94PSIwIDAgNiA2IiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHZlcnNpb249IjEuMSINCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQl4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjZweCIgaGVpZ2h0PSI2cHgiDT4NCTxnIG9wYWNpdHk9IjAuMzAyIj4NCQk8cGF0aCBkPSJNIDYgNiBMIDAgNiBMIDAgNC4yIEwgNCA0LjIgTCA0LjIgNC4yIEwgNC4yIDAgTCA2IDAgTCA2IDYgTCA2IDYgWiIgZmlsbD0iIzAwMDAwMCIvPg0JPC9nPg08L3N2Zz4=");background-position:100% 100%;padding:0 3px 3px 0;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;cursor:se-resize}',""])},function(e,exports,t){var n=t(441);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(18)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,'.react-resizable{position:relative}.react-resizable-handle{position:absolute;width:20px;height:20px;bottom:0;right:0;background:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+");background-position:100% 100%;padding:0 3px 3px 0;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;cursor:se-resize}',""])},function(e,exports,t){var n=t(443);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(18)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,"._345dcY1IaqNI2CcWZdsmJa{margin:-10px -10px 0}._345dcY1IaqNI2CcWZdsmJa.unlocked .react-draggable{cursor:move}._345dcY1IaqNI2CcWZdsmJa.locked .react-resizable-handle{display:none}._345dcY1IaqNI2CcWZdsmJa .react-grid-placeholder{background:#16ace3}",""]),exports.locals={reactGridLayout:"_345dcY1IaqNI2CcWZdsmJa"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(11),u=s.default.createClass({displayName:"SearchForm",propTypes:{onSearch:i.default.func.isRequired,onReset:i.default.func,label:i.default.string,placeholder:i.default.string,wrapperClass:i.default.string,queryWidth:i.default.any,topMargin:i.default.number,buttonLeftMargin:i.default.number,searchBsStyle:i.default.string,searchButtonLabel:i.default.string,resetButtonLabel:i.default.string,loadingLabel:i.default.string,useLoadingState:i.default.bool,children:i.default.oneOfType([i.default.arrayOf(i.default.element),i.default.element])},getDefaultProps:function(){return{placeholder:"Enter search query...",wrapperClass:"search",queryWidth:"auto",topMargin:15,buttonLeftMargin:5,searchBsStyle:"default",searchButtonLabel:"Search",resetButtonLabel:"Reset",loadingLabel:"Loading..."}},getInitialState:function(){return{isLoading:!1}},componentWillReceiveProps:function(){this._resetLoadingState()},_setLoadingState:function(){this.props.useLoadingState&&this.setState({isLoading:!0})},_resetLoadingState:function(){this.props.useLoadingState&&this.setState({isLoading:!1})},_onSearch:function(e){e.preventDefault(),this._setLoadingState(),this.props.onSearch(this.refs.query.value,this._resetLoadingState)},_onReset:function(){this._resetLoadingState(),this.refs.query.value="",this.props.onReset()},render:function(){return s.default.createElement("div",{className:this.props.wrapperClass,style:{marginTop:this.props.topMargin}},s.default.createElement("form",{className:"form-inline",onSubmit:this._onSearch},s.default.createElement("div",{className:"form-group"},this.props.label&&s.default.createElement("label",{className:"control-label"},this.props.label),s.default.createElement("input",{ref:"query",placeholder:this.props.placeholder,type:"text",style:{width:this.props.queryWidth},label:"Search",className:"query form-control",autoComplete:"off",spellCheck:"false"})),s.default.createElement("div",{className:"form-group",style:{marginLeft:this.props.buttonLeftMargin}},s.default.createElement(a.Button,{bsStyle:this.props.searchBsStyle,type:"submit",disabled:this.state.isLoading,className:"submit-button"},this.state.isLoading?s.default.createElement(l.Spinner,{text:this.props.loadingLabel}):this.props.searchButtonLabel)),this.props.onReset&&s.default.createElement("div",{className:"form-group",style:{marginLeft:this.props.buttonLeftMargin}},s.default.createElement(a.Button,{type:"reset",className:"reset-button",onClick:this._onReset},this.props.resetButtonLabel)),this.props.children))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(11),u=s.default.createClass({displayName:"SelectableList",propTypes:{options:i.default.any,selectedOptionsType:i.default.oneOf(["string","object"]),selectedOptions:i.default.arrayOf([i.default.string,i.default.object]),displayKey:i.default.string,idKey:i.default.string,onChange:i.default.func,autoFocus:i.default.bool},getDefaultProps:function(){return{selectedOptionsType:"string",displayKey:"label",idKey:"value"}},componentWillReceiveProps:function(e){this.props.selectedOptions!==e.selectedOptions&&this.refs.select.clearValue()},_getOptionId:function(e){return"string"==typeof e?e:e[this.props.idKey]},_getOptionDisplayValue:function(e){return"string"==typeof e?e:e[this.props.displayKey]},_onAddOption:function(e){var t=this;if(""!==e){var n=this.props.selectedOptions.slice();"string"===this.props.selectedOptionsType?n.push(e):n.push(this.props.options.filter(function(n){return t._getOptionId(n)===e})[0]),"function"==typeof this.props.onChange&&this.props.onChange(n)}},_onRemoveOption:function(e){var t=this;return function(){var n=t.props.selectedOptions.filter(function(t,n){return n!==e});"function"==typeof t.props.onChange&&t.props.onChange(n)}},render:function(){var e=this,t=this.props.selectedOptions.map(function(t,n){return s.default.createElement(a.ListGroupItem,{key:e._getOptionId(t)+"-"+n},s.default.createElement("div",{className:"pull-right"},s.default.createElement(a.Button,{bsStyle:"primary",bsSize:"xsmall",onClick:e._onRemoveOption(n)},"Remove")),e._getOptionDisplayValue(t))});return s.default.createElement("div",null,s.default.createElement(l.Select,{ref:"select",autofocus:this.props.autoFocus,options:this.props.options,onValueChange:this._onAddOption}),t.length>0&&s.default.createElement(a.ListGroup,{style:{marginTop:10}},t))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(153),u=t(532),c=n(u),d=t(180),h=n(d),f=s.default.createClass({displayName:"SortableList",propTypes:{disableDragging:i.default.bool,items:i.default.arrayOf(i.default.object).isRequired,onMoveItem:i.default.func},getDefaultProps:function(){return{disableDragging:!1}},getInitialState:function(){return{items:this.props.items}},componentWillReceiveProps:function(e){this.setState({items:e.items})},_moveItem:function(e,t){var n=this.state.items,r=n[e];n[e]=n[t],n[t]=r,this.setState({items:n}),"function"==typeof this.props.onMoveItem&&this.props.onMoveItem(n)},render:function(){var e=this,t=this.state.items.map(function(t,n){return s.default.createElement(h.default,{key:"sortable-list-item-"+t.id,disableDragging:e.props.disableDragging,index:n,id:t.id,content:t.title,moveItem:e._moveItem})});return s.default.createElement(a.ListGroup,{className:this.props.disableDragging?"sortable-list":"sortable-list sortable-list-cursor"},t)}});exports.default=(0,l.DragDropContext)(c.default)(f),e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(448);Object.defineProperty(exports,"DragDropManager",{enumerable:!0,get:function(){return n(r).default}});var i=t(512);Object.defineProperty(exports,"DragSource",{enumerable:!0,get:function(){return n(i).default}});var o=t(513);Object.defineProperty(exports,"DropTarget",{enumerable:!0,get:function(){return n(o).default}});var s=t(514);Object.defineProperty(exports,"createTestBackend",{enumerable:!0,get:function(){return n(s).default}})},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};r(this,e);var i=(0,s.default)(l.default);this.context=n,this.store=i,this.monitor=new h.default(i),this.registry=this.monitor.registry,this.backend=t(this),i.subscribe(this.handleRefCountChange.bind(this))}return i(e,[{key:"handleRefCountChange",value:function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)}},{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){function e(e){return function(){for(var r=arguments.length,i=Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{dirtyHandlerIds:(0,d.default)(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:(0,o.default)(e.dragOffset,t),refCount:(0,u.default)(e.refCount,t),dragOperation:(0,a.default)(e.dragOperation,t),stateId:(0,f.default)(e.stateId)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(156),o=n(i),s=t(458),a=n(s),l=t(494),u=n(l),c=t(166),d=n(c),h=t(506),f=n(h)},function(e,exports,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments[1];switch(t.type){case s.BEGIN_DRAG:return r({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case s.PUBLISH_DRAG_SOURCE:return r({},e,{isSourcePublic:!0});case s.HOVER:return r({},e,{targetIds:t.targetIds});case a.REMOVE_TARGET:return-1===e.targetIds.indexOf(t.targetId)?e:r({},e,{targetIds:(0,o.default)(e.targetIds,t.targetId)});case s.DROP:return r({},e,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case s.END_DRAG:return r({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t-1}var r=t(74);e.exports=n},function(e,exports,t){function n(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}var r=t(74);e.exports=n},function(e,exports,t){var n=t(73),r=t(57),i=n(r,"Map");e.exports=i},function(e,exports,t){function n(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}var r=t(76);e.exports=n},function(e,exports){function t(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=t},function(e,exports,t){function n(e){return r(this,e).get(e)}var r=t(76);e.exports=n},function(e,exports,t){function n(e){return r(this,e).has(e)}var r=t(76);e.exports=n},function(e,exports,t){function n(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}var r=t(76);e.exports=n},function(e,exports){function t(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=t},function(e,exports){function t(e){return this.__data__.has(e)}e.exports=t},function(e,exports,t){function n(e,t,n){return t===t?o(e,t,n):r(e,i,n)}var r=t(486),i=t(487),o=t(488);e.exports=n},function(e,exports){function t(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,r=16,i=Date.now;e.exports=t},function(e,exports,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(arguments[1].type){case r.ADD_SOURCE:case r.ADD_TARGET:return e+1;case r.REMOVE_SOURCE:case r.REMOVE_TARGET:return e-1;default:return e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var r=t(78)},function(e,exports,t){var n=t(496),r=t(46),i=t(497),o=t(77),s=r(function(e){return i(n(e,o))});e.exports=s},function(e,exports){function t(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n=120&&v.length>=120)?new r(f&&v):void 0}v=e[0];var y=-1,b=p[0];e:for(;++y0&&void 0!==arguments[0]?arguments[0]:0)+1}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.handlerIds;(0,s.default)("function"==typeof e,"listener must be a function."),(0,s.default)(void 0===r||(0,l.default)(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,o=function(){var n=t.store.getState(),o=n.stateId;try{o===i||o===i+1&&!(0,p.areDirty)(n.dirtyHandlerIds,r)||e()}finally{i=o}};return this.store.subscribe(o)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,s.default)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset,r=function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())};return this.store.subscribe(r)}},{key:"canDragSource",value:function(e){var t=this.registry.getSource(e);return(0,s.default)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);if((0,s.default)(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();return(0,c.default)(n,r)&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){var t=this.registry.getSource(e,!0);return(0,s.default)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1},n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(!(0,c.default)(r,i))return!1;var o=this.getTargetIds();if(!o.length)return!1;var s=o.indexOf(e);return n?s===o.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return(0,f.getSourceClientOffset)(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return(0,f.getDifferenceFromInitialOffset)(this.store.getState().dragOffset)}}]),e}();exports.default=g},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){(0,h.default)("function"==typeof e.canDrag,"Expected canDrag to be a function."),(0,h.default)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),(0,h.default)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}function o(e){(0,h.default)("function"==typeof e.canDrop,"Expected canDrop to be a function."),(0,h.default)("function"==typeof e.hover,"Expected hover to be a function."),(0,h.default)("function"==typeof e.drop,"Expected beginDrag to be a function.")}function s(e,t){if(t&&(0,p.default)(e))return void e.forEach(function(e){return s(e,!1)});(0,h.default)("string"==typeof e||"symbol"===(void 0===e?"undefined":c(e)),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function a(e){var t=(0,b.default)().toString();switch(e){case _.SOURCE:return"S"+t;case _.TARGET:return"T"+t;default:(0,h.default)(!1,"Unknown role: "+e)}}function l(e){switch(e[0]){case"S":return _.SOURCE;case"T":return _.TARGET;default:(0,h.default)(!1,"Cannot parse handler ID: "+e)}}Object.defineProperty(exports,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;nu){for(var t=0,n=s.length-l;t1&&void 0!==arguments[1]?arguments[1]:{};return x.default.apply(void 0,["DragLayer","collect[, options]"].concat(Array.prototype.slice.call(arguments))),(0,b.default)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html",e),(0,b.default)((0,v.default)(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html',t),function(n){var s,h,p=t.arePropsEqual,m=void 0===p?C.default:p,v=n.displayName||n.name||"Component",y=(h=s=function(t){function s(e,t){r(this,s);var n=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,e));return n.handleChange=n.handleChange.bind(n),n.manager=t.dragDropManager,(0,b.default)("object"===l(n.manager),"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",v,v),n.state=n.getCurrentState(),n}return o(s,t),u(s,[{key:"getDecoratedComponentInstance",value:function(){return(0,b.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"shouldComponentUpdate",value:function(e,t){return!m(e,this.props)||!(0,w.default)(t,this.state)}}]),u(s,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,w.default)(e,this.state)||this.setState(e)}}},{key:"getCurrentState",value:function(){var t=this.manager.getMonitor();return e(t)}},{key:"render",value:function(){var e=this;return d.default.createElement(n,a({},this.props,this.state,{ref:function(t){e.child=t}}))}}]),s}(c.Component),s.DecoratedComponent=n,s.displayName="DragLayer("+v+")",s.contextTypes={dragDropManager:f.default.object.isRequired},h);return(0,g.default)(y,n)}}Object.defineProperty(exports,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:{};u.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var i=e;"function"!=typeof e&&((0,o.default)((0,w.default)(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',e),i=function(){return e}),(0,o.default)((0,a.default)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',t);var s=(0,g.default)(t);return(0,o.default)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),(0,o.default)((0,a.default)(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),function(e){return(0,d.default)({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:s,registerHandler:f.default,createMonitor:v.default,createConnector:b.default,DecoratedComponent:e,getType:i,collect:n,options:r})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(22),o=n(i),s=t(39),a=n(s),l=t(79),u=n(l),c=t(173),d=n(c),h=t(522),f=n(h),p=t(523),g=n(p),m=t(524),v=n(m),y=t(525),b=n(y),_=t(176),w=n(_)},function(e,exports,t){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};exports.__esModule=!0;var r=t(109),i=n(r);exports.isDisposable=i.default;var o=t(519),s=n(o);exports.Disposable=s.default;var a=t(520),l=n(a);exports.CompositeDisposable=l.default;var u=t(521),c=n(u);exports.SerialDisposable=c.default},function(e,exports,t){"use strict";var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',u.join(", "),t),(0,a.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}),c.forEach(function(t){(0,a.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])});var t=function(){function t(e){r(this,t),this.monitor=e,this.props=null,this.component=null}return o(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrag",value:function(){return!e.canDrag||e.canDrag(this.props,this.monitor)}},{key:"isDragging",value:function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()}},{key:"beginDrag",value:function(){var t=e.beginDrag(this.props,this.monitor,this.component);return t}},{key:"endDrag",value:function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)}}]),t}();return function(e){return new t(e)}}Object.defineProperty(exports,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?(0,o.cloneElement)(e,{ref:function(e){t(e),n&&n(e)}}):(0,o.cloneElement)(e,{ref:t})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var r=t(22),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=t(0)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};u.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var i=e;"function"!=typeof e&&((0,o.default)((0,w.default)(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',e),i=function(){return e}),(0,o.default)((0,a.default)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',t);var s=(0,g.default)(t);return(0,o.default)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),(0,o.default)((0,a.default)(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),function(e){return(0,d.default)({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:s,registerHandler:f.default,createMonitor:v.default,createConnector:b.default,DecoratedComponent:e,getType:i,collect:n,options:r})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var i=t(22),o=n(i),s=t(39),a=n(s),l=t(79),u=n(l),c=t(173),d=n(c),h=t(528),f=n(h),p=t(529),g=n(p),m=t(530),v=n(m),y=t(531),b=n(y),_=t(176),w=n(_)},function(e,exports,t){"use strict";function n(e,t,n){function r(){i.removeTarget(o)}var i=n.getRegistry(),o=i.addTarget(e,t);return{handlerId:o,unregister:r}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){Object.keys(e).forEach(function(t){(0,a.default)(u.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',u.join(", "),t),(0,a.default)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html",t,t,e[t])});var t=function(){function t(e){r(this,t),this.monitor=e,this.props=null,this.component=null}return o(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrop",value:function(){return!e.canDrop||e.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){e.hover&&e.hover(this.props,this.monitor,this.component)}},{key:"drop",value:function(){if(e.drop){var t=e.drop(this.props,this.monitor,this.component);return t}}}]),t}();return function(e){return new t(e)}}Object.defineProperty(exports,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++r0}},{key:"leave",value:function(e){var t=this.entered.length;return this.entered=(0,l.default)(this.entered.filter(function(e){return document.documentElement.contains(e)}),e),t>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}]),e}();exports.default=u},function(e,exports,t){var n=t(167),r=t(46),i=t(169),o=t(77),s=r(function(e){return i(n(e,1,o,!0))});e.exports=s},function(e,exports,t){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var o=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=o.cache;if(i.has(r))return i.get(r);var s=e.apply(this,n);return o.cache=i.set(r,s)||i,s};return o.cache=new(n.Cache||r),o}var r=t(160),i="Expected a function";n.Cache=r,e.exports=n},function(e,exports,t){"use strict";function n(e){var t=e.nodeType===c?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function r(e){return{x:e.clientX,y:e.clientY}}function i(e){return"IMG"===e.nodeName&&((0,a.isFirefox)()||!document.documentElement.contains(e))}function o(e,t,n,r){var i=e?t.width:n,o=e?t.height:r;return(0,a.isSafari)()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function s(e,t,r,s,l){var c=i(t),d=c?e:t,h=n(d),f={x:r.x-h.x,y:r.y-h.y},p=e.offsetWidth,g=e.offsetHeight,m=s.anchorX,v=s.anchorY,y=o(c,t,p,g),b=y.dragPreviewWidth,_=y.dragPreviewHeight,w=l.offsetX,A=l.offsetY,C=0===w||w,E=0===A||A;return{x:C?w:function(){return new u.default([0,.5,1],[f.x,f.x/p*b,f.x+b-p]).interpolate(m)}(),y:E?A:function(){var e=new u.default([0,.5,1],[f.y,f.y/g*_,f.y+_-g]),t=e.interpolate(v);return(0,a.isSafari)()&&c&&(t+=(window.devicePixelRatio-1)*_),t}()}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getNodeClientOffset=n,exports.getEventClientOffset=r,exports.getDragPreviewOffset=s;var a=t(179),l=t(557),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=1},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne))return n[u];l=u-1}}s=Math.max(0,l);var d=e-t[s],h=d*d;return n[s]+r[s]*d+i[s]*h+o[s]*d*h}}]),e}();exports.default=i},function(e,exports,t){"use strict";function n(e,t){for(var n in t){var r=t[n];r.configurable=r.enumerable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n,r)}return e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t,n){var r=t.reduce(function(t,n){return t||e.getData(n)},null);return null!=r?r:n}function s(e){var t=h[e],i=t.exposeProperty,o=t.matchesTypes,s=t.getData;return function(){function e(){var t,o;r(this,e),this.item=(t={},o={},o[i]=o[i]||{},o[i].get=function(){return console.warn("Browser doesn't allow reading \""+i+'" until the drop event.'),null},n(t,o),t)}return u(e,[{key:"mutateItemByReadingDataTransfer",value:function(e){delete this.item[i],this.item[i]=s(e,o)}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}]),e}()}function a(e){var t=Array.prototype.slice.call(e.types||[]);return Object.keys(h).filter(function(e){return h[e].matchesTypes.some(function(e){return t.indexOf(e)>-1})})[0]||null}Object.defineProperty(exports,"__esModule",{value:!0});var l,u=function(){function e(e,t){for(var n=0;n1&&(e=this.props.headerActionsFactory(this.state.selected));var t=s.default.createElement("div",null,e,s.default.createElement(c.Input,{type:"checkbox",label:"Select all",checked:this.state.allSelected,onChange:this._toggleSelectAll,groupClassName:"form-group-inline"}));return s.default.createElement(u.ListGroupItem,{className:"list-group-header",header:t})},_toggleSelectAll:function(e){var t=this,n=e.target.checked?l.default.Set(this.state.filteredItems.map(function(e){return e[t.props.idKey]})):l.default.Set();this.setState({selected:n,allSelected:!this.state.allSelected})},_formatItem:function(e){var t=s.default.createElement("div",null,s.default.createElement("div",{className:"pull-right",style:{marginTop:10,marginBottom:10}},this.props.itemActionsFactory(e)),s.default.createElement(c.Input,{type:"checkbox",label:e[this.props.titleKey],checked:this.state.selected.includes(e[this.props.idKey]),onChange:this._onItemSelect(e[this.props.idKey]),groupClassName:"form-group-inline"}));return s.default.createElement(u.ListGroupItem,{key:"item-"+e[this.props.idKey],header:t},s.default.createElement("span",{style:{marginLeft:20}},e[this.props.descriptionKey]))},_onItemSelect:function(e){var t=this;return function(n){var r=n.target.checked?t.state.selected.add(e):t.state.selected.delete(e);t.setState({selected:r})}},render:function(){var e=this;if(0===this.props.items.count())return s.default.createElement(u.Row,null,s.default.createElement(u.Col,{md:12},s.default.createElement("div",null,"No items to display.")));var t=this.state.filteredItems.map(function(t){return e._formatItem(t)}).toJS(),n=void 0;return 0!==this.props.filterKeys.length&&(n=s.default.createElement(u.Row,null,s.default.createElement(u.Col,{md:5},s.default.createElement(d.TypeAheadDataFilter,{label:this.props.filterLabel,data:this.props.items,displayKey:"value",filterSuggestions:[],searchInKeys:this.props.filterKeys,onDataFiltered:this._filterItems})))),0===this.state.filteredItems.count()?s.default.createElement("div",null,n,s.default.createElement("div",null,"No items match your filter criteria")):s.default.createElement("div",null,n,s.default.createElement(u.ListGroup,null,this._headerItem(),t))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(20),l=n(a),u=s.default.createClass({displayName:"Timestamp",propTypes:{dateTime:i.default.oneOfType([i.default.string,i.default.object]).isRequired,format:i.default.string,relative:i.default.bool,tz:i.default.string},getDefaultProps:function(){return{format:l.default.Formats.TIMESTAMP}},_formatDateTime:function(){var e=new l.default(this.props.dateTime);if(this.props.relative)return e.toRelativeString();switch(this.props.tz){case null:case void 0:return e.toString(this.props.format);case"browser":return e.toBrowserLocalTime().toString(this.props.format);default:return e.toTimeZone(this.props.tz).toString(this.props.format)}},render:function(){return s.default.createElement("time",{key:"time-"+this.props.dateTime,dateTime:this.props.dateTime,title:this.props.dateTime},this._formatDateTime())}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1?r[0]:e._UNCLASSIFIED_AREA,o=r.length>1?r[1]:r[0];t[i]||(t[i]=[]),t[i].push(o)}),[].concat.apply([],Object.keys(t).sort().map(function(n){return[{label:n,disabled:!0,value:n}].concat(d.default.unique(t[n]).sort().map(function(t){return{value:n===e._UNCLASSIFIED_AREA?t:n+"/"+t,label:t.replace("_"," ")}}))}))},_renderOption:function(e){return e.disabled?a.default.createElement("span",{key:e.value,title:e.value},e.label):a.default.createElement("span",{key:e.value,title:e.value}," ",e.label)},render:function(){var e=this._formatTimezones();return a.default.createElement(f.default,r({ref:"timezone"},this.props,{placeholder:"Pick a time zone",options:e,optionRenderer:this._renderOption}))}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=t(1),o=n(i),s=t(0),a=n(s),l=t(4),u=t(16),c=n(u),d=t(11),h=a.default.createClass({displayName:"TypeAheadDataFilter",propTypes:{data:o.default.array,displayKey:o.default.string,filterBy:o.default.string,filterData:o.default.func,filterSuggestionAccessor:o.default.string,filterSuggestions:o.default.array,label:o.default.string,onDataFiltered:o.default.func,searchInKeys:o.default.array},getInitialState:function(){return{filterText:"",filters:c.default.OrderedSet(),filterByKey:this.props.filterBy+"s"}},_onSearchTextChanged:function(e){e.preventDefault(),this.setState({filterText:this.refs.typeAheadInput.getValue()},this.filterData)},_onFilterAdded:function(e,t){this.setState({filters:this.state.filters.add(t[this.props.displayKey]),filterText:""},this.filterData),this.refs.typeAheadInput.clear()},_onFilterRemoved:function(e){e.preventDefault(),this.setState({filters:this.state.filters.delete(e.target.getAttribute("data-target"))},this.filterData)},_matchFilters:function(e){var t=this;return this.state.filters.every(function(n){var r=e[t.state.filterByKey];return r=t.props.filterSuggestionAccessor?r.map(function(e){return e[t.props.filterSuggestionAccessor].toLocaleLowerCase()}):r.map(function(e){return e.toLocaleLowerCase()}),-1!==r.indexOf(n.toLocaleLowerCase())},this)},_matchStringSearch:function(e){var t=this;return this.props.searchInKeys.some(function(n){var i=e[n],o=t.state.filterText;if(null===i)return!1;var s=function(e,t){return void 0!==e&&-1!==e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())};return"object"===(void 0===i?"undefined":r(i))?i.some(function(e){return s(e,o)}):s(i,o)},this)},_resetFilters:function(){this.refs.typeAheadInput.clear(),this.setState({filterText:"",filters:c.default.OrderedSet()},this.filterData)},filterData:function(){var e=this;if("function"==typeof this.props.filterData)return this.props.filterData(this.props.data);var t=this.props.data.filter(function(t){return e._matchFilters(t)&&e._matchStringSearch(t)},this);this.props.onDataFiltered(t)},render:function(){var e=this,t=this.state.filters.map(function(t){return a.default.createElement("li",{key:"li-"+t},a.default.createElement("span",{className:"pill label label-default"},e.props.filterBy,": ",t,a.default.createElement("a",{className:"tag-remove","data-target":t,onClick:e._onFilterRemoved})))}),n=void 0;return n=this.props.filterSuggestionAccessor?this.props.filterSuggestions.map(function(t){return t[e.props.filterSuggestionAccessor].toLocaleLowerCase()}):this.props.filterSuggestions.map(function(e){return e.toLocaleLowerCase()}),n.filter(function(t){return!e.state.filters.includes(t)}),a.default.createElement("div",{className:"filter"},a.default.createElement("form",{className:"form-inline",onSubmit:this._onSearchTextChanged,style:{display:"inline"}},a.default.createElement(d.TypeAheadInput,{ref:"typeAheadInput",onSuggestionSelected:this._onFilterAdded,suggestionText:"Filter by "+this.props.filterBy+": ",suggestions:n,label:this.props.label,displayKey:this.props.displayKey}),a.default.createElement(l.Button,{type:"submit",style:{marginLeft:5}},"Filter"),a.default.createElement(l.Button,{type:"button",style:{marginLeft:5},onClick:this._resetFilters,disabled:0===this.state.filters.count()&&""===this.state.filterText},"Reset")),a.default.createElement("ul",{className:"pill-list"},t))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t"+e.suggestionText+" "+t[e.displayKey]+"
":"
"+t.value+"
"}}}),"function"==typeof e.onTypeaheadLoaded&&(e.onTypeaheadLoaded(),t.typeahead("close")),(0,f.default)(this.fieldFormGroup).on("typeahead:select typeahead:autocomplete",function(t,n){e.onSuggestionSelected&&e.onSuggestionSelected(t,n)})},render:function(){return s.default.createElement(u.Input,{type:"text",ref:"fieldInput",wrapperClassName:"typeahead-wrapper",label:this.props.label,onKeyPress:this.props.onKeyPress})}}));exports.default=g,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(13),u=[{value:"STRING",label:"string"},{value:"NUMBER",label:"number"},{value:"OBJECT",label:"object"},{value:"ARRAY",label:"array"},{value:"BOOLEAN",label:"boolean"},{value:"NULL",label:"null"}],c=s.default.createClass({displayName:"JSONValueInput",propTypes:{update:i.default.func.isRequired,label:i.default.string,help:i.default.oneOfType([i.default.string,i.default.object]),required:i.default.bool,validationState:i.default.string,value:i.default.string,valueType:i.default.oneOf(u.map(function(e){return e.value})),allowedTypes:function(e,t,n){var r=u.map(function(e){return e.value}),i=[];return e[t]instanceof Array?(e[t].forEach(function(e){r.indexOf(e)<0&&i.push(e)}),i.length>0?new Error("Invalid prop "+t+" supplied to "+n+". Expected array of "+r+" but got invalid "+i):null):new Error("Invalid prop "+t+" supplied to "+n+". Expected an array but got "+e[t])},labelClassName:i.default.string,wrapperClassName:i.default.string},getDefaultProps:function(){return{value:"",valueType:"STRING",allowedTypes:u.map(function(e){return e.value}),label:"",help:"",required:!1,validationState:null,labelClassName:void 0,wrapperClassName:void 0}},getInitialState:function(){return this._computeInitialState(this.props)},componentWillReceiveProps:function(e){this.setState(this._computeInitialState(e))},_computeInitialState:function(e){return{value:e.value,valueType:e.valueType}},_propagateState:function(){this.props.update(this.state.value,this.state.valueType)},_onUpdate:function(e){var t=e.target.value;this.setState({value:t},this._propagateState)},_onValueTypeSelect:function(e){this.setState({valueType:e},this._propagateState)},render:function(){var e=this,t=u.filter(function(t){return e.props.allowedTypes.indexOf(t.value)>-1}).map(function(t){return s.default.createElement(a.MenuItem,{key:t.value,onSelect:function(){return e._onValueTypeSelect(t.value)}},t.label)});return s.default.createElement(a.FormGroup,{validationState:this.props.validationState},this.props.label&&s.default.createElement(a.ControlLabel,{className:this.props.labelClassName},this.props.label),s.default.createElement(l.InputWrapper,{className:this.props.wrapperClassName},s.default.createElement(a.InputGroup,null,s.default.createElement(a.FormControl,{type:"text",onChange:this._onUpdate,value:this.state.value,required:this.props.required}),s.default.createElement(a.DropdownButton,{componentClass:a.InputGroup.Button,id:"input-dropdown-addon",bsStyle:"error"===this.props.validationState?"danger":null,title:u.filter(function(t){return t.value===e.props.valueType})[0].label},t)),this.props.help&&s.default.createElement(a.HelpBlock,null,this.props.help)))}});exports.default=c,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(13),u=s.default.createClass({displayName:"TimeUnitInput",propTypes:{update:i.default.func.isRequired,label:i.default.string,help:i.default.string,required:i.default.bool,enabled:i.default.bool,value:i.default.number,unit:i.default.oneOf(["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"]),labelClassName:i.default.string,wrapperClassName:i.default.string},getDefaultProps:function(){return{value:1,unit:"SECONDS",label:"",help:"",required:!1,enabled:!1,labelClassName:void 0,wrapperClassName:void 0}},getInitialState:function(){return{checked:this.props.required||this.props.enabled,value:this.props.value,unit:this.props.unit}},OPTIONS:[{value:"NANOSECONDS",label:"nanoseconds"},{value:"MICROSECONDS",label:"microseconds"},{value:"MILLISECONDS",label:"milliseconds"},{value:"SECONDS",label:"seconds"},{value:"MINUTES",label:"minutes"},{value:"HOURS",label:"hours"},{value:"DAYS",label:"days"}],_propagateState:function(){this.props.update(this.state.value,this.state.unit,this.state.checked)},_onToggleEnable:function(e){this.setState({checked:e.target.checked},this._propagateState)},_onUpdate:function(e){var t=e.target.value;this.setState({value:t},this._propagateState)},_onUnitSelect:function(e){this.setState({unit:e},this._propagateState)},render:function(){var e=this,t=this.OPTIONS.map(function(t){return s.default.createElement(a.MenuItem,{key:t.value,onSelect:function(){return e._onUnitSelect(t.value)}},t.label)}),n=s.default.createElement(a.InputGroup.Addon,null,s.default.createElement("input",{type:"checkbox",checked:this.state.checked,onChange:this._onToggleEnable}));return s.default.createElement(a.FormGroup,null,this.props.label&&s.default.createElement(a.ControlLabel,{className:this.props.labelClassName},this.props.label),s.default.createElement(l.InputWrapper,{className:this.props.wrapperClassName},s.default.createElement(a.InputGroup,null,!this.props.required&&n,s.default.createElement(a.FormControl,{type:"text",disabled:!this.state.checked,onChange:this._onUpdate,value:this.state.value}),s.default.createElement(a.DropdownButton,{componentClass:a.InputGroup.Button,id:"input-dropdown-addon",title:this.OPTIONS.filter(function(t){return t.value===e.state.unit})[0].label},t)),this.props.help&&s.default.createElement(a.HelpBlock,null,this.props.help)))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=s.default.createClass({displayName:"TimeUnit",propTypes:{value:i.default.number.isRequired,unit:i.default.oneOf(["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"]).isRequired,zeroIsNever:i.default.bool},getDefaultProps:function(){return{zeroIsNever:!0}},UNITS:{NANOSECONDS:"nanoseconds",MICROSECONDS:"microseconds",MILLISECONDS:"milliseconds",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days"},render:function(){return 0===this.props.value&&this.props.zeroIsNever?s.default.createElement("span",null,"Never"):s.default.createElement("span",null,this.props.value," ",this.UNITS[this.props.unit])}});exports.default=a,e.exports=exports.default},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n=1.9","react-hot-loader":"^3.0.0-beta.6","react-proxy-loader":"^0.3.4","script-loader":"^0.7.0","style-loader":"^0.18.2","ts-loader":"^2.3.1",typescript:"^2.4.2","url-loader":"^0.5.6",webpack:"^3.4.1","webpack-dev-server":"^2.6.1","webpack-merge":"^4.1.0"}}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(2),s=n(o),a=t(4),l=t(19),u=t(80),c=n(u),d=t(11),h=t(36),f=t(183),p=n(f),g=t(81),m=n(g),v=t(113),y=n(v),b=t(114),_=n(b),w=t(184),A=n(w),C=t(7),E=n(C),x=t(14),S=n(x),F=E.default.getStore("Streams"),k=i.default.createClass({displayName:"ProcessingTimelineComponent",mixins:[s.default.connect(y.default),s.default.connect(A.default)],componentDidMount:function(){var e=this;this.style.use(),m.default.list(),_.default.list(),F.listStreams().then(function(t){e.setState({streams:t})})},componentWillUnmount:function(){this.style.unuse()},style:t(592),_calculateUsedStages:function(e){return e.map(function(e){return e.stages}).reduce(function(e,t){return e.concat(t.map(function(e){return e.stage}).filter(function(t){return-1===e.indexOf(t)}))},[]).sort(c.default)},_headerCellFormatter:function(e){var t=void 0;return"Actions"===e&&(t="actions"),i.default.createElement("th",{className:t},e)},_formatConnectedStreams:function(e){return e.map(function(e){return e.title}).join(", ")},_formatStages:function(e,t){var n=[],r=t.map(function(e){return e.stage});return this.usedStages.forEach(function(t){-1===r.indexOf(t)?n.push(i.default.createElement("div",{key:e.id+"-stage"+t,className:"pipeline-stage idle-stage"},"Idle")):n.push(i.default.createElement("div",{key:e.id+"-stage"+t,className:"pipeline-stage used-stage"},"Stage ",t))},this),n},_pipelineFormatter:function(e){return i.default.createElement("tr",{key:e.id},i.default.createElement("td",{className:"pipeline-name"},i.default.createElement(l.LinkContainer,{to:S.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")(e.id)},i.default.createElement("a",null,e.title)),i.default.createElement("br",null),e.description,i.default.createElement("br",null),i.default.createElement(h.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline."+e.id+".executed"},i.default.createElement(h.CounterRate,{prefix:"Throughput:",suffix:"msg/s"}))),i.default.createElement("td",{className:"stream-list"},i.default.createElement(p.default,{pipeline:e,connections:this.state.connections,streams:this.state.streams,streamsFormatter:this._formatConnectedStreams,noConnectionsMessage:i.default.createElement("em",null,"Not connected")})),i.default.createElement("td",null,this._formatStages(e,e.stages)),i.default.createElement("td",null,i.default.createElement(a.Button,{bsStyle:"primary",bsSize:"xsmall",onClick:this._deletePipeline(e)},"Delete")," ",i.default.createElement(l.LinkContainer,{to:S.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")(e.id)},i.default.createElement(a.Button,{bsStyle:"info",bsSize:"xsmall"},"Edit"))))},_deletePipeline:function(e){return function(){confirm('Do you really want to delete pipeline "'+e.title+'"? This action cannot be undone.')&&m.default.delete(e.id)}},_isLoading:function(){return!this.state.pipelines||!this.state.streams||!this.state.connections},render:function(){if(this._isLoading())return i.default.createElement(d.Spinner,null);var e=i.default.createElement("div",{className:"pull-right"},i.default.createElement(l.LinkContainer,{to:S.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")("new")},i.default.createElement(a.Button,{bsStyle:"success"},"Add new pipeline")));if(0===this.state.pipelines.length)return i.default.createElement("div",null,e,i.default.createElement(a.Alert,null,"There are no pipelines configured in your system. Create one to start processing your messages."));this.usedStages=this._calculateUsedStages(this.state.pipelines);var t=["Pipeline","Connected to Streams","Processing Timeline","Actions"];return i.default.createElement("div",null,e,i.default.createElement(d.DataTable,{id:"processing-timeline",className:"table-hover",headers:t,headerCellFormatter:this._headerCellFormatter,sortByKey:"title",rows:this.state.pipelines,dataRowFormatter:this._pipelineFormatter,filterLabel:"Filter pipelines",filterKeys:["title"]}))}});exports.default=k,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(24),l=n(a),u=s.default.createClass({displayName:"CounterDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return s.default.createElement("dl",{className:"metric-def metric-counter"},s.default.createElement("dt",null,"Value:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.count).format("0,0"))))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(24),l=n(a),u=t(94),c=n(u),d=s.default.createClass({displayName:"CounterRate",propTypes:{metric:i.default.object,showTotal:i.default.bool,prefix:i.default.string,suffix:i.default.string,hideOnZero:i.default.bool,hideOnMissing:i.default.bool},getDefaultProps:function(){return{showTotal:!1,prefix:null,suffix:"per second",hideOnZero:!1,hideOnMissing:!1}},getInitialState:function(){return{prevMetric:null,prevTs:null,nowTs:c.default.nowInSeconds()}},componentWillReceiveProps:function(){this.setState({prevMetric:this.props.metric,prevTs:this.state.nowTs,nowTs:c.default.nowInSeconds()})},_checkPrevMetric:function(){return this.state.prevMetric&&void 0!==this.state.prevMetric.count&&this.state.prevTs},_placeholder:function(){return this.props.hideOnZero?null:s.default.createElement("span",null,this._prefix(),"Calculating...")},_prefix:function(){return this.props.prefix?this.props.prefix+" ":null},_suffix:function(){return this.props.suffix?" "+this.props.suffix:null},render:function(){if(!this.props.metric||void 0===this.props.metric.count){if(this.props.hideOnMissing)return null;if(!this._checkPrevMetric())return this._placeholder()}var e=this.props.metric.count,t=null;if(!this._checkPrevMetric())return this._placeholder();var n=(e-this.state.prevMetric.count)/(this.state.nowTs-this.state.prevTs);return t=s.default.createElement("span",{key:"rate",className:"number-format"},this._prefix(),(0,l.default)(n).format("0,0"),this._suffix()),this.props.hideOnMissing&&!t?null:s.default.createElement("span",null,t,this.props.showTotal&&s.default.createElement("span",{key:"absolute",className:"number-format"}," (",(0,l.default)(e).format("0")," total)"))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(24),l=n(a),u=s.default.createClass({displayName:"GaugeDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return s.default.createElement("dl",{className:"metric-def metric-gauge"},s.default.createElement("dt",null,"Value:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.value).format("0,0"))))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(24),l=n(a),u=s.default.createClass({displayName:"HistogramDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return s.default.createElement("dl",{className:"metric-def metric-histogram"},s.default.createElement("dt",null,"95th percentile:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.time["95th_percentile"]).format("0,0.[00]"))),s.default.createElement("dt",null,"98th percentile:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.time["98th_percentile"]).format("0,0.[00]"))),s.default.createElement("dt",null,"99th percentile:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.time["99th_percentile"]).format("0,0.[00]"))),s.default.createElement("dt",null,"Standard deviation:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.std_dev).format("0,0.[00]"))),s.default.createElement("dt",null,"Mean:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.mean).format("0,0.[00]"))),s.default.createElement("dt",null,"Minimum:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.min).format("0,0.[00]"))),s.default.createElement("dt",null,"Maximum:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.time.max).format("0,0.[00]"))),s.default.createElement("dt",null,"Count:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.count).format("0,0"))))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(24),l=n(a),u=s.default.createClass({displayName:"MeterDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric;return s.default.createElement("dl",{className:"metric-def metric-meter"},s.default.createElement("dt",null,"Total:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.total).format("0,0"))," events"),s.default.createElement("dt",null,"Mean:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.mean).format("0,0.[00]"))," ",e.rate_unit),s.default.createElement("dt",null,"1 minute avg:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.one_minute).format("0,0.[00]"))," ",e.rate_unit),s.default.createElement("dt",null,"5 minute avg:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.five_minute).format("0,0.[00]"))," ",e.rate_unit),s.default.createElement("dt",null,"15 minute avg:"),s.default.createElement("dd",null,s.default.createElement("span",{className:"number-format"},(0,l.default)(e.rate.fifteen_minute).format("0,0.[00]"))," ",e.rate_unit))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(36),l=s.default.createClass({displayName:"Metric",propTypes:{metric:i.default.object.isRequired,namespace:i.default.string,nodeId:i.default.string.isRequired},getInitialState:function(){return{expanded:!1}},iconMapping:{timer:"clock-o",histogram:"signal",meter:"play-circle",gauge:"dashboard",counter:"circle",unknown:"question-circle"},_formatIcon:function(e){var t=this.iconMapping[e];return t||this.iconMapping.unknown},_formatName:function(e){var t=this.props.namespace,n=e.split(t),r=n.slice(1).join(t);return s.default.createElement("span",null,s.default.createElement("span",{className:"prefix"},t),r)},_showDetails:function(e){e.preventDefault(),this.setState({expanded:!this.state.expanded})},render:function(){var e=this.props.metric,t=this.state.expanded?s.default.createElement(a.MetricDetails,{nodeId:this.props.nodeId,metric:this.props.metric}):null;return s.default.createElement("span",null,s.default.createElement("div",{className:"name"},s.default.createElement("i",{className:"fa fa-"+this._formatIcon(e.type)})," ",s.default.createElement("a",{className:"open",href:"#",onClick:this._showDetails},this._formatName(e.full_name))),t)}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(94),c=(n(u),t(7)),d=n(c),h=t(8),f=n(h),p=t(581),g=n(p),m=d.default.getStore("Metrics"),v=f.default.getActions("Metrics"),y=s.default.createClass({displayName:"MetricContainer",propTypes:{name:i.default.string.isRequired,zeroOnMissing:i.default.bool,children:i.default.node.isRequired},mixins:[l.default.connect(m)],getDefaultProps:function(){return{zeroOnMissing:!0}},componentWillMount:function(){v.addGlobal(this.props.name)},shouldComponentUpdate:function(e,t){return!this.state.metricsUpdatedAt||!t.metricsUpdatedAt||t.metricsUpdatedAt>this.state.metricsUpdatedAt},componentWillUnmount:function(){v.removeGlobal(this.props.name)},render:function(){var e=this;if(!this.state.metrics)return s.default.createElement("span",null,"Loading...");var t=this.props.name,n=Object.keys(this.state.metrics).map(function(n){return g.default.getValuesForNode(e.state.metrics[n],{throughput:t})}).reduce(function(e,t){return{throughput:(e.throughput||0)+(t.throughput||0)}});return!this.props.zeroOnMissing||n&&n.throughput||(n={throughput:0}),s.default.createElement("div",null,s.default.Children.map(this.props.children,function(e){return s.default.cloneElement(e,{metric:{full_name:t,count:n.throughput}})}))}});exports.default=y,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={getValuesForNode:function(e,t){if(null===e||void 0===e||0===Object.keys(e).length)return{};var n={};return Object.keys(t).forEach(function(r){var i=t[r],o=e[i];o&&("gauge"===o.type?n[r]=o.metric.value:"counter"===o.type?n[r]=o.metric.count:"meter"===o.type?n[r]=o.metric.rate.total:"timer"===o.type?n[r]=o.metric.rate.total:n[r]=null)}),n}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(182),c=n(u),d=t(7),h=n(d),f=t(8),p=n(f),g=t(36),m=h.default.getStore("Metrics"),v=p.default.getActions("Metrics"),y=s.default.createClass({displayName:"MetricDetails",propTypes:{metric:i.default.object.isRequired},mixins:[l.default.connect(m)],componentDidMount:function(){v.add(this.props.nodeId,this.props.metric.full_name)},componentWillUnmount:function(){v.remove(this.props.nodeId,this.props.metric.full_name)},_formatDetailsForType:function(e,t){switch(e){case"Counter":return s.default.createElement(g.CounterDetails,{metric:t});case"Gauge":return s.default.createElement(g.GaugeDetails,{metric:t});case"Histogram":return s.default.createElement(g.HistogramDetails,{metric:t});case"Meter":return s.default.createElement(g.MeterDetails,{metric:t});case"Timer":return s.default.createElement(g.TimerDetails,{metric:t});default:return s.default.createElement("i",null,"Invalid metric type: ",e)}},render:function(){var e=this.props.metric.full_name,t=this.props.nodeId,n=this.state.metrics&&this.state.metrics[t]&&this.state.metrics[t][e]?this.state.metrics[t][e]:this.props.metric,r=(0,c.default)(n.type).capitalize().toString(),i=this._formatDetailsForType(r,n);return s.default.createElement("div",{className:"metric"},s.default.createElement("h3",null,r),i)}});exports.default=y,e.exports=exports.default},function(e,exports){function t(e,t){for(var n=0,r=e.indexOf(t);r>=0;)n+=1,r=e.indexOf(t,r+1);return n}e.exports=t},function(e,exports){function t(e,t,n,r){if(void 0===n)var n=-1;var i=e.split(t),o=i.slice(0,n),s=i.slice(n);return i=0===s.length?o:o.concat(s.join(t)),void 0===r?i:r<0?i.slice(r):i.slice(0,r)}e.exports=t},function(e,exports){function t(e,t,n,r){if(void 0===n)var n=-1;if(void 0===r)var r=0;for(var i=[e],o=e.length-1;o>=0;o--)0===i[0].slice(o).indexOf(t)&&(i.length<=n||-1===n)&&(i.splice(1,0,i[0].slice(o+t.length)),i[0]=i[0].slice(0,o));return r>=0?i.slice(-r):i.slice(0,-r)}e.exports=t},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=(n(a),t(587)),u=n(l),c=t(4),d=t(182),h=n(d),f=(t(11),t(36)),p=s.default.createClass({displayName:"MetricsComponent",propTypes:{names:i.default.arrayOf(i.default.object).isRequired,namespace:i.default.string.isRequired,nodeId:i.default.string.isRequired},mixins:[u.default],getInitialState:function(){return{filter:this.props.filter}},getDefaultProps:function(){return{filter:""}},render:function(){var e=void 0;try{var t=new RegExp(this.state.filter,"i");e=this.props.names.filter(function(e){return(0,h.default)(e.full_name).match(t)})}catch(t){e=[]}return s.default.createElement(c.Row,{className:"content"},s.default.createElement(c.Col,{md:12},s.default.createElement(f.MetricsFilterInput,{valueLink:this.linkState("filter")}),s.default.createElement(f.MetricsList,{names:e,namespace:this.props.namespace,nodeId:this.props.nodeId})))}});exports.default=p,e.exports=exports.default},function(e,exports,t){e.exports=t(10)(336)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t0?t:s.default.createElement("li",null,"No metrics match the given filter. Please ensure you use a valid regular expression"))}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(52),c=n(u),d=c.default.get("Metrics"),h=d.MetricsActions,f=d.MetricsStore,p=s.default.createClass({displayName:"MetricsMapper",propTypes:{map:i.default.object.isRequired,computeValue:i.default.func.isRequired},mixins:[l.default.connect(f)],getDefaultProps:function(){return{}},getInitialState:function(){return{}},componentWillMount:function(){var e=this;Object.keys(this.props.map).forEach(function(t){return h.addGlobal(e.props.map[t])})},shouldComponentUpdate:function(e,t){return!this.state.metricsUpdatedAt||!t.metricsUpdatedAt||t.metricsUpdatedAt>this.state.metricsUpdatedAt},componentWillUnmount:function(){var e=this;Object.keys(this.props.map).forEach(function(t){return h.removeGlobal(e.props.map[t])})},render:function(){var e=this;if(!this.state.metrics)return null;var t={};Object.keys(this.state.metrics).forEach(function(n){Object.keys(e.props.map).forEach(function(r){var i=e.props.map[r];e.state.metrics[n][i]&&(t[n]||(t[n]={}),t[n][r]=e.state.metrics[n][i])})});var n=this.props.computeValue(t);return s.default.createElement("span",null,n)}});exports.default=p,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(24),l=n(a),u=s.default.createClass({displayName:"TimerDetails",propTypes:{metric:i.default.object.isRequired},render:function(){var e=this.props.metric.metric.time;return s.default.createElement("dl",{className:"metric-def metric-timer"},s.default.createElement("dt",null,"95th percentile:"),s.default.createElement("dd",null,s.default.createElement("span",null,(0,l.default)(e["95th_percentile"]).format("0,0.[00]")),"μs"),s.default.createElement("dt",null,"98th percentile:"),s.default.createElement("dd",null,s.default.createElement("span",null,(0,l.default)(e["98th_percentile"]).format("0,0.[00]")),"μs"),s.default.createElement("dt",null,"99th percentile:"),s.default.createElement("dd",null,s.default.createElement("span",null,(0,l.default)(e["99th_percentile"]).format("0,0.[00]")),"μs"),s.default.createElement("dt",null,"Standard deviation:"),s.default.createElement("dd",null,s.default.createElement("span",null,(0,l.default)(e.std_dev).format("0,0.[00]")),"μs"),s.default.createElement("dt",null,"Mean:"),s.default.createElement("dd",null,s.default.createElement("span",null,(0,l.default)(e.mean).format("0,0.[00]")),"μs"),s.default.createElement("dt",null,"Minimum:"),s.default.createElement("dd",null,s.default.createElement("span",null,(0,l.default)(e.min).format("0,0.[00]")),"μs"),s.default.createElement("dt",null,"Maximum:"),s.default.createElement("dd",null,s.default.createElement("span",null,(0,l.default)(e.max).format("0,0.[00]")),"μs"))}});exports.default=u,e.exports=exports.default},function(e,exports,t){var n,r=0,i=t(593);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(18)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,".pipeline-stage{border:1px solid #666;border-radius:4px;display:inline-block;margin-right:15px;padding:20px;text-align:center;width:120px}.pipeline-stage.idle-stage{background-color:#e3e5e5;border-color:#d0d4d4}.pipeline-stage.used-stage{background-color:#fff}.pipeline-name{max-width:300px;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;width:300px}.stream-list{max-width:150px;width:150px;word-wrap:break-word}",""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=this;return e.pipelines?e.pipelines.filter(function(e){return e.id===t.props.params.pipelineId})[0]:void 0}function i(e){var t=this;if(e.connections)return e.connections.filter(function(e){return e.pipeline_ids&&e.pipeline_ids.includes(t.props.params.pipelineId)})}Object.defineProperty(exports,"__esModule",{value:!0});var o=t(1),s=n(o),a=t(0),l=n(a),u=t(2),c=n(u),d=t(4),h=t(19),f=t(11),p=t(595),g=n(p),m=t(601),v=n(m),y=t(602),b=n(y),_=t(31),w=n(_),A=t(81),C=n(A),E=t(113),x=n(E),S=t(47),F=n(S),k=t(114),T=n(k),D=t(184),M=n(D),R=t(7),O=n(R),L=t(14),P=n(L),B=O.default.getStore("Streams"),I=l.default.createClass({displayName:"PipelineDetailsPage",propTypes:{params:s.default.object.isRequired,history:s.default.object.isRequired},mixins:[c.default.connectFilter(x.default,"pipeline",r),c.default.connectFilter(M.default,"connections",i)],componentDidMount:function(){var e=this;this._isNewPipeline(this.props.params.pipelineId)||C.default.get(this.props.params.pipelineId),F.default.list(),T.default.list(),B.listStreams().then(function(t){e.setState({streams:t})})},componentWillReceiveProps:function(e){this._isNewPipeline(e.params.pipelineId)||C.default.get(e.params.pipelineId)},_onConnectionsChange:function(e,t){T.default.connectToPipeline(e),t()},_onStagesChange:function(e,t){var n=w.default.clone(this.state.pipeline);n.stages=e;var r=b.default.generatePipeline(n);n.source=r,C.default.update(n),"function"==typeof t&&t()},_savePipeline:function(e,t){var n=w.default.clone(e);n.source=b.default.generatePipeline(e);var r=void 0;r=n.id?C.default.update(n):C.default.save(n),r.then(function(e){return t(e)})},_isNewPipeline:function(e){return"new"===e},_isLoading:function(){return!this._isNewPipeline(this.props.params.pipelineId)&&!this.state.pipeline||!this.state.connections||!this.state.streams},render:function(){if(this._isLoading())return l.default.createElement(f.Spinner,null);var e=void 0;e=this._isNewPipeline(this.props.params.pipelineId)?"New pipeline":l.default.createElement("span",null,"Pipeline ",l.default.createElement("em",null,this.state.pipeline.title));var t=void 0;t=this._isNewPipeline(this.props.params.pipelineId)?l.default.createElement(v.default,{onChange:this._savePipeline,history:this.props.history}):l.default.createElement(g.default,{pipeline:this.state.pipeline,connections:this.state.connections,streams:this.state.streams,rules:this.state.rules,onConnectionsChange:this._onConnectionsChange,onStagesChange:this._onStagesChange,onPipelineChange:this._savePipeline});var n=this._isNewPipeline(this.props.params.pipelineId)?"New pipeline":"Pipeline "+this.state.pipeline.title;return l.default.createElement(f.DocumentTitle,{title:n},l.default.createElement("div",null,l.default.createElement(f.PageHeader,{title:e},l.default.createElement("span",null,"Pipelines let you transform and process messages coming from streams. Pipelines consist of stages where rules are evaluated and applied. Messages can go through one or more stages."),l.default.createElement("span",null,"After each stage is completed, you can decide if messages matching all or one of the rules continue to the next stage."),l.default.createElement("span",null,l.default.createElement(h.LinkContainer,{to:P.default.pluginRoute("SYSTEM_PIPELINES")},l.default.createElement(d.Button,{bsStyle:"info active"},"Manage pipelines"))," ",l.default.createElement(h.LinkContainer,{to:P.default.pluginRoute("SYSTEM_PIPELINES_RULES")},l.default.createElement(d.Button,{bsStyle:"info"},"Manage rules"))," ",l.default.createElement(h.LinkContainer,{to:P.default.pluginRoute("SYSTEM_PIPELINES_SIMULATE")},l.default.createElement(d.Button,{bsStyle:"info"},"Simulator")))),l.default.createElement(d.Row,{className:"content"},l.default.createElement(d.Col,{md:12},t))))}});exports.default=I,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=(t(19),t(11)),u=t(596),c=n(u),d=t(185),h=n(d),f=t(186),p=n(f),g=t(598),m=n(g),v=t(183),y=n(v),b=t(14),_=(n(b),s.default.createClass({displayName:"Pipeline",propTypes:{pipeline:i.default.object.isRequired,connections:i.default.array.isRequired,streams:i.default.array.isRequired,onConnectionsChange:i.default.func.isRequired,onStagesChange:i.default.func.isRequired,onPipelineChange:i.default.func.isRequired},componentDidMount:function(){this.style.use()},componentWillUnmount:function(){this.style.unuse()},style:t(599),_connections_warning:function(){if(0==this.props.connections.length)return s.default.createElement(a.Alert,{bsStyle:"danger",className:"pipeline-no-connections-warning"},"This pipeline is currently not connected to any streams. You have to connect a pipeline to at least one stream to make it process incoming messages. Note that this is not required if you intend to use this pipeline only for search result transformation using decorators.")},_saveStage:function(e,t){var n=this.props.pipeline.stages.slice();n.push(e),this.props.onStagesChange(n,t)},_updateStage:function(e){var t=this;return function(n,r){var i=t.props.pipeline.stages.filter(function(t){return t.stage!==e.stage});i.push(n),t.props.onStagesChange(i,r)}},_deleteStage:function(e){var t=this;return function(){if(confirm("You are about to delete stage "+e.stage+", are you sure you want to proceed?")){var n=t.props.pipeline.stages.filter(function(t){return t.stage!==e.stage});t.props.onStagesChange(n)}}},_formatConnectedStreams:function(e){var t=e.map(function(e){return'"'+e.title+'"'}),n=e.length>1?[t.slice(0,-1).join(", "),t.slice(-1)].join(" and "):t[0];return s.default.createElement("span",null,"This pipeline is processing messages from the"," ",s.default.createElement(l.Pluralize,{singular:"stream",plural:"streams",value:e.length})," ",n,".")},_formatStage:function(e,t){return s.default.createElement(c.default,{key:"stage-"+e.stage,pipeline:this.props.pipeline,stage:e,isLastStage:e.stage===t,onUpdate:this._updateStage(e),onDelete:this._deleteStage(e)})},render:function(){var e=this,t=this.props.pipeline,n=t.stages.reduce(function(e,t){return Math.max(e,t.stage)},-1/0),r=t.stages.sort(function(e,t){return e.stage-t.stage}).map(function(t){return e._formatStage(t,n)});return s.default.createElement("div",null,this._connections_warning(),s.default.createElement(p.default,{pipeline:t,onChange:this.props.onPipelineChange}),s.default.createElement(a.Row,{className:"row-sm row-margin-top"},s.default.createElement(a.Col,{md:12},s.default.createElement("div",{className:"pull-right"},s.default.createElement(m.default,{pipeline:t,connections:this.props.connections,streams:this.props.streams,save:this.props.onConnectionsChange})),s.default.createElement("h2",null,"Pipeline connections"),s.default.createElement("p",{className:"description-margin-top"},s.default.createElement(y.default,{pipeline:t,connections:this.props.connections,streams:this.props.streams,streamsFormatter:this._formatConnectedStreams,noConnectionsMessage:"Select streams that will be processed by this pipeline."})),s.default.createElement("hr",null))),s.default.createElement(a.Row,{className:"row-sm row-margin-top"},s.default.createElement(a.Col,{md:12},s.default.createElement("div",{className:"pull-right"},s.default.createElement(h.default,{create:!0,save:this._saveStage})),s.default.createElement("h2",null,"Pipeline Stages"),s.default.createElement("p",{className:"description-margin-top"},"Stages are groups of conditions and actions which need to run in order, and provide the necessary"," ","control flow to decide whether or not to run the rest of a pipeline."))),s.default.createElement(l.EntityList,{bsNoItemsStyle:"info",noItemsText:"There are no rules on this stage.",items:r}))}}));exports.default=_,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(4),c=t(19),d=t(11),h=t(47),f=n(h),p=t(185),g=n(p),m=t(36),v=t(14),y=n(v),b=s.default.createClass({displayName:"Stage",propTypes:{stage:i.default.object.isRequired,pipeline:i.default.object.isRequired,isLastStage:i.default.bool,onUpdate:i.default.func.isRequired,onDelete:i.default.func.isRequired},mixins:[l.default.connect(f.default)],_ruleHeaderFormatter:function(e){return s.default.createElement("th",null,e)},_ruleRowFormatter:function(e,t,n){var r=t,i=void 0;return r?i=s.default.createElement(c.LinkContainer,{to:y.default.pluginRoute("SYSTEM_PIPELINES_RULES_RULEID")(r.id)},s.default.createElement("a",null,r.title)):(r={id:"invalid-"+n,description:"Rule "+e.rules[n]+" has been renamed or removed. This rule will be skipped."},i=s.default.createElement("span",null,s.default.createElement("i",{className:"fa fa-warning text-danger"})," ",e.rules[n])),s.default.createElement("tr",{key:r.id},s.default.createElement("td",{style:{width:400}},i),s.default.createElement("td",null,r.description),s.default.createElement("td",null,s.default.createElement(m.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule."+r.id+"."+this.props.pipeline.id+"."+e.stage+".executed"},s.default.createElement(m.CounterRate,{zeroOnMissing:!0,suffix:"msg/s"}))),s.default.createElement("td",null,s.default.createElement(m.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule."+r.id+"."+this.props.pipeline.id+"."+e.stage+".failed"},s.default.createElement(m.CounterRate,{showTotal:!0,zeroOnMissing:!0,suffix:"errors/s"}))))},_formatRules:function(e,t){var n=this,r=["Title","Description","Throughput","Errors"];return s.default.createElement(d.DataTable,{id:"processing-timeline",className:"table-hover",headers:r,headerCellFormatter:this._ruleHeaderFormatter,rows:t,dataRowFormatter:function(t,r){return n._ruleRowFormatter(e,t,r)},noDataText:"This stage has no rules yet. Click on edit to add some.",filterLabel:"",filterKeys:[]})},render:function(){var e=this,t=this.props.stage,n="Contains "+(1===t.rules.length?"1 rule":t.rules.length+" rules"),r=s.default.createElement(m.MetricContainer,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline."+this.props.pipeline.id+".stage."+t.stage+".executed"},s.default.createElement(m.CounterRate,{showTotal:!1,prefix:"Throughput: ",suffix:"msg/s"})),i=[s.default.createElement(u.Button,{key:"delete-stage",bsStyle:"primary",onClick:this.props.onDelete},"Delete"),s.default.createElement(g.default,{key:"edit-stage",stage:t,save:this.props.onUpdate})],o=void 0;o=this.props.isLastStage?"There are no further stages in this pipeline. Once rules in this stage are applied, the pipeline will have finished processing.":s.default.createElement("span",null,"Messages satisfying ",s.default.createElement("strong",null,t.match_all?"all rules":"at least one rule")," ","in this stage, will continue to the next stage.");var a=s.default.createElement("span",null,o,s.default.createElement("br",null),r),l=void 0;return l=this.state.rules?this._formatRules(t,this.props.stage.rules.map(function(t){return e.state.rules.filter(function(e){return e.title===t})[0]})):s.default.createElement(d.Spinner,null),s.default.createElement(d.EntityListItem,{title:"Stage "+t.stage,titleSuffix:n,actions:i,description:a,contentRow:s.default.createElement(u.Col,{md:12},l)})}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(13),u=t(31),c=n(u),d=t(41),h=n(d),f=s.default.createClass({displayName:"PipelineForm",propTypes:{pipeline:i.default.object,create:i.default.bool,modal:i.default.bool,save:i.default.func.isRequired,validatePipeline:i.default.func.isRequired,onCancel:i.default.func},getDefaultProps:function(){return{modal:!0,pipeline:{id:void 0,title:"",description:"",stages:[{stage:0,rules:[]}]}}},getInitialState:function(){var e=c.default.clone(this.props.pipeline);return{pipeline:{id:e.id,title:e.title,description:e.description,stages:e.stages}}},openModal:function(){this.refs.modal.open()},_onChange:function(e){var t=c.default.clone(this.state.pipeline);t[e.target.name]=h.default.getValueFromInput(e.target),this.setState({pipeline:t})},_closeModal:function(){this.refs.modal.close()},_saved:function(){this.props.modal&&this._closeModal(),this.props.create&&this.setState(this.getInitialState())},_save:function(e){e&&e.preventDefault(),this.props.save(this.state.pipeline,this._saved)},render:function(){var e=void 0;e=this.props.create?"Add new pipeline":"Edit pipeline details";var t=s.default.createElement("fieldset",null,s.default.createElement(l.Input,{type:"text",id:"title",name:"title",label:"Title",autoFocus:!0,required:!0,onChange:this._onChange,help:"Pipeline name.",value:this.state.pipeline.title}),s.default.createElement(l.Input,{type:"text",id:"description",name:"description",label:"Description",onChange:this._onChange,help:"Pipeline description.",value:this.state.pipeline.description}));return this.props.modal?s.default.createElement("span",null,s.default.createElement(a.Button,{onClick:this.openModal,bsStyle:"success"},e),s.default.createElement(l.BootstrapModalForm,{ref:"modal",title:(this.props.create?"Add new":"Edit")+" pipeline "+this.state.pipeline.title,onSubmitForm:this._save,submitButtonText:"Save"},t)):s.default.createElement("form",{onSubmit:this._save},t,s.default.createElement(a.Row,null,s.default.createElement(a.Col,{md:12},s.default.createElement(a.Button,{type:"submit",bsStyle:"primary",style:{marginRight:10}},"Save"),s.default.createElement(a.Button,{type:"button",onClick:this.props.onCancel},"Cancel"))))}});exports.default=f,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(19),u=t(80),c=n(u),d=t(11),h=t(44),f=n(h),p=t(14),g=n(p),m=s.default.createClass({displayName:"PipelineConnectionsForm",propTypes:{pipeline:i.default.object.isRequired,connections:i.default.array.isRequired,streams:i.default.array.isRequired,save:i.default.func.isRequired},getInitialState:function(){return{connectedStreams:this._getFormattedStreams(this._getConnectedStreams(this.props.pipeline,this.props.connections,this.props.streams))}},openModal:function(){this.refs.modal.open()},_onStreamsChange:function(e){this.setState({connectedStreams:e.sort(function(e,t){return(0,c.default)(e.label,t.label)})})},_closeModal:function(){this.refs.modal.close()},_resetForm:function(){this.setState(this.getInitialState())},_saved:function(){this._closeModal()},_save:function(){var e=this.state.connectedStreams.map(function(e){return e.value}),t={pipeline:this.props.pipeline.id,streams:e};this.props.save(t,this._saved)},_getConnectedStreams:function(e,t,n){var r=this;return t.filter(function(t){return t.pipeline_ids&&t.pipeline_ids.includes(e.id)}).filter(function(e){return n.some(function(t){return t.id===e.stream_id})}).map(function(e){return r.props.streams.find(function(t){return t.id===e.stream_id})})},_getFormattedStreams:function(e){return e.map(function(e){return{value:e.id,label:e.title}}).sort(function(e,t){return(0,c.default)(e.label,t.label)})},_getFilteredStreams:function(e){var t=this;return e.filter(function(e){return!t.state.connectedStreams.some(function(t){return t.value.toLowerCase()===e.id.toLowerCase()})})},render:function(){var e=s.default.createElement("span",null,"Select the streams you want to connect to this pipeline, or create one in the"," ",s.default.createElement(l.LinkContainer,{to:g.default.STREAMS},s.default.createElement("a",null,"Streams page")),".");return s.default.createElement("span",null,s.default.createElement(a.Button,{onClick:this.openModal,bsStyle:"info"},s.default.createElement("span",null,"Edit connections")),s.default.createElement(f.default,{ref:"modal",title:s.default.createElement("span",null,"Edit connections for ",s.default.createElement("em",null,this.props.pipeline.title)),onSubmitForm:this._save,onCancel:this._resetForm,submitButtonText:"Save"},s.default.createElement("fieldset",null,s.default.createElement(a.FormGroup,{id:"streamsConnections"},s.default.createElement(a.ControlLabel,null,"Streams"),s.default.createElement(d.SelectableList,{options:this._getFormattedStreams(this._getFilteredStreams(this.props.streams)),onChange:this._onStreamsChange,selectedOptionsType:"object",selectedOptions:this.state.connectedStreams}),s.default.createElement(a.HelpBlock,null,e)))))}});exports.default=m,e.exports=exports.default},function(e,exports,t){var n,r=0,i=t(600);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return r++||(n=t(18)(i,{})),exports},exports.unuse=exports.unref=function(){r>0&&!--r&&(n(),n=null)}},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,'.pipeline-dl{margin-bottom:0}dl.pipeline-dl>dt{text-align:left;width:140px}dl.pipeline-dl>dt:after{content:":"}dl.pipeline-dl>dd{margin-left:100px}.row-margin-top{margin-top:10px}.description-margin-top{margin-top:5px}.pipeline-no-connections-warning{margin-bottom:13px}',""])},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(186),u=n(l),c=t(14),d=n(c),h=s.default.createClass({displayName:"NewPipeline",propTypes:{onChange:i.default.func.isRequired,history:i.default.object.isRequired},_onChange:function(e){this.props.onChange(e,this._goToPipeline)},_goToPipeline:function(e){this.props.history.pushState(null,d.default.pluginRoute("SYSTEM_PIPELINES_PIPELINEID")(e.id))},_goBack:function(){this.props.history.goBack()},render:function(){return s.default.createElement(a.Row,null,s.default.createElement(a.Col,{md:6},s.default.createElement("p",null,"Give a name and description to the new pipeline. You can add stages to it when you save the changes."),s.default.createElement(u.default,{create:!0,onChange:this._onChange,onCancel:this._goBack})))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={generatePipeline:function(e){var t='pipeline "'+e.title+'"\n';return e.stages.forEach(function(e){t+="stage "+e.stage+" match "+(e.match_all?"all":"either")+"\n",e.rules.forEach(function(e){t+='rule "'+e+'"\n'})}),t+="end"}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(4),s=t(19),a=t(11),l=t(29),u=n(l),c=t(604),d=n(c),h=t(7),f=n(h),p=t(26),g=n(p),m=t(14),v=n(m),y=f.default.getStore("Streams"),b=i.default.createClass({displayName:"SimulatorPage",getInitialState:function(){return{streams:void 0}},componentDidMount:function(){var e=this;y.listStreams().then(function(t){e.setState({streams:t})})},_isLoading:function(){return!this.state.streams},render:function(){var e=void 0;return e=this._isLoading()?i.default.createElement(a.Spinner,null):i.default.createElement(d.default,{streams:this.state.streams}),i.default.createElement(a.DocumentTitle,{title:"Simulate processing"},i.default.createElement("div",null,i.default.createElement(a.PageHeader,{title:"Simulate processing"},i.default.createElement("span",null,"Processing messages can be complex. Use this page to simulate the result of processing an incoming message using your current set of pipelines and rules."),i.default.createElement("span",null,"Read more about Graylog pipelines in the ",i.default.createElement(u.default,{page:g.default.PAGES.PIPELINES,text:"documentation"}),"."),i.default.createElement("span",null,i.default.createElement(s.LinkContainer,{to:v.default.pluginRoute("SYSTEM_PIPELINES")},i.default.createElement(o.Button,{bsStyle:"info"},"Manage pipelines"))," ",i.default.createElement(s.LinkContainer,{to:v.default.pluginRoute("SYSTEM_PIPELINES_RULES")},i.default.createElement(o.Button,{bsStyle:"info"},"Manage rules"))," ",i.default.createElement(s.LinkContainer,{to:v.default.pluginRoute("SYSTEM_PIPELINES_SIMULATE")},i.default.createElement(o.Button,{bsStyle:"info active"},"Simulator")))),i.default.createElement(o.Row,{className:"content"},i.default.createElement(o.Col,{md:12},e))))}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(80),u=n(l),c=t(19),d=t(11),h=t(605),f=n(h),p=t(614),g=n(p),m=t(14),v=n(m),y=t(203),b=n(y),_=t(711),w=(n(_),s.default.createClass({displayName:"ProcessorSimulator",propTypes:{streams:i.default.array.isRequired},getInitialState:function(){return this.defaultStream=this.props.streams.find(function(e){return"000000000000000000000001"===e.id})||this.props.streams[0],{message:void 0,stream:this.defaultStream,simulation:void 0,loading:!1,error:void 0}},_onMessageLoad:function(e,t){var n=this;this.setState({message:e,simulation:void 0,loading:!0,error:void 0}),b.default.simulate.triggerPromise(this.state.stream,e.fields,t.inputId).then(function(e){n.setState({simulation:e,loading:!1})},function(e){n.setState({loading:!1,error:e})})},_getFormattedStreams:function(e){return e?e.map(function(e){return{value:e.id,label:e.title}}).sort(function(e,t){return(0,u.default)(e.label,t.label)}):[]},_onStreamSelect:function(e){var t=this.props.streams.find(function(t){return t.id.toLowerCase()===e.toLowerCase()});this.setState({stream:t})},render:function(){if(0===this.props.streams.length)return s.default.createElement("div",null,s.default.createElement(a.Row,{className:"row-sm"},s.default.createElement(a.Col,{md:8,mdOffset:2},s.default.createElement(a.Panel,{bsStyle:"danger",header:"No streams found"},"Pipelines operate on streams, but your system currently has no streams. Please"," ",s.default.createElement(c.LinkContainer,{to:v.default.STREAMS},s.default.createElement("a",null,"create a stream"))," ","and come back here later to test pipelines processing messages in your new stream."))));var e=s.default.createElement("span",null,"Select a stream to use during simulation, the ",s.default.createElement("em",null,this.defaultStream.title)," stream is used by default.");return s.default.createElement("div",null,s.default.createElement(a.Row,null,s.default.createElement(a.Col,{md:12},s.default.createElement("h1",null,"Load a message"),s.default.createElement("p",null,"Build an example message that will be used in the simulation."," ",s.default.createElement("strong",null,"No real messages stored in Graylog will be changed. All actions are purely simulated on the temporary input you provide below.")),s.default.createElement(a.Row,{className:"row-sm"},s.default.createElement(a.Col,{md:7},s.default.createElement(a.FormGroup,{id:"streamSelectorSimulation"},s.default.createElement(a.ControlLabel,null,"Stream"),s.default.createElement(d.Select,{options:this._getFormattedStreams(this.props.streams),onValueChange:this._onStreamSelect,value:this.state.stream.id,clearable:!1}),s.default.createElement(a.HelpBlock,null,e)))),s.default.createElement(f.default,{onMessageLoaded:this._onMessageLoad,inputIdSelector:!0}))),s.default.createElement(g.default,{stream:this.state.stream,originalMessage:this.state.message,simulationResults:this.state.simulation,isLoading:this.state.loading,error:this.state.error}))}}));exports.default=w,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(4),c=t(13),d=t(11),h=t(48),f=t(8),p=n(f),g=t(7),m=n(g),v=p.default.getActions("Messages"),y=p.default.getActions("CodecTypes"),b=p.default.getActions("Inputs"),_=(m.default.getStore("Messages"),m.default.getStore("CodecTypes")),w=m.default.getStore("Inputs"),A=s.default.createClass({displayName:"RawMessageLoader",propTypes:{onMessageLoaded:i.default.func.isRequired,inputIdSelector:i.default.bool},mixins:[l.default.connect(_),l.default.connect(w)],getDefaultProps:function(){return{inputIdSelector:!1}},getInitialState:function(){return{loading:!1,message:"",remoteAddress:"",codec:"",codecConfiguration:{},inputId:void 0}},componentDidMount:function(){y.list(),this.props.inputIdSelector&&b.list()},DEFAULT_REMOTE_ADDRESS:"127.0.0.1",_loadMessage:function(e){var t=this;e.preventDefault();var n=this.state,r=n.message,i=n.remoteAddress,o=n.codec,s=n.codecConfiguration,a=n.inputId;this.setState({loading:!0});var l=v.loadRawMessage.triggerPromise(r,i||this.DEFAULT_REMOTE_ADDRESS,o,s);l.then(function(e){t.props.onMessageLoaded(e,{message:r,remoteAddress:i,codec:o,codecConfiguration:s,inputId:a})}),l.finally(function(){return t.setState({loading:!1})})},_bindValue:function(e){var t={};t[e.target.name]=e.target.value,this.setState(t)},_formatSelectOptions:function(){var e=this;if(!this.state.codecTypes)return[{value:"none",label:"Loading codec types...",disabled:!0}];var t=Object.keys(this.state.codecTypes);return 0===t.length?[{value:"none",label:"No codecs available"}]:t.filter(function(e){return"random-http-msg"!==e}).map(function(t){var n=e.state.codecTypes[t].name;return{value:t,label:""===n?t:n}}).sort(function(e,t){return e.label.toLowerCase().localeCompare(t.label.toLowerCase())})},_formatInputSelectOptions:function(){var e=this;if(!this.state.inputs)return[{value:"none",label:"Loading inputs...",disabled:!0}];var t=Object.keys(this.state.inputs);return 0===t.length?[{value:"none",label:"No inputs available"}]:t.map(function(t){var n=e.state.inputs[t].id;return{value:n,label:n+" / "+e.state.inputs[t].title+" / "+e.state.inputs[t].name}}).sort(function(e,t){return e.label.toLowerCase().localeCompare(t.label.toLowerCase())})},_onCodecSelect:function(e){this._bindValue({target:{name:"codec",value:e}}),this.setState({codecConfiguration:{}})},_onInputSelect:function(e){this.setState({inputId:e})},_onCodecConfigurationChange:function(e,t){var n=Object.assign(this.state.codecConfiguration);n[e]=t,this._bindValue({target:{name:"codecConfiguration",value:n}})},_formatConfigField:function(e,t){var n=this.state.codecConfiguration[e],r="RawMessageLoader",i=r+"-"+e;switch(t.type){case"text":return s.default.createElement(h.TextField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});case"number":return s.default.createElement(h.NumberField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});case"boolean":return s.default.createElement(h.BooleanField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});case"dropdown":return s.default.createElement(h.DropdownField,{key:i,typeName:r,title:e,field:t,value:n,onChange:this._onCodecConfigurationChange});default:return null}},_isSubmitDisabled:function(){return!this.state.message||!this.state.codec||this.state.loading},render:function(){var e=this,t=void 0;if(this.state.codecTypes&&this.state.codec){var n=this.state.codecTypes[this.state.codec].requested_configuration;t=Object.keys(n).sort(function(e,t){return n[e].is_optional-n[t].is_optional}).map(function(t){return e._formatConfigField(t,n[t])})}var r=void 0;return this.props.inputIdSelector&&(r=s.default.createElement(c.Input,{id:"input",name:"input",label:s.default.createElement("span",null,"Message input ",s.default.createElement("small",null,"(optional)")),help:"Select the message input ID that should be assigned to the parsed message."},s.default.createElement(d.Select,{id:"input",placeholder:"Select input",options:this._formatInputSelectOptions(),matchProp:"label",onValueChange:this._onInputSelect,value:this.state.inputId}))),s.default.createElement(u.Row,null,s.default.createElement(u.Col,{md:7},s.default.createElement("form",{onSubmit:this._loadMessage},s.default.createElement("fieldset",null,s.default.createElement(c.Input,{id:"message",name:"message",type:"textarea",label:"Raw message",value:this.state.message,onChange:this._bindValue,rows:3,required:!0}),s.default.createElement(c.Input,{id:"remoteAddress",name:"remoteAddress",type:"text",label:s.default.createElement("span",null,"Source IP address ",s.default.createElement("small",null,"(optional)")),help:"Remote IP address to use as message source. Graylog will use "+this.DEFAULT_REMOTE_ADDRESS+" by default.",value:this.state.remoteAddress,onChange:this._bindValue})),r,s.default.createElement("fieldset",null,s.default.createElement("legend",null,"Codec configuration"),s.default.createElement(c.Input,{id:"codec",name:"codec",label:"Message codec",help:"Select the codec that should be used to decode the message.",required:!0},s.default.createElement(d.Select,{id:"codec",placeholder:"Select codec",options:this._formatSelectOptions(),matchProp:"label",onValueChange:this._onCodecSelect,value:this.state.codec})),t),s.default.createElement(u.Button,{type:"submit",bsStyle:"info",disabled:this._isSubmitDisabled()},this.state.loading?"Loading message...":"Load message"))))}});exports.default=A,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(61),l=n(a),u=t(41),c=n(u),d=s.default.createClass({displayName:"BooleanField",propTypes:{autoFocus:i.default.bool,field:i.default.object.isRequired,onChange:i.default.func.isRequired,title:i.default.string.isRequired,typeName:i.default.string.isRequired,value:i.default.any},render:function(){var e=this.props.field,t=this.props.typeName,n=this.props.title;return s.default.createElement("div",{className:"form-group"},s.default.createElement("div",{className:"checkbox"},s.default.createElement("label",null,s.default.createElement("input",{id:t+"-"+n,type:"checkbox",checked:this.props.value,name:"configuration["+n+"]",onChange:this.handleChange}),e.human_name,l.default.optionalMarker(e))),s.default.createElement("p",{className:"help-block"},e.description))},handleChange:function(e){var t=c.default.getValueFromInput(e.target);this.props.onChange(this.props.title,t)}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(12),i=n(r),o=t(1),s=n(o),a=t(0),l=n(a),u=t(44),c=n(u),d=t(48),h=l.default.createClass({displayName:"ConfigurationForm",propTypes:{cancelAction:s.default.func,children:s.default.node,helpBlock:s.default.node,includeTitleField:s.default.bool,submitAction:s.default.func.isRequired,title:s.default.node,titleValue:s.default.string,typeName:s.default.string,values:s.default.object},getDefaultProps:function(){return{includeTitleField:!0,titleValue:"",values:{}}},getInitialState:function(){return this._copyStateFromProps(this.props)},componentWillReceiveProps:function(e){var t=this._copyStateFromProps(e),n=this.state?this.state.values:{};t.values=i.default.extend(t.values,n),this.setState(t)},getValue:function(){var e={},t=this.state.values;return this.props.includeTitleField&&(e.title=this.state.titleValue),e.type=this.props.typeName,e.configuration={},i.default.map(this.state.configFields,function(n,r){e.configuration[r]=void 0===t[r]?null:t[r]}),e},_copyStateFromProps:function(e){var t=this.state&&void 0!==this.state.titleValue?this.state.titleValue:e.titleValue,n={};return e.configFields&&Object.keys(e.configFields).forEach(function(t){n[t]=e.configFields[t].default_value}),{configFields:i.default.extend({},e.configFields),values:i.default.extend({},n,e.values),titleValue:t}},_sortByOptionality:function(e,t){return this.state.configFields[e].is_optional-this.state.configFields[t].is_optional},_save:function(){var e=this.getValue();this.props.submitAction(e),this.refs.modal.close()},open:function(){this.refs.modal.open()},_closeModal:function(){this.setState(i.default.extend(this.getInitialState(),{titleValue:this.props.titleValue})),this.props.cancelAction&&this.props.cancelAction()},_handleTitleChange:function(e,t){this.setState({titleValue:t})},_handleChange:function(e,t){var n=this.state.values;n[e]=t,this.setState({values:n})},_renderConfigField:function(e,t,n){var r=this.state.values[t],i=this.props.typeName,o=i+"-"+t;switch(e.type){case"text":return l.default.createElement(d.TextField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n});case"number":return l.default.createElement(d.NumberField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n});case"boolean":return l.default.createElement(d.BooleanField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n});case"dropdown":return l.default.createElement(d.DropdownField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n,addPlaceholder:!0});case"list":return l.default.createElement(d.ListField,{key:o,typeName:i,title:t,field:e,value:r,onChange:this._handleChange,autoFocus:n,addPlaceholder:!0});default:return null}},render:function(){var e=this,t=this.props.typeName,n=this.props.title,r=this.props.helpBlock,o=!0,s=void 0;this.props.includeTitleField&&(s=l.default.createElement(d.TitleField,{key:t+"-title",typeName:t,value:this.state.titleValue,onChange:this._handleTitleChange,helpBlock:r}),o=!1);var a=i.default.map(this.state.configFields,function(e,t){return t}).sort(this._sortByOptionality),u=a.map(function(t){var n=e._renderConfigField(e.state.configFields[t],t,o);return o&&(o=!1),n});return l.default.createElement(c.default,{ref:"modal",title:n,onCancel:this._closeModal,onSubmitForm:this._save,submitButtonText:"Save"},l.default.createElement("fieldset",null,l.default.createElement("input",{type:"hidden",name:"type",value:t}),this.props.children,s,u))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=s.default.createClass({displayName:"ConfigurationWell",propTypes:{id:i.default.string,configuration:i.default.any,typeDefinition:i.default.object},PASSWORD_PLACEHOLDER:"********",_formatRegularField:function(e,t){var n=void 0;return n=null===e||void 0===e||""===e||Array.isArray(e)&&0===e.length?s.default.createElement("i",null,""):Array.isArray(e)?e.join(", "):String(e),s.default.createElement("li",{key:this.props.id+"-"+t},s.default.createElement("div",{className:"key"},t,":")," ",s.default.createElement("div",{className:"value"},n))},_formatPasswordField:function(e,t){return s.default.createElement("li",{key:this.props.id+"-"+t},s.default.createElement("div",{className:"key"},t,":")," ",s.default.createElement("div",{className:"value"},this.PASSWORD_PLACEHOLDER))},_formatConfiguration:function(e,t,n){var r=this;if(!t)return"";var i=Object.keys(t).sort().map(function(e){var i=t[e],o=n&&n.requested_configuration?n.requested_configuration[e]:void 0;return o&&o.attributes.indexOf("is_password")>-1?r._formatPasswordField(i,e):r._formatRegularField(i,e)});return i.length<1&&i.push(s.default.createElement("li",{key:"placeholder"},"-- no configuration --")),s.default.createElement("ul",null,i)},render:function(){return s.default.createElement("div",{className:"well well-small configuration-well react-configuration-well"},this._formatConfiguration(this.props.id,this.props.configuration,this.props.typeDefinition))}});exports.default=a,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(12),i=n(r),o=t(1),s=n(o),a=t(0),l=n(a),u=t(61),c=n(u),d=l.default.createClass({displayName:"DropdownField",propTypes:{autoFocus:s.default.bool.isRequired,field:s.default.object.isRequired,onChange:s.default.func.isRequired,title:s.default.string.isRequired,typeName:s.default.string.isRequired,value:s.default.any,addPlaceholder:s.default.bool,disabled:s.default.bool},getDefaultProps:function(){return{addPlaceholder:!1}},getInitialState:function(){return{typeName:this.props.typeName,field:this.props.field,title:this.props.title,value:this.props.value}},componentWillReceiveProps:function(e){this.setState(e)},_formatOption:function(e,t,n){return l.default.createElement("option",{key:this.state.typeName+"-"+this.state.title+"-"+t,value:t,id:t,disabled:n},e)},handleChange:function(e){this.props.onChange(this.state.title,e.target.value),this.setState({value:e.target.value})},render:function(){var e=this.state.field,t=i.default.map(e.additional_info.values,this._formatOption);this.props.addPlaceholder&&t.unshift(this._formatOption("Select "+(e.human_name||this.state.title),"",!0));var n=this.state.typeName;return l.default.createElement("div",{className:"form-group"},l.default.createElement("label",{htmlFor:n+"-"+e.title},e.human_name,c.default.optionalMarker(e)),l.default.createElement("select",{id:e.title,value:this.state.value,className:"input-xlarge form-control",onChange:this.handleChange,autoFocus:this.props.autoFocus,disabled:this.props.disabled,required:!e.is_optional},t),l.default.createElement("p",{className:"help-block"},e.description))}});exports.default=d,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(11),l=t(48),u=s.default.createClass({displayName:"ListField",propTypes:{autoFocus:i.default.bool.isRequired,field:i.default.object.isRequired,onChange:i.default.func.isRequired,title:i.default.string.isRequired,typeName:i.default.string.isRequired,value:i.default.any,addPlaceholder:i.default.bool,disabled:i.default.bool},getDefaultProps:function(){return{addPlaceholder:!1}},getInitialState:function(){return{typeName:this.props.typeName,field:this.props.field,title:this.props.title,value:this.props.value}},componentWillReceiveProps:function(e){this.setState(e)},_formatOption:function(e,t){return{value:t,label:e}},_handleChange:function(e){var t=""===e?[]:e.split(",");this.props.onChange(this.state.title,t),this.setState({value:t})},render:function(){var e=this,t=this.state.field,n=this.state.typeName,r=t.attributes.includes("allow_create"),i=t.additional_info&&t.additional_info.values?t.additional_info.values:{},o=Object.keys(i).map(function(t){return e._formatOption(t,i[t])});return s.default.createElement("div",{className:"form-group"},s.default.createElement("label",{htmlFor:n+"-"+t.title},t.human_name,l.FieldHelpers.optionalMarker(t)),s.default.createElement(a.MultiSelect,{id:t.title,options:o,value:this.state.value,placeholder:(r?"Add":"Select")+" "+t.human_name,onValueChange:this._handleChange,disabled:this.props.disabled,allowCreate:r}),s.default.createElement("p",{className:"help-block"},t.description))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0?t[0]:this._getDefaultValidationSpecs()},handleChange:function(e){var t=d.default.getValueFromInput(e.target);this.props.onChange(this.props.title,t)},render:function(){var e=this.props.typeName,t=this.props.field,n=!t.is_optional,i=this.validationSpec(t);return a.default.createElement("div",{className:"form-group"},a.default.createElement("label",{htmlFor:e+"-"+t.title},t.human_name,u.default.optionalMarker(t)),a.default.createElement("input",r({id:t.title,type:"number",required:n,onChange:this.handleChange,value:this.props.value,className:"input-xlarge validatable form-control"},i,{autoFocus:this.props.autoFocus})),a.default.createElement("p",{className:"help-block"},t.description))}});exports.default=h,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(61),l=n(a),u=s.default.createClass({displayName:"TextField",propTypes:{autoFocus:i.default.bool,field:i.default.object.isRequired,onChange:i.default.func.isRequired,title:i.default.string.isRequired,typeName:i.default.string.isRequired,value:i.default.any},getInitialState:function(){return{typeName:this.props.typeName,field:this.props.field,title:this.props.title,value:this.props.value}},componentWillReceiveProps:function(e){this.setState(e)},handleChange:function(e){this.props.onChange(this.state.title,e.target.value),this.setState({value:e.target.value})},render:function(){var e=this.state.field,t=this.state.title,n=this.state.typeName,r=void 0,i=!e.is_optional,o=!l.default.hasAttribute(e.attributes,"textarea")&&l.default.hasAttribute(e.attributes,"is_password")?"password":"text";return r=l.default.hasAttribute(e.attributes,"textarea")?s.default.createElement("textarea",{id:t,className:"form-control",rows:10,name:"configuration["+t+"]",required:i,value:this.state.value,onChange:this.handleChange,autoFocus:this.props.autoFocus}):s.default.createElement("input",{id:t,type:o,className:"form-control",name:"configuration["+t+"]",value:this.state.value,onChange:this.handleChange,required:i,autoFocus:this.props.autoFocus}),s.default.createElement("div",{className:"form-group"},s.default.createElement("label",{htmlFor:n+"-"+t+")"},e.human_name,l.default.optionalMarker(e)),r,s.default.createElement("p",{className:"help-block"},e.description))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(48),l=s.default.createClass({displayName:"TitleField",propTypes:{helpBlock:i.default.node,onChange:i.default.func,typeName:i.default.string.isRequired,value:i.default.any},getDefaultProps:function(){return{helpBlock:s.default.createElement("span",null),onChange:function(){}}},render:function(){var e=this.props.typeName,t={is_optional:!1,attributes:[],human_name:"Title",description:this.props.helpBlock};return s.default.createElement(a.TextField,{key:e+"-title",typeName:e,title:"title",field:t,value:this.props.value,onChange:this.props.onChange,autoFocus:!0})}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(11),u=t(115),c=n(u),d=t(702),h=n(d),f=t(705),p=n(f),g=t(706),m=n(g),v=t(30),y=n(v),b=s.default.createClass({displayName:"SimulationResults",propTypes:{stream:i.default.object.isRequired,originalMessage:i.default.object,simulationResults:i.default.object,isLoading:i.default.bool,error:i.default.object},getInitialState:function(){return{viewOption:this.VIEW_OPTIONS.SIMULATION_SUMMARY}},componentDidMount:function(){this.style.use()},componentWillUnmount:function(){this.style.unuse()},VIEW_OPTIONS:{SIMULATION_PREVIEW:1,SIMULATION_SUMMARY:2,SIMULATION_TRACE:3},style:t(709),_changeViewOptions:function(e){var t=this,n=Object.keys(this.VIEW_OPTIONS).find(function(n){return t.VIEW_OPTIONS[n]===e});this.setState({viewOption:this.VIEW_OPTIONS[n]})},_getViewOptionsMenuItems:function(){var e=[];return e.push(this._getViewOptionsMenuItem(this.VIEW_OPTIONS.SIMULATION_SUMMARY,"Changes summary")),e.push(this._getViewOptionsMenuItem(this.VIEW_OPTIONS.SIMULATION_PREVIEW,"Results preview")),e.push(this._getViewOptionsMenuItem(this.VIEW_OPTIONS.SIMULATION_TRACE,"Simulation trace")),e},_getViewOptionsMenuItem:function(e,t){return s.default.createElement(a.MenuItem,{key:e,eventKey:e,active:this.state.viewOption===e},t)},_getViewComponent:function(e){if(this.props.isLoading||!this.props.simulationResults)return s.default.createElement(l.Spinner,null);switch(this.state.viewOption){case this.VIEW_OPTIONS.SIMULATION_PREVIEW:return s.default.createElement(p.default,{simulationResults:this.props.simulationResults,streams:e});case this.VIEW_OPTIONS.SIMULATION_SUMMARY:return s.default.createElement(h.default,{originalMessage:this.props.originalMessage,simulationResults:this.props.simulationResults});case this.VIEW_OPTIONS.SIMULATION_TRACE:return s.default.createElement(m.default,{simulationResults:this.props.simulationResults})}return null},render:function(){if(!this.props.originalMessage&&!this.props.simulationResults)return null;var e={};e[this.props.stream.id]=this.props.stream;var t=this.props.isLoading?s.default.createElement(l.Spinner,null):null;this.props.originalMessage&&(t=s.default.createElement(c.default,{message:this.props.originalMessage,streams:e,disableTestAgainstStream:!0,disableSurroundingSearch:!0,disableFieldActions:!0,disableMessageActions:!0}));var n=void 0;return this.props.error&&(n=s.default.createElement(a.Alert,{bsStyle:"danger"},s.default.createElement("p",null,s.default.createElement("strong",null,"Error simulating message processing")),s.default.createElement("p",null,"Could not simulate processing of message ",s.default.createElement("em",null,this.props.originalMessage.id)," in stream"," ",s.default.createElement("em",null,this.props.stream.title),".",s.default.createElement("br",null),"Please try loading the message again, or use another message for the simulation."))),s.default.createElement(a.Row,null,s.default.createElement(a.Col,{md:12},s.default.createElement("hr",null)),s.default.createElement(a.Col,{md:6},s.default.createElement("h1",null,"Original message"),s.default.createElement("p",null,"This is the original message loaded from Graylog."),s.default.createElement("div",{className:"message-preview-wrapper"},t)),s.default.createElement(a.Col,{md:6},s.default.createElement("div",{className:"pull-right"},s.default.createElement(a.DropdownButton,{id:"simulation-view-options",title:"More results",onSelect:this._changeViewOptions,bsStyle:"default",bsSize:"small",pullRight:!0},this._getViewOptionsMenuItems())),s.default.createElement("h1",null,"Simulation results"),s.default.createElement("p",null,this.props.isLoading?"Simulating message processing, please wait a moment.":"These are the results of processing the loaded message. Processing took "+y.default.formatNumber(this.props.simulationResults.took_microseconds)+" µs."),n,this._getViewComponent(e)))}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(0),i=n(r),o=t(146),s=t(14),a=n(s),l=i.default.createClass({displayName:"StreamLink",render:function(){var e=this.props.stream,t=a.default.stream_search(e.id);return i.default.createElement(o.Link,{to:t},e.title)}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(2),l=n(a),u=t(12),c=n(u),d=t(82),h=n(d),f=t(4),p=t(48),g=t(11),m=t(7),v=n(m),y=t(8),b=n(y),_=t(49),w=n(_),A=v.default.getStore("Decorators"),C=b.default.getActions("Decorators"),E=s.default.createClass({displayName:"AddDecoratorButton",propTypes:{nextOrder:i.default.number.isRequired,stream:i.default.string,disabled:i.default.bool},mixins:[l.default.connect(A),h.default],getDefaultProps:function(){return{disabled:!1}},getInitialState:function(){return{typeDefinition:{}}},_formatDecoratorType:function(e,t){return{value:t,label:e.name}},_handleCancel:function(){this.refs.select.clearValue(),this.setState(this.getInitialState())},_handleSubmit:function(e){var t={stream:this.props.stream,type:e.type,config:e.configuration,order:this.props.nextOrder};C.create(t),this.setState({typeName:this.PLACEHOLDER})},_openModal:function(){this.refs.configurationForm.open()},_onTypeChange:function(e){this.setState({typeName:e}),this.state.types[e]?this.setState({typeDefinition:this.state.types[e]}):this.setState({typeDefinition:{}})},render:function(){if(!this.state.types)return s.default.createElement(g.Spinner,null);var e=c.default.map(this.state.types,this._formatDecoratorType),t=this.state.typeName!==this.PLACEHOLDER?s.default.createElement(p.ConfigurationForm,{ref:"configurationForm",key:"configuration-form-output",configFields:this.state.typeDefinition.requested_configuration,title:"Create new "+this.state.typeDefinition.name,typeName:this.state.typeName,includeTitleField:!1,submitAction:this._handleSubmit,cancelAction:this._handleCancel}):null;return s.default.createElement("div",{className:w.default.decoratorBox+" "+w.default.addDecoratorButtonContainer},s.default.createElement("div",{className:w.default.addDecoratorSelect},s.default.createElement(g.Select,{ref:"select",placeholder:"Select decorator",onValueChange:this._onTypeChange,options:e,matchProp:"label",disabled:this.props.disabled,value:this.state.typeName})),s.default.createElement(f.Button,{bsStyle:"success",disabled:!this.state.typeName||this.props.disabled,onClick:this._openModal},"Apply"),this.state.typeName&&t)}});exports.default=E,e.exports=exports.default},function(e,exports,t){exports=e.exports=t(17)(void 0),exports.push([e.i,"._2AuKyotTQuIDYeJ2ZPw2v_{width:100%}._3kt7ioxB5PPyZgwn0NRBdv{display:flex;justify-content:space-between}._14GS3jLNS-viLItuH2kjXN{line-height:1.5}._2smJgmhPIXu-r0-j5U7ejc{margin-top:5px;margin-bottom:5px}._3EJ75g7KFLRnt5c4rq8m-F{margin-right:5px;width:100%}.U_C6I9SrkRjJYcD5cUQoC{font-size:12px;padding-top:0;padding-right:0;float:right}.jgGtNQJkdfpNc61Xn6uyU{font-size:12px}._18EHOuhMsehz6St_Ic9Bw9{color:#aaa;font-weight:400}._2L65aHFx4zA5jvDgce_kI-{display:inline-block}._3IOSvzWwDHfyeBvz5VICqz{margin-left:5px;top:3px;position:relative}._1Q6sZZq1_maFdlhkDJ9YyG{height:20px}.i6bAiFXUVsagbgNNz1VA6{display:inline-block;overflow-y:auto;width:100%}._1Se4C7zuicKYhvG66u5Qjt{margin-top:2em}",""]),exports.locals={fullWidth:"_2AuKyotTQuIDYeJ2ZPw2v_",decoratorBox:"_3kt7ioxB5PPyZgwn0NRBdv",decoratorType:"_14GS3jLNS-viLItuH2kjXN",addDecoratorButtonContainer:"_2smJgmhPIXu-r0-j5U7ejc",addDecoratorSelect:"_3EJ75g7KFLRnt5c4rq8m-F",helpLink:"U_C6I9SrkRjJYcD5cUQoC",helpPopover:"jgGtNQJkdfpNc61Xn6uyU",decoratorMarker:"_18EHOuhMsehz6St_Ic9Bw9",decoratorFieldWrapper:"_2L65aHFx4zA5jvDgce_kI-",decoratorMarkerSidebar:"_3IOSvzWwDHfyeBvz5VICqz",helpLinkContainer:"_1Q6sZZq1_maFdlhkDJ9YyG",decoratorListContainer:"i6bAiFXUVsagbgNNz1VA6",noDecoratorsAlert:"_1Se4C7zuicKYhvG66u5Qjt"}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(42),l=n(a),u=s.default.createClass({displayName:"AddSearchCountToDashboard",propTypes:{searchInStream:i.default.object,permissions:i.default.array.isRequired,pullRight:i.default.bool},SEARCH_COUNT_WIDGET_TYPE:"SEARCH_RESULT_COUNT",STREAM_SEARCH_COUNT_WIDGET_TYPE:"STREAM_SEARCH_RESULT_COUNT",render:function(){return s.default.createElement(l.default,{title:"Add count to dashboard",pullRight:this.props.pullRight,widgetType:this.props.searchInStream?this.STREAM_SEARCH_COUNT_WIDGET_TYPE:this.SEARCH_COUNT_WIDGET_TYPE,permissions:this.props.permissions})}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(15),l=n(a),u=t(12),c=n(u),d=t(32),h=t(117),f=t(7),p=n(f),g=t(8),m=n(g),v=t(14),y=n(v),b=t(54),_=n(b),w=p.default.getStore("Widgets"),A=m.default.getActions("Widgets"),C=s.default.createClass({displayName:"Widget",propTypes:{widget:i.default.object.isRequired,dashboardId:i.default.string.isRequired,shouldUpdate:i.default.bool.isRequired,locked:i.default.bool.isRequired,streamIds:i.default.object},getInitialState:function(){return this.widgetPlugin=this._getWidgetPlugin(this.props.widget.type),{result:void 0,calculatedAt:void 0,error:!1,errorMessage:void 0,height:void 0,width:void 0}},componentDidMount:function(){this._loadValue(),this.loadValueInterval=setInterval(this._loadValue,Math.min(1e3*this.props.widget.cache_time,this.DEFAULT_WIDGET_VALUE_REFRESH)),this.eventsThrottler=new _.default,(0,c.default)(window).on("resize",this._onResize)},componentWillReceiveProps:function(e){this.widgetPlugin=this._getWidgetPlugin(e.widget.type)},componentDidUpdate:function(){this._calculateWidgetSize()},componentWillUnmount:function(){clearInterval(this.loadValueInterval),(0,c.default)(window).off("resize",this._onResize)},DEFAULT_WIDGET_VALUE_REFRESH:1e4,WIDGET_HEADER_HEIGHT:25,WIDGET_FOOTER_HEIGHT:20,_getWidgetPlugin:function(e){return d.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.toUpperCase()})[0]},_isBoundToStream:function(){return"stream_id"in this.props.widget.config&&null!==this.props.widget.config.stream_id},_getWidgetNode:function(){return l.default.findDOMNode(this.refs.widget)},_loadValue:function(){var e=this;if(!this.state.deleted&&(void 0===this.state.result||this.props.shouldUpdate)){var t=this.refs.widget.clientWidth;w.loadValue(this.props.dashboardId,this.props.widget.id,t).then(function(t){if(t.calculated_at!==e.state.calculatedAt){var n={result:t.result,calculatedAt:t.calculated_at,error:!1,errorMessage:void 0};t.computation_time_range&&(n.computationTimeRange=t.computation_time_range),e.setState(n)}},function(t){var n=t.message,r=void 0===e.state.result?"N/A":e.state.result;e.setState({result:r,error:!0,errorMessage:"Error loading widget value: "+n})})}},_onResize:function(){this.eventsThrottler.throttle(this._calculateWidgetSize,void 0,this.props.widget.id)},_calculateWidgetSize:function(){var e=(0,c.default)(this._getWidgetNode()),t=e.height()-(this.WIDGET_HEADER_HEIGHT+this.WIDGET_FOOTER_HEIGHT),n=e.width();t===this.state.height&&n===this.state.width||this.setState({height:t,width:n})},_getVisualization:function(){return""===this.props.widget.type?null:void 0===this.state.result?s.default.createElement("div",{className:"loading"},s.default.createElement("i",{className:"fa fa-spin fa-3x fa-refresh spinner"})):"N/A"===this.state.result?s.default.createElement("div",{className:"not-available"},this.state.result):this.widgetPlugin?s.default.createElement(this.widgetPlugin.visualizationComponent,{id:this.props.widget.id,config:this.props.widget.config,data:this.state.result,height:this.state.height,width:this.state.width,computationTimeRange:this.state.computationTimeRange}):s.default.createElement(h.WidgetVisualizationNotFound,{widgetClassName:this.props.widget.type})},_getTimeRange:function(){var e=this.props.widget.config,t=e.timerange.type,n={rangetype:t};switch(t){case"relative":n[t]=e.timerange.range;break;case"absolute":n.from=e.timerange.from,n.to=e.timerange.to;break;case"keyword":n[t]=e.timerange.keyword}return n},replayUrl:function(){var e=this.props.widget.config;return this._isBoundToStream()?y.default.stream_search(this.props.widget.config.stream_id,e.query,this._getTimeRange(),e.interval):y.default.search(e.query,this._getTimeRange(),e.interval)},_showConfig:function(){this.refs.configModal.open()},_showEditConfig:function(){this.refs.editModal.open()},updateWidget:function(e){e.id=this.props.widget.id,w.updateWidget(this.props.dashboardId,e)},deleteWidget:function(){window.confirm('Do you really want to delete "'+this.props.widget.description+'"?')&&(this.setState({deleted:!0}),A.removeWidget(this.props.dashboardId,this.props.widget.id))},render:function(){if(this.state.deleted)return s.default.createElement("span",null);var e=s.default.createElement(h.WidgetConfigModal,{ref:"configModal",dashboardId:this.props.dashboardId,widget:this.props.widget,boundToStream:this._isBoundToStream()}),t=s.default.createElement(h.WidgetEditConfigModal,{ref:"editModal",widget:this.props.widget,onUpdate:this.updateWidget}),n=null;return null!=this.props.streamIds&&this.props.widget.config.stream_id&&!this.props.streamIds[this.props.widget.config.stream_id]&&(n="The stream is not available, cannot replay search."),s.default.createElement("div",{ref:"widget",className:"widget","data-widget-id":this.props.widget.id},s.default.createElement(h.WidgetHeader,{ref:"widgetHeader",title:this.props.widget.description}),this._getVisualization(),s.default.createElement(h.WidgetFooter,{ref:"widgetFooter",locked:this.props.locked,onShowConfig:this._showConfig,onEditConfig:this._showEditConfig,onDelete:this.deleteWidget,replayHref:this.replayUrl(),replayToolTip:n,calculatedAt:this.state.calculatedAt,error:this.state.error,errorMessage:this.state.errorMessage}),this.props.locked?e:t)}});exports.default=C,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=t(1),o=n(i),s=t(0),a=n(s),l=t(4),u=t(19),c=t(32),d=t(14),h=n(d),f=t(27),p=n(f),g=t(51),m=n(g),v=a.default.createClass({displayName:"WidgetConfigModal",propTypes:{boundToStream:o.default.bool.isRequired,widget:o.default.object.isRequired,dashboardId:o.default.string.isRequired},open:function(){this.refs.configModal.open()},hide:function(){this.refs.configModal.close()},_getBasicConfiguration:function(){var e=this,t=c.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.props.widget.type.toUpperCase()})[0],n=t?t.displayName:"Not available";return this.props.boundToStream?a.default.createElement("p",null,"Type: ",n,", cached for ",this.props.widget.cache_time," seconds. Widget is bound to stream ",this.props.widget.config.stream_id,"."):a.default.createElement("p",null,"Type: ",n,", cached for ",this.props.widget.cache_time," seconds. Widget is ",a.default.createElement("strong",null,"not")," bound to a stream.")},_formatConfigurationKey:function(e){return p.default.capitalizeFirstLetter(e.replace(/_/g," "))},_formatConfigurationValue:function(e,t){return"query"===e&&""===t?"*":"string"==typeof t?String(t):"object"===(void 0===t?"undefined":r(t))||"boolean"==typeof t?JSON.stringify(t,null,1):t},_getConfigAsDescriptionList:function(){var e=this,t=Object.keys(this.props.widget.config);if(0===t.length)return[];var n=[];return t.forEach(function(t){null!==e.props.widget.config[t]&&(n.push(a.default.createElement("dt",{key:t},e._formatConfigurationKey(t),":")),n.push(a.default.createElement("dd",{key:t+"-value"},e._formatConfigurationValue(t,e.props.widget.config[t]))))}),n},render:function(){return a.default.createElement(m.default,{ref:"configModal"},a.default.createElement(l.Modal.Header,{closeButton:!0},a.default.createElement(l.Modal.Title,null,a.default.createElement("span",null,"Widget ",a.default.createElement("em",null,this.props.widget.description)," configuration"))),a.default.createElement(l.Modal.Body,null,a.default.createElement("div",{className:"configuration"},this._getBasicConfiguration(),a.default.createElement("div",null,"More details:",a.default.createElement("dl",{className:"dl-horizontal"},a.default.createElement("dt",null,"Widget ID:"),a.default.createElement("dd",null,this.props.widget.id),a.default.createElement("dt",null,"Dashboard ID:"),a.default.createElement("dd",null,this.props.dashboardId),this._getConfigAsDescriptionList())))),a.default.createElement(l.Modal.Footer,null,a.default.createElement(l.Button,{type:"button",onClick:this.hide},"Close"),a.default.createElement(u.LinkContainer,{to:h.default.filtered_metrics("master","org.graylog2.dashboards.widgets.*."+this.props.widget.id)},a.default.createElement(l.Button,{type:"button",bsStyle:"info"},"Show widget metrics"))))}});exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(13),l=t(32),u=t(44),c=n(u),d=t(41),h=n(d),f=t(31),p=n(f),g=t(27),m=n(g),v=s.default.createClass({displayName:"WidgetCreationModal",propTypes:{fields:i.default.array,onConfigurationSaved:i.default.func.isRequired,onModalHidden:i.default.func,widgetType:i.default.string.isRequired},getInitialState:function(){return this.widgetPlugin=this._getWidgetPlugin(this.props.widgetType),{title:this._getDefaultWidgetTitle(this.widgetPlugin),config:{}}},componentWillReceiveProps:function(e){this.props.widgetType!==e.widgetType&&(this.widgetPlugin=this._getWidgetPlugin(e.widgetType))},_getWidgetPlugin:function(e){return l.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.toUpperCase()})[0]},_getInitialConfiguration:function(){if(this.refs.pluginConfiguration){0===Object.keys(this.state.config).length&&this.setState({config:this.refs.pluginConfiguration.getInitialConfiguration()})}},open:function(){this.refs.createModal.open()},hide:function(){this.refs.createModal.close()},save:function(){this.props.onConfigurationSaved(this.state.title,this.state.config)},saved:function(){this.setState(this.getInitialState()),this.hide()},_setSetting:function(e,t){var n=p.default.clone(this.state);n[e]=t,this.setState(n)},_bindValue:function(e){this._setSetting(e.target.name,h.default.getValueFromInput(e.target))},_setConfigurationSetting:function(e,t){var n=p.default.clone(this.state.config);n[e]=t,this.setState({config:n})},_bindConfigurationValue:function(e){this._setConfigurationSetting(e.target.name,h.default.getValueFromInput(e.target))},_onConfigurationValueChange:function(){switch(arguments.length){case 1:this._bindConfigurationValue(arguments[0]);break;case 2:this._setConfigurationSetting(arguments[0],arguments[1]);break;default:throw new Error("Wrong number of arguments, method only accepts an event or a configuration key-value pair")}},_getDefaultWidgetTitle:function(e){return e.displayName?m.default.capitalizeFirstLetter(e.displayName):""},_getSpecificWidgetInputs:function(){if(this.widgetPlugin.configurationCreateComponent)return s.default.createElement(this.widgetPlugin.configurationCreateComponent,{ref:"pluginConfiguration",config:this.state.config,fields:this.props.fields,onChange:this._onConfigurationValueChange})},render:function(){return s.default.createElement(c.default,{ref:"createModal",title:"Create Dashboard Widget",onModalOpen:this._getInitialConfiguration,onModalClose:this.props.onModalHidden,onSubmitForm:this.save,submitButtonText:"Create"},s.default.createElement("fieldset",null,s.default.createElement(a.Input,{type:"text",label:"Title",name:"title",id:"widget-title",required:!0,defaultValue:this.state.title,onChange:this._bindValue,help:"Type a name that describes your widget.",autoFocus:!0}),this._getSpecificWidgetInputs()))}});exports.default=v,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(13),l=t(32),u=t(20),c=n(u),d=t(27),h=n(d),f=t(31),p=n(f),g=t(41),m=n(g),v=t(44),y=n(v),b=s.default.createClass({displayName:"WidgetEditConfigModal",propTypes:{onModalHidden:i.default.func,onUpdate:i.default.func.isRequired,widget:i.default.object.isRequired},getInitialState:function(){return this.widgetPlugin=this._getWidgetPlugin(this.props.widget.type),{description:this.props.widget.description,type:this.props.widget.type,cache_time:this.props.widget.cache_time,config:p.default.clone(this.props.widget.config),errors:{}}},componentWillReceiveProps:function(e){this.widgetPlugin=this._getWidgetPlugin(e.widget.type)},_getWidgetPlugin:function(e){return l.PluginStore.exports("widgets").filter(function(t){return t.type.toUpperCase()===e.toUpperCase()})[0]},open:function(){this.refs.editModal.open()},hide:function(){this.refs.editModal.close()},_getWidgetData:function(){var e=this,t={};return Object.keys(this.state).forEach(function(n){!e.state.hasOwnProperty(n)||"errors"===n&&"widgetPlugin"===n||(t[n]=e.state[n])}),t},save:function(){var e=this;Object.keys(this.state.errors).some(function(t){return!0===e.state.errors[t]})||this.props.onUpdate(this._getWidgetData()),this.hide()},_setSetting:function(e,t){var n=p.default.clone(this.state);n[e]=t,this.setState(n)},_bindValue:function(e){this._setSetting(e.target.name,m.default.getValueFromInput(e.target))},_setConfigurationSetting:function(e,t){var n=p.default.clone(this.state.config);n[e]=t,this.setState({config:n})},_bindConfigurationValue:function(e){this._setConfigurationSetting(e.target.name,m.default.getValueFromInput(e.target))},_onConfigurationValueChange:function(){switch(arguments.length){case 1:this._bindConfigurationValue(arguments[0]);break;case 2:this._setConfigurationSetting(arguments[0],arguments[1]);break;default:throw new Error("Wrong number of arguments, method only accepts an event or a configuration key-value pair")}},_setTimeRangeSetting:function(e,t){var n=p.default.clone(this.state.config.timerange);switch(e){case"from":case"to":var r=p.default.clone(this.state.errors);try{n[e]=c.default.parseFromString(t).toISOString(),r[e]=!1}catch(t){r[e]=!0}this.setState({errors:r});break;default:n[e]=t}this._setConfigurationSetting("timerange",n)},_bindTimeRangeValue:function(e){this._setTimeRangeSetting(e.target.name,m.default.getValueFromInput(e.target))},_formatDateTime:function(e){try{return c.default.parseFromString(e).toString()}catch(t){return e}},_getTimeRangeFormControls:function(){var e=s.default.createElement(a.Input,{type:"text",label:"Time range type",disabled:!0,value:h.default.capitalizeFirstLetter(this.state.config.timerange.type),help:"Type of time range to use in the widget."}),t=void 0;switch(this.state.config.timerange.type){case"relative":t=s.default.createElement(a.Input,{type:"number",id:"timerange-relative",name:"range",label:"Search relative time",required:!0,min:"0",defaultValue:this.state.config.timerange.range,onChange:this._bindTimeRangeValue,help:"Number of seconds relative to the moment the search executes. 0 searches in all messages."});break;case"absolute":t=s.default.createElement("div",null,s.default.createElement(a.Input,{type:"text",id:"timerange-absolute-from",name:"from",label:"Search from",required:!0,bsStyle:!0===this.state.errors.from?"error":null,defaultValue:this._formatDateTime(this.state.config.timerange.from),onChange:this._bindTimeRangeValue,help:"Earliest time to be included in the search. E.g. 2015-03-27 13:23:41"}),s.default.createElement(a.Input,{type:"text",id:"timerange-absolute-to",name:"to",label:"Search to",required:!0,bsStyle:!0===this.state.errors.to?"error":null,defaultValue:this._formatDateTime(this.state.config.timerange.to),onChange:this._bindTimeRangeValue,help:"Latest time to be included in the search. E.g. 2015-03-27 13:23:41"}));break;case"keyword":t=s.default.createElement(a.Input,{type:"text",id:"timerange-keyword",name:"keyword",label:"Search keyword",required:!0,defaultValue:this.state.config.timerange.keyword,onChange:this._bindTimeRangeValue,help:"Search keyword representing the time to be included in the search. E.g. last day"});break;default:t=void 0}return s.default.createElement("div",null,e,t)},_getSpecificConfigurationControls:function(){return this.widgetPlugin&&this.widgetPlugin.configurationEditComponent?s.default.createElement(this.widgetPlugin.configurationEditComponent,{id:this.props.widget.id,config:this.state.config,onChange:this._onConfigurationValueChange}):null},render:function(){return s.default.createElement(y.default,{ref:"editModal",title:'Edit widget "'+this.state.description+'"',onSubmitForm:this.save,onModalClose:this.props.onModalHidden,submitButtonText:"Update"},s.default.createElement("fieldset",null,s.default.createElement(a.Input,{type:"text",id:"title",name:"description",label:"Title",required:!0,defaultValue:this.state.description,onChange:this._bindValue,help:"Type a name that describes your widget.",autoFocus:!0}),s.default.createElement(a.Input,{type:"number",min:"1",required:!0,id:"cache_time",name:"cache_time",label:"Cache time",defaultValue:this.state.cache_time,onChange:this._bindValue,help:"Number of seconds the widget value will be cached."}),this._getTimeRangeFormControls(),this._getSpecificConfigurationControls()))}});exports.default=b,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=t(11),u=s.default.createClass({displayName:"WidgetFooter",propTypes:{locked:i.default.bool.isRequired,onDelete:i.default.func.isRequired,onEditConfig:i.default.func.isRequired,onShowConfig:i.default.func.isRequired,replayHref:i.default.string.isRequired,error:i.default.any,errorMessage:i.default.string,calculatedAt:i.default.string,replayToolTip:i.default.string},_showConfig:function(e){e.preventDefault(),this.props.onShowConfig()},_editConfig:function(e){e.preventDefault(),this.props.onEditConfig()},_delete:function(e){e.preventDefault(),this.props.onDelete()},render:function(){var e=void 0;this.props.error&&(e=s.default.createElement("span",{className:"load-error",title:this.props.errorMessage},s.default.createElement("i",{className:"fa fa-exclamation-triangle"})));var t=void 0;t=this.props.calculatedAt?s.default.createElement("span",{title:this.props.calculatedAt},s.default.createElement(l.Timestamp,{dateTime:this.props.calculatedAt,relative:!0})):"Loading...";var n=this.props.replayToolTip?null:"Replay search",r=this.props.replayToolTip?null:this.props.replayHref,i=s.default.createElement(a.Button,{bsStyle:"link",className:"btn-text",title:n,href:r},s.default.createElement("i",{className:"fa fa-play"}));this.props.replayToolTip&&(i=s.default.createElement(a.OverlayTrigger,{placement:"bottom",overlay:s.default.createElement(a.Tooltip,{id:"tooltip"},this.props.replayToolTip)},i));var o=s.default.createElement("div",{className:"actions"},s.default.createElement("div",{className:"widget-replay"},i),s.default.createElement("div",{className:"widget-info"},s.default.createElement(a.Button,{bsStyle:"link",className:"btn-text",title:"Show widget configuration",onClick:this._showConfig},s.default.createElement("i",{className:"fa fa-info-circle"})))),u=s.default.createElement("div",{className:"actions"},s.default.createElement("div",{className:"widget-delete"},s.default.createElement(a.Button,{bsStyle:"link",className:"btn-text",title:"Delete widget",onClick:this._delete},s.default.createElement("i",{className:"fa fa-trash"}))),s.default.createElement("div",{className:"widget-edit"},s.default.createElement(a.Button,{bsStyle:"link",className:"btn-text",title:"Edit widget",onClick:this._editConfig},s.default.createElement("i",{className:"fa fa-pencil"}))));return s.default.createElement("div",null,s.default.createElement("div",{className:"widget-update-info"},e,t),s.default.createElement("div",null,this.props.locked?o:u))}});exports.default=u,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=s.default.createClass({displayName:"WidgetHeader",propTypes:{title:i.default.string.isRequired},render:function(){return s.default.createElement("div",null,s.default.createElement("div",{className:"widget-title"},this.props.title),s.default.createElement("div",{className:"clearfix"}))}});exports.default=a,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),s=n(o),a=t(4),l=s.default.createClass({displayName:"WidgetVisualizationNotFound",propTypes:{widgetClassName:i.default.string.isRequired},render:function(){return s.default.createElement(a.Alert,{bsStyle:"danger"},s.default.createElement("i",{className:"fa fa-exclamation-circle"})," Widget Visualization (",s.default.createElement("i",null,this.props.widgetClassName),") not found. Seems like the plugin supplying this widget is not loaded.")}});exports.default=l,e.exports=exports.default},function(e,exports,t){"use strict";var n=t(32),r=t(627),i=t(50);n.PluginStore.register(new n.PluginManifest({},{widgets:[{type:"SEARCH_RESULT_COUNT",displayName:"Search result count",defaultHeight:1,defaultWidth:1,visualizationComponent:r.NumericVisualization,configurationCreateComponent:i.CountWidgetCreateConfiguration,configurationEditComponent:i.CountWidgetEditConfiguration},{type:"STREAM_SEARCH_RESULT_COUNT",displayName:"Stream search result count",defaultHeight:1,defaultWidth:1,visualizationComponent:r.NumericVisualization,configurationCreateComponent:i.CountWidgetCreateConfiguration,configurationEditComponent:i.CountWidgetEditConfiguration},{type:"STATS_COUNT",displayName:"Statistical value",defaultHeight:1,defaultWidth:1,visualizationComponent:r.NumericVisualization,configurationCreateComponent:i.StatisticalCountWidgetCreateConfiguration,configurationEditComponent:i.StatisticalCountWidgetEditConfiguration},{type:"SEARCH_RESULT_CHART",displayName:"Search result graph",defaultHeight:1,defaultWidth:2,visualizationComponent:r.HistogramVisualization},{type:"QUICKVALUES",displayName:"Quick values",defaultHeight:3,defaultWidth:1,visualizationComponent:r.QuickValuesVisualization,configurationCreateComponent:i.QuickValuesWidgetCreateConfiguration,configurationEditComponent:i.QuickValuesWidgetEditConfiguration},{type:"FIELD_CHART",displayName:"Field graph",defaultHeight:1,defaultWidth:2,visualizationComponent:r.GraphVisualization,configurationEditComponent:i.FieldChartWidgetConfiguration},{type:"STACKED_CHART",displayName:"Stacked graph",defaultHeight:1,defaultWidth:2,visualizationComponent:r.StackedGraphVisualization,configurationEditComponent:i.StackedChartWidgetConfiguration}]}))},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(90);Object.defineProperty(exports,"GraphVisualization",{enumerable:!0,get:function(){return n(r).default}});var i=t(628);Object.defineProperty(exports,"HistogramVisualization",{enumerable:!0,get:function(){return n(i).default}});var o=t(629);Object.defineProperty(exports,"NumericVisualization",{enumerable:!0,get:function(){return n(o).default}});var s=t(188);Object.defineProperty(exports,"QuickValuesVisualization",{enumerable:!0,get:function(){return n(s).default}});var a=t(630);Object.defineProperty(exports,"StackedGraphVisualization",{enumerable:!0,get:function(){return n(a).default}})},function(e,exports,t){"use strict";(function(n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var i=t(1),o=r(i),s=t(0),a=r(s),l=t(15),u=r(l),c=t(24),d=r(c),h=t(91),f=r(h),p=t(92),g=r(p),m=t(34),v=r(m),y=t(53),b=r(y),_=t(20),w=r(_),A=t(45),C=r(A),E=t(67),x=r(E),S=t(66),F=r(S),k=t(12),T=r(k);n.jQuery=T.default,t(68);var D=a.default.createClass({displayName:"HistogramVisualization",propTypes:{id:o.default.string.isRequired,data:o.default.object.isRequired,config:o.default.object.isRequired,computationTimeRange:o.default.object,height:o.default.number,width:o.default.number},getInitialState:function(){return this.triggerRender=!0,this.histogramData=(0,f.default)(),this.dimension=this.histogramData.dimension(function(e){return e.x}),this.group=this.dimension.group().reduceSum(function(e){return e.y}),{dataPoints:[]}},componentDidMount:function(){this.renderHistogram(),this._updateData(this.props.data)},componentWillReceiveProps:function(e){(0,b.default)(this.props,e)||(e.height===this.props.height&&e.width===this.props.width||this._resizeVisualization(e.width,e.height),this._updateData(e.data))},_updateData:function(e){this.setState({dataPoints:e},this.drawData)},_resizeVisualization:function(e,t){this.histogram.width(e).height(t),this.triggerRender=!0},drawData:function(){var e="relative"===this.props.config.timerange.type&&0===this.props.config.timerange.range,t=C.default.format(this.state.dataPoints,this.props.computationTimeRange,this.props.config.interval,this.props.width,e,null);this.histogram.xUnits(function(){return t.length-1}),this.histogramData.remove(),this.histogramData.add(t),this.triggerRender?(this.histogram.render(),this.triggerRender=!1):this.histogram.redraw()},renderHistogram:function(){var e=u.default.findDOMNode(this);this.histogram=g.default.barChart(e),this.histogram.width(this.props.width).height(this.props.height).margins({left:50,right:15,top:10,bottom:30}).dimension(this.dimension).group(this.group).x(v.default.time.scale()).elasticX(!0).elasticY(!0).centerBar(!0).renderHorizontalGridLines(!0).brushOn(!1).xAxisLabel("Time").yAxisLabel("Messages").renderTitle(!1).colors(x.default.glColourPalette()).on("renderlet",function(){var t=function(e){return'