aboutsummaryrefslogtreecommitdiff
path: root/webAO/ui.b.js
diff options
context:
space:
mode:
authorstonedDiscord <stoned@derpymail.org>2019-07-16 19:15:52 +0200
committerstonedDiscord <stoned@derpymail.org>2019-07-16 19:15:52 +0200
commitfc7c2e5768d7e1a54cc92a02f9ed6c4def3ad5e0 (patch)
treed3ddff081a0b2e4a1452208919c03b8e9693cc41 /webAO/ui.b.js
parentbc1bb826ca150f194519508d3494ebe33167533b (diff)
ignore the unreadable mini files
at this point they don't even count as source for me, they are more like binaries but only using readable characters.
Diffstat (limited to 'webAO/ui.b.js')
-rw-r--r--webAO/ui.b.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/webAO/ui.b.js b/webAO/ui.b.js
deleted file mode 100644
index 2881736..0000000
--- a/webAO/ui.b.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){(function(e){var n,i,o,s;function r(e){var t="function"==typeof Map?new Map:void 0;return(r=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return a(e,arguments,u(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),m(i,e)})(e)}function a(e,t,n){return(a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&m(o,n.prototype),o}).apply(null,arguments)}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function h(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?d(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e){return(g="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})(e)}"undefined"==typeof self||self,s=function(){var e=Math.min,t=Math.floor,n=Math.max;return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=35)}([function(e,t,n){"use strict";t.e=function(e){return $.zepto?e.touches?e.targetTouches[0]:e:e.originalEvent&&e.originalEvent.touches?e.originalEvent.touches[0]:e},t.j=function(e){var t,n;if("function"==typeof o.a)return o()(e);for(n in t=[],e)t.push(n);return t},t.d=function(e){if(window.location.hash)return function(e){var t=location.hash.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null}(e);if(!window.location.search)return null;var t,n,i=window.location.search.substr(1).split("&"),o={};for(n=0;n<i.length;n++)o[(t=i[n].split("="))[0]]=t[1];return o[e]||null},t.b=function(e,t){for(var n in t)e[n]=t[n];return e},t.a=function(e){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)})(function(){e()})},t.g=function(e,t){if(!(t instanceof Array))throw new Error("Haystack is not an Array");if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},n.d(t,"h",function(){return r}),t.c=function(e,t,n){if(void 0!==Function.prototype.bind)return Function.prototype.bind.apply(e,[t].concat(n||[]));var i=function i(){var o=(n||[]).concat(Array.prototype.slice.call(arguments,0));return this instanceof i?void e.apply(this,o):e.apply(t,o)};return i.prototype=e.prototype,i},t.i=function(){return"function"==typeof Date.now?Date.now():(new Date).getTime()},t.f=function(){return(1e15*Math.random()).toString(36).replace(".","")},t.k=function(e){return $.trim(e.replace(/(<([^>]+)>)/gi,""))};var i=n(40),o=n.n(i),s=n(60),r=(n.n(s),"object"!=("undefined"==typeof Int8Array?"undefined":g(Int8Array))?function(e){return"function"==typeof e||!1}:function(e){return"[object Function]"===toString.call(e)})},function(e,t,n){"use strict";var i=n(0),o="__all";t.a=o,t.b=function(){return function e(){p(this,e),this._mSubscriptions={},this._mSubscriptions[o]=[],this.on=function(e,t,n){if(!Object(i.h)(t))throw new Error("Tried to listen to event "+e+" with non-function callback "+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:n})},this.emit=function(e){var t,n,i;i=Array.prototype.slice.call(arguments,1);var s=this._mSubscriptions[e];if(s)for(s=s.slice(),t=0;t<s.length;t++)n=s[t].ctx||{},s[t].fn.apply(n,i);i.unshift(e);var r=this._mSubscriptions[o].slice();for(t=0;t<r.length;t++)n=r[t].ctx||{},r[t].fn.apply(n,i)},this.unbind=function(e,t,n){if(!this._mSubscriptions[e])throw new Error("No subscribtions to unsubscribe for event "+e);var i,o=!1;for(i=0;i<this._mSubscriptions[e].length;i++)t&&this._mSubscriptions[e][i].fn!==t||n&&n!==this._mSubscriptions[e][i].ctx||(this._mSubscriptions[e].splice(i,1),o=!0);if(0==o)throw new Error("Nothing to unbind for "+e)},this.off=this.unbind,this.trigger=this.emit}}()},function(e){var t=e.exports={version:"2.5.6"};"number"==typeof __e&&(__e=t)},function(e,t,n){"use strict";var i=n(1),o=n(26),s=n(12),r=n(27),a=n(66),l=n(0),m=function(e){function t(e,n,o){var s;return p(this,t),(s=h(this,u(t).call(this))).config=s._extendItemNode(n),s.type=n.type,s.contentItems=[],s.parent=o,s.isInitialised=!1,s.isMaximised=!1,s.isRoot=!1,s.isRow=!1,s.isColumn=!1,s.isStack=!1,s.isComponent=!1,s.layoutManager=e,s._pendingEventPropagations={},s._throttledEvents=["stateChanged"],s.on(i.a,s._propagateEvent,d(s)),n.content&&s._createContentItems(n),s}return f(t,i.b),c(t,[{key:"setSize",value:function(){throw new Error("Abstract Method")}},{key:"callDownwards",value:function(e,t,n,i){var o;for(!0!==n&&!0!==i&&this[e].apply(this,t||[]),o=0;o<this.contentItems.length;o++)this.contentItems[o].callDownwards(e,t,n);!0===n&&!0!==i&&this[e].apply(this,t||[])}},{key:"removeChild",value:function(e,t){var n=Object(l.g)(e,this.contentItems);if(-1===n)throw new Error("Can't remove child item. Unknown content item");!0!==t&&this.contentItems[n]._$destroy(),this.contentItems.splice(n,1),this.config.content.splice(n,1),0<this.contentItems.length?this.callDownwards("setSize"):!(this instanceof s.a)&&!0===this.config.isClosable&&this.parent.removeChild(this)}},{key:"undisplayChild",value:function(e){if(-1===Object(l.g)(e,this.contentItems))throw new Error("Can't remove child item. Unknown content item");this instanceof s.a||!0!==this.config.isClosable||this.parent.undisplayChild(this)}},{key:"addChild",value:function(e,t){void 0===t&&(t=this.contentItems.length),this.contentItems.splice(t,0,e),void 0===this.config.content&&(this.config.content=[]),this.config.content.splice(t,0,e.config),e.parent=this,!0===e.parent.isInitialised&&!1===e.isInitialised&&e._$init()}},{key:"replaceChild",value:function(e,t,n){t=this.layoutManager._$normalizeContentItem(t);var i=Object(l.g)(e,this.contentItems),o=e.element[0].parentNode;if(-1===i)throw new Error("Can't replace child. oldChild is not child of this");o.replaceChild(t.element[0],e.element[0]),!0===n&&(e.parent=null,e._$destroy()),this.contentItems[i]=t,t.parent=this,this.isStack&&(this.header.tabs[i].contentItem=t),!0===t.parent.isInitialised&&!1===t.isInitialised&&t._$init(),this.callDownwards("setSize")}},{key:"remove",value:function(){this.parent.removeChild(this)}},{key:"popout",value:function(){var e=this.layoutManager.createPopout(this);return this.emitBubblingEvent("stateChanged"),e}},{key:"toggleMaximise",value:function(e){e&&e.preventDefault(),!0===this.isMaximised?this.layoutManager._$minimiseItem(this):this.layoutManager._$maximiseItem(this),this.isMaximised=!this.isMaximised,this.emitBubblingEvent("stateChanged")}},{key:"select",value:function(){this.layoutManager.selectedItem!==this&&(this.layoutManager.selectItem(this,!0),this.element.addClass("lm_selected"))}},{key:"deselect",value:function(){this.layoutManager.selectedItem===this&&(this.layoutManager.selectedItem=null,this.element.removeClass("lm_selected"))}},{key:"setTitle",value:function(e){this.config.title=e,this.emit("titleChanged",e),this.emit("stateChanged")}},{key:"hasId",value:function(e){return!!this.config.id&&("string"==typeof this.config.id?this.config.id===e:this.config.id instanceof Array?-1!==Object(l.g)(e,this.config.id):void 0)}},{key:"addId",value:function(e){this.hasId(e)||(this.config.id?"string"==typeof this.config.id?this.config.id=[this.config.id,e]:this.config.id instanceof Array&&this.config.id.push(e):this.config.id=e)}},{key:"removeId",value:function(e){if(!this.hasId(e))throw new Error("Id not found");if("string"==typeof this.config.id)delete this.config.id;else if(this.config.id instanceof Array){var t=Object(l.g)(e,this.config.id);this.config.id.splice(t,1)}}},{key:"getItemsByFilter",value:function(e){var t=[];return function n(i){for(var o=0;o<i.contentItems.length;o++)!0===e(i.contentItems[o])&&t.push(i.contentItems[o]),n(i.contentItems[o])}(this),t}},{key:"getItemsById",value:function(e){return this.getItemsByFilter(function(t){return t.config.id instanceof Array?-1!==Object(l.g)(e,t.config.id):t.config.id===e})}},{key:"getItemsByType",value:function(e){return this._$getItemsByProperty("type",e)}},{key:"getComponentsByName",value:function(e){var t,n=this._$getItemsByProperty("componentName",e),i=[];for(t=0;t<n.length;t++)i.push(n[t].instance);return i}},{key:"_$getItemsByProperty",value:function(e,t){return this.getItemsByFilter(function(n){return n[e]===t})}},{key:"_$setParent",value:function(e){this.parent=e}},{key:"_$highlightDropZone",value:function(e,t,n){this.layoutManager.dropTargetIndicator.highlightArea(n)}},{key:"_$onDrop",value:function(e){this.addChild(e)}},{key:"_$hide",value:function(){this._callOnActiveComponents("hide"),this.element.hide(),this.layoutManager.updateSize()}},{key:"_$show",value:function(){this._callOnActiveComponents("show"),this.element.show(),this.layoutManager.updateSize()}},{key:"_callOnActiveComponents",value:function(e){var t,n,i=this.getItemsByType("stack");for(n=0;n<i.length;n++)(t=i[n].getActiveContentItem())&&t.isComponent&&t.container[e]()}},{key:"_$destroy",value:function(){this.emitBubblingEvent("beforeItemDestroyed"),this.callDownwards("_$destroy",[],!0,!0),this.element.remove(),this.emitBubblingEvent("itemDestroyed")}},{key:"_$getArea",value:function(e){var t=(e=e||this.element).offset(),n=e.width(),i=e.height();return{x1:t.left,y1:t.top,x2:t.left+n,y2:t.top+i,surface:n*i,contentItem:this}}},{key:"_$init",value:function(){var e;for(this.setSize(),e=0;e<this.contentItems.length;e++)this.childElementContainer.append(this.contentItems[e].element);this.isInitialised=!0,this.emitBubblingEvent("itemCreated"),this.emitBubblingEvent(this.type+"Created")}},{key:"emitBubblingEvent",value:function(e){var t=new o.a(e,this);this.emit(e,t)}},{key:"_createContentItems",value:function(e){var t,n;if(!(e.content instanceof Array))throw new r.a("content must be an Array",e);for(n=0;n<e.content.length;n++)t=this.layoutManager.createContentItem(e.content[n],this),this.contentItems.push(t)}},{key:"_extendItemNode",value:function(e){for(var t in a.a)void 0===e[t]&&(e[t]=a.a[t]);return e}},{key:"_propagateEvent",value:function(e,t){t instanceof o.a&&!1===t.isPropagationStopped&&!0===this.isInitialised&&(!1===this.isRoot&&this.parent?this.parent.emit.apply(this.parent,Array.prototype.slice.call(arguments,0)):this._scheduleEventPropagationToLayoutManager(e,t))}},{key:"_scheduleEventPropagationToLayoutManager",value:function(e,t){-1===Object(l.g)(e,this._throttledEvents)?this.layoutManager.emit(e,t.origin):!0!==this._pendingEventPropagations[e]&&(this._pendingEventPropagations[e]=!0,Object(l.a)(Object(l.c)(this._propagateEventToLayoutManager,this,[e,t])))}},{key:"_propagateEventToLayoutManager",value:function(e,t){this._pendingEventPropagations[e]=!1,this.layoutManager.emit(e,t)}}]),t}();t.a=m},function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},function(e,t,n){e.exports=!n(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,i,o){"use strict";var s=Math.round,r=o(3),a=o(13),l=o(67),d=o(0),m=function(e){function i(e,t,n,o){var s;return p(this,i),(s=h(this,u(i).call(this,t,n,o))).isRow=!e,s.isColumn=e,s.element=$('<div class="lm_item lm_'+(e?"column":"row")+'"></div>'),s.childElementContainer=s.element,s._splitterSize=t.config.dimensions.borderWidth,s._splitterGrabSize=t.config.dimensions.borderGrabWidth,s._isColumn=e,s._dimension=e?"height":"width",s._splitter=[],s._splitterPosition=null,s._splitterMinPosition=null,s._splitterMaxPosition=null,s}return f(i,r.a),c(i,[{key:"addChild",value:function(e,t,i){var o,s,a,l;if(e=this.layoutManager._$normalizeContentItem(e,this),void 0===t&&(t=this.contentItems.length),0<this.contentItems.length?(l=this._createSplitter(n(0,t-1)).element,0<t?(this.contentItems[t-1].element.after(l),l.after(e.element),this._isDocked(t-1)&&(this._splitter[t-1].element.hide(),this._splitter[t].element.show())):(this.contentItems[0].element.before(l),l.before(e.element))):this.childElementContainer.append(e.element),r.a.prototype.addChild.call(this,e,t),o=1/this.contentItems.length*100,!0!==i){for(a=0;a<this.contentItems.length;a++)this.contentItems[a]===e?e.config[this._dimension]=o:(s=this.contentItems[a].config[this._dimension]*=(100-o)/100,this.contentItems[a].config[this._dimension]=s);this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking()}else this.emitBubblingEvent("stateChanged")}},{key:"undisplayChild",value:function(e){var t,i=e.config[this._dimension],o=Object(d.g)(e,this.contentItems),s=n(o-1,0);if(-1===o)throw new Error("Can't undisplay child. ContentItem is not child of this Row or Column");this._splitter[s]&&this._splitter[s].element.hide(),s<this._splitter.length&&this._isDocked(s)&&this._splitter[s].element.hide();var a=this._isDocked();for(t=0;t<this.contentItems.length;t++)this.contentItems[t]===e?this.contentItems[t].config[this._dimension]=0:this._isDocked(t)||(this.contentItems[t].config[this._dimension]+=i/(this.contentItems.length-1-a));1===this.contentItems.length&&r.a.prototype.undisplayChild.call(this,e),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"removeChild",value:function(e,t){var i,o,s=e.config[this._dimension],a=Object(d.g)(e,this.contentItems),l=n(a-1,0);if(-1===a)throw new Error("Can't remove child. ContentItem is not child of this Row or Column");this._splitter[l]&&(this._splitter[l]._$destroy(),this._splitter.splice(l,1)),l<this._splitter.length&&this._isDocked(l)&&this._splitter[l].element.hide();var c=this._isDocked();for(i=0;i<this.contentItems.length;i++)this.contentItems[i]!==e&&(this._isDocked(i)||(this.contentItems[i].config[this._dimension]+=s/(this.contentItems.length-1-c)));r.a.prototype.removeChild.call(this,e,t),1===this.contentItems.length&&!0===this.config.isClosable?(o=this.contentItems[0],this.contentItems=[],this.parent.replaceChild(this,o,!0),this._validateDocking(this.parent)):(this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking())}},{key:"replaceChild",value:function(e,t){var n=e.config[this._dimension];r.a.prototype.replaceChild.call(this,e,t),t.config[this._dimension]=n,this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"setSize",value:function(){0<this.contentItems.length&&(this._calculateRelativeSizes(),this._setAbsoluteSizes()),this.emitBubblingEvent("stateChanged"),this.emit("resize")}},{key:"dock",value:function(e,t,i){if(1===this.contentItems.length)throw new Error("Can't dock child when it single");var o=e.config[this._dimension],s=this.layoutManager.config.dimensions.headerHeight,r=Object(d.g)(e,this.contentItems),a=n(r-1,0);if(-1===r)throw new Error("Can't dock child. ContentItem is not child of this Row or Column");var l,c=e._docker&&e._docker.docked;if(void 0===t||t!=c){if(c){for(this._splitter[a].element.show(),l=0;l<this.contentItems.length;l++){var h=e._docker.size;this.contentItems[l]===e?e.config[this._dimension]=h:(itemSize=this.contentItems[l].config[this._dimension]*=(100-h)/100,this.contentItems[l].config[this._dimension]=itemSize)}e._docker={docked:!1}}else{if(2>this.contentItems.length-this._isDocked())throw new Error("Can't dock child when it is last in "+this.config.type);var u={column:{first:"top",last:"bottom"},row:{first:"left",last:"right"}}[this.config.type][r?"last":"first"];e.header.position()!=u&&e.header.position(u),this._splitter[a]&&this._splitter[a].element.hide();var f=this._isDocked();for(l=0;l<this.contentItems.length;l++)this.contentItems[l]===e?this.contentItems[l].config[this._dimension]=0:this._isDocked(l)||(this.contentItems[l].config[this._dimension]+=o/(this.contentItems.length-1-f));e._docker={dimension:this._dimension,size:o,realSize:e.element[this._dimension]()-s,docked:!0},i&&e.childElementContainer[this._dimension](0)}e.element.toggleClass("lm_docked",e._docker.docked),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"),this._validateDocking()}}},{key:"_$init",value:function(){if(!0!==this.isInitialised){var e;for(r.a.prototype._$init.call(this),e=0;e<this.contentItems.length-1;e++)this.contentItems[e].element.after(this._createSplitter(e).element);for(e=0;e<this.contentItems.length;e++)this.contentItems[e]._header&&this.contentItems[e]._header.docked&&this.dock(this.contentItems[e],!0,!0)}}},{key:"_setAbsoluteSizes",value:function(){var e,t=this._calculateAbsoluteSizes();for(e=0;e<this.contentItems.length;e++)0<t.additionalPixel-e&&t.itemSizes[e]++,this._isColumn?(this.contentItems[e].element.width(t.totalWidth),this.contentItems[e].element.height(t.itemSizes[e])):(this.contentItems[e].element.width(t.itemSizes[e]),this.contentItems[e].element.height(t.totalHeight))}},{key:"_calculateAbsoluteSizes",value:function(){var e,n,i=(this.contentItems.length-1)*this._splitterSize,o=this.layoutManager.config.dimensions.headerHeight,s=this.element.width(),r=this.element.height(),a=0,l=[];for(this._isColumn?r-=i:s-=i,e=0;e<this.contentItems.length;e++)this._isDocked(e)&&(this._isColumn?r-=o-this._splitterSize:s-=o-this._splitterSize);for(e=0;e<this.contentItems.length;e++)n=this._isColumn?t(r*(this.contentItems[e].config.height/100)):t(s*(this.contentItems[e].config.width/100)),this._isDocked(e)&&(n=o),a+=n,l.push(n);return{itemSizes:l,additionalPixel:t((this._isColumn?r:s)-a),totalWidth:s,totalHeight:r}}},{key:"_calculateRelativeSizes",value:function(){var e,t=0,n=[],i=this._isColumn?"height":"width";for(e=0;e<this.contentItems.length;e++)void 0===this.contentItems[e].config[i]?n.push(this.contentItems[e]):t+=this.contentItems[e].config[i];if(100!==s(t))if(100>s(t)&&0<n.length){for(e=0;e<n.length;e++)n[e].config[i]=(100-t)/n.length;this._respectMinItemWidth()}else{if(100<s(t))for(e=0;e<n.length;e++)n[e].config[i]=50,t+=50;for(e=0;e<this.contentItems.length;e++)this.contentItems[e].config[i]=this.contentItems[e].config[i]/t*100;this._respectMinItemWidth()}else this._respectMinItemWidth()}},{key:"_respectMinItemWidth",value:function(){var e,t,n,i=this.layoutManager.config.dimensions&&this.layoutManager.config.dimensions.minItemWidth||0,o=null,r=[],a=0,l=0,c=0,h=0,u=[];if(!(this._isColumn||!i||1>=this.contentItems.length)){o=this._calculateAbsoluteSizes();for(var d=0;d<this.contentItems.length;d++)this.contentItems[d],(h=o.itemSizes[d])<i?(l+=i-h,n={width:i}):(a+=h-i,n={width:h},r.push(n)),u.push(n);if(!(0==l||l>a)){for(e=l/a,c=l,d=0;d<r.length;d++)n=r[d],c-=t=s((n.width-i)*e),n.width-=t;for(0!==c&&(u[u.length-1].width-=c),d=0;d<this.contentItems.length;d++)this.contentItems[d].config.width=u[d].width/o.totalWidth*100}}}},{key:"_createSplitter",value:function(e){var t;return(t=new l.a(this._isColumn,this._splitterSize,this._splitterGrabSize)).on("drag",Object(d.c)(this._onSplitterDrag,this,[t]),this),t.on("dragStop",Object(d.c)(this._onSplitterDragStop,this,[t]),this),t.on("dragStart",Object(d.c)(this._onSplitterDragStart,this,[t]),this),this._splitter.splice(e,0,t),t}},{key:"_getItemsForSplitter",value:function(e){var t=Object(d.g)(e,this._splitter);return{before:this.contentItems[t],after:this.contentItems[t+1]}}},{key:"_isDocked",value:function(e){if(void 0===e){for(var t=0,n=0;n<this.contentItems.length;++n)this._isDocked(n)&&t++;return t}return e<this.contentItems.length?this.contentItems[e]._docker&&this.contentItems[e]._docker.docked:void 0}},{key:"_validateDocking",value:function(e){for(var t=1<(e=e||this).contentItems.length-e._isDocked(),n=0;n<e.contentItems.length;++n)e.contentItems[n]instanceof a.a&&(e.contentItems[n].header._setDockable(e._isDocked(n)||t),e.contentItems[n].header._$setClosable(t))}},{key:"_getMinimumDimensions",value:function(e){for(var t=0,i=0,o=0;o<e.length;++o)t=n(e[o].minWidth||0,t),i=n(e[o].minHeight||0,i);return{horizontal:t,vertical:i}}},{key:"_onSplitterDragStart",value:function(e){var t=this._getItemsForSplitter(e),n=this.layoutManager.config.dimensions[this._isColumn?"minItemHeight":"minItemWidth"],i=this._getMinimumDimensions(t.before.config.content),o=this._isColumn?i.vertical:i.horizontal,s=this._getMinimumDimensions(t.after.config.content),r=this._isColumn?s.vertical:s.horizontal;this._splitterPosition=0,this._splitterMinPosition=-1*(t.before.element[this._dimension]()-(o||n)),this._splitterMaxPosition=t.after.element[this._dimension]()-(r||n)}},{key:"_onSplitterDrag",value:function(e,t,n){var i=this._isColumn?n:t;i>this._splitterMinPosition&&i<this._splitterMaxPosition&&(this._splitterPosition=i,e.element.css(this._isColumn?"top":"left",i))}},{key:"_onSplitterDragStop",value:function(e){var t=this._getItemsForSplitter(e),n=t.before.element[this._dimension](),i=t.after.element[this._dimension](),o=(this._splitterPosition+n)/(n+i),s=t.before.config[this._dimension]+t.after.config[this._dimension];t.before.config[this._dimension]=o*s,t.after.config[this._dimension]=(1-o)*s,e.element.css({top:0,left:0}),Object(d.a)(Object(d.c)(this.callDownwards,this,["setSize"]))}}]),i}();i.a=m},function(e,t,n){"use strict";var i=n(1),o=n(0),s=function(e){function t(e,n){var i;return p(this,t),(i=h(this,u(t).call(this)))._timeout=null,i._eElement=$(e),i._oDocument=$(document),i._eBody=$(document.body),i._nButtonCode=n||0,i._nDelay=200,i._nDistance=10,i._nX=0,i._nY=0,i._nOriginalX=0,i._nOriginalY=0,i._bDragging=!1,i._fMove=Object(o.c)(i.onMouseMove,d(i)),i._fUp=Object(o.c)(i.onMouseUp,d(i)),i._fDown=Object(o.c)(i.onMouseDown,d(i)),i._eElement.on("mousedown touchstart",i._fDown),i}return f(t,i.b),c(t,[{key:"destroy",value:function(){this._eElement.unbind("mousedown touchstart",this._fDown),this._oDocument.unbind("mouseup touchend",this._fUp),this._eElement=null,this._oDocument=null,this._eBody=null}},{key:"onMouseDown",value:function(e){if(e.preventDefault(),0==e.button||"touchstart"===e.type){var t=this._getCoordinates(e);this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.on("mousemove touchmove",this._fMove),this._oDocument.one("mouseup touchend",this._fUp),this._timeout=setTimeout(Object(o.c)(this._startDrag,this),this._nDelay)}}},{key:"onMouseMove",value:function(e){var t=Math.abs;if(null!=this._timeout){e.preventDefault();var n=this._getCoordinates(e);this._nX=n.x-this._nOriginalX,this._nY=n.y-this._nOriginalY,!1===this._bDragging&&(t(this._nX)>this._nDistance||t(this._nY)>this._nDistance)&&(clearTimeout(this._timeout),this._startDrag()),this._bDragging&&this.emit("drag",this._nX,this._nY,e)}}},{key:"onMouseUp",value:function(e){null!=this._timeout&&(clearTimeout(this._timeout),this._eBody.removeClass("lm_dragging"),this._eElement.removeClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events",""),this._oDocument.unbind("mousemove touchmove",this._fMove),this._oDocument.unbind("mouseup touchend",this._fUp),!0===this._bDragging&&(this._bDragging=!1,this.emit("dragStop",e,this._nOriginalX+this._nX)))}},{key:"_startDrag",value:function(){this._bDragging=!0,this._eBody.addClass("lm_dragging"),this._eElement.addClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}},{key:"_getCoordinates",value:function(e){return{x:(e=Object(o.e)(e)).pageX,y:e.pageY}}}]),t}();t.a=s},function(e,t,n){var i=n(9);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e){e.exports=function(e){return"object"==g(e)?null!==e:"function"==typeof e}},function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var i=n(0);t.a=function(){function e(){if(p(this,e),this._keys=["settings","hasHeaders","constrainDragToContainer","selectionEnabled","dimensions","borderWidth","minItemHeight","minItemWidth","headerHeight","dragProxyWidth","dragProxyHeight","labels","close","maximise","minimise","popout","content","componentName","componentState","id","width","type","height","isClosable","title","popoutWholeStack","openPopouts","parentId","activeItemIndex","reorderEnabled","borderGrabWidth"],36<this._keys.length)throw new Error("Too many keys in config minifier map");this._values=[!0,!1,"row","column","stack","component","close","maximise","minimise","open in new window"]}return c(e,[{key:"minifyConfig",value:function(e){var t={};return this._nextLevel(e,t,"_min"),t}},{key:"unminifyConfig",value:function(e){var t={};return this._nextLevel(e,t,"_max"),t}},{key:"_nextLevel",value:function(e,t,n){var i,o;for(i in e)e instanceof Array&&(i=parseInt(i,10)),e.hasOwnProperty(i)&&(o=this[n](i,this._keys),"object"==g(e[i])?(t[o]=e[i]instanceof Array?[]:{},this._nextLevel(e[i],t[o],n)):t[o]=this[n](e[i],this._values))}},{key:"_min",value:function(e,t){if("string"==typeof e&&1===e.length)return"___"+e;var n=Object(i.g)(e,t);return-1===n?e:n.toString(36)}},{key:"_max",value:function(e,t){return"string"==typeof e&&1===e.length?t[parseInt(e,36)]:"string"==typeof e&&"___"===e.substr(0,3)?e[3]:e}}]),e}()},function(e,t,n){"use strict";var i=n(3),o=n(6),s=function(e){function t(e,n,i){var o;return p(this,t),(o=h(this,u(t).call(this,e,n,null))).isRoot=!0,o.type="root",o.element=$('<div class="lm_goldenlayout lm_item lm_root"></div>'),o.childElementContainer=o.element,o._containerElement=i,o._containerElement.append(o.element),o}return f(t,i.a),c(t,[{key:"addChild",value:function(e){if(0<this.contentItems.length)throw new Error("Root node can only have a single child");e=this.layoutManager._$normalizeContentItem(e,this),this.childElementContainer.append(e.element),i.a.prototype.addChild.call(this,e),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}},{key:"setSize",value:function(e,t){e=void 0===e?this._containerElement.width():e,t=void 0===t?this._containerElement.height():t,this.element.width(e),this.element.height(t),this.contentItems[0]&&(this.contentItems[0].element.width(e),this.contentItems[0].element.height(t))}},{key:"_$highlightDropZone",value:function(){this.layoutManager.tabDropPlaceholder.remove(),i.a.prototype._$highlightDropZone.apply(this,arguments)}},{key:"_$onDrop",value:function(e,t){var n;if(e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),this.contentItems.length){("row"===e.config.type||"column"===e.config.type)&&((n=this.layoutManager.createContentItem({type:"stack"},this)).addChild(e),e=n);var i="x"==t.side[0]?"row":"column",s="x"==t.side[0]?"width":"height",r="2"==t.side[1],a=this.contentItems[0];if(a instanceof o.a&&a.type==i){var l=a.contentItems[r?0:a.contentItems.length-1];a.addChild(e,r?0:void 0,!0),l.config[s]*=.5,e.config[s]=l.config[s],a.callDownwards("setSize")}else{var c=this.layoutManager.createContentItem({type:i},this);this.replaceChild(a,c),c.addChild(e,r?0:void 0,!0),c.addChild(a,r?void 0:0,!0),a.config[s]=50,e.config[s]=50,c.callDownwards("setSize")}}else this.addChild(e)}}]),t}();t.a=s},function(t,i,o){"use strict";var s=o(3),r=o(6),a=o(28),l=o(0),m=function(t){function i(e,t,n){var o;p(this,i),(o=h(this,u(i).call(this,e,t,n))).element=$('<div class="lm_item lm_stack"></div>'),o._activeContentItem=null;var s=e.config;return o._header={show:!0===s.settings.hasHeaders&&!1!==t.hasHeaders,popout:s.settings.showPopoutIcon&&s.labels.popout,maximise:s.settings.showMaximiseIcon&&s.labels.maximise,close:s.settings.showCloseIcon&&s.labels.close,minimise:s.labels.minimise},s.header&&Object(l.b)(o._header,s.header),t.header&&Object(l.b)(o._header,t.header),t.content&&t.content[0]&&t.content[0].header&&Object(l.b)(o._header,t.content[0].header),o._dropZones={},o._dropSegment=null,o._contentAreaDimensions=null,o._dropIndex=null,o.isStack=!0,o.childElementContainer=$('<div class="lm_items"></div>'),o.header=new a.a(e,d(o)),o.element.on("mouseleave mouseenter",Object(l.c)(function(e){this._docker&&this._docker.docked&&this.childElementContainer[this._docker.dimension]("mouseenter"==e.type?this._docker.realSize:0)},d(o))),o.element.append(o.header.element),o.element.append(o.childElementContainer),o._setupHeaderPosition(),o._$validateClosability(),o}return f(i,s.a),c(i,[{key:"dock",value:function(e){this._header.dock&&this.parent instanceof r.a&&this.parent.dock(this,e)}},{key:"setSize",value:function(){if("none"!==this.element.css("display")){var e=this._docker&&this._docker.docked,t={width:this.element.width(),height:this.element.height()};this._header.show&&(t[this._sided?"width":"height"]-=this.layoutManager.config.dimensions.headerHeight),e&&(t[this._docker.dimension]=this._docker.realSize),e&&"height"!=this._docker.dimension||this.childElementContainer.width(t.width),e&&"width"!=this._docker.dimension||this.childElementContainer.height(t.height);for(var n=0;n<this.contentItems.length;n++)this.contentItems[n].element.width(t.width),this.contentItems[n].element.height(t.height);this.emit("resize"),this.emitBubblingEvent("stateChanged")}}},{key:"_$init",value:function(){var e,t;if(!0!==this.isInitialised){for(s.a.prototype._$init.call(this),e=0;e<this.contentItems.length;e++)this.header.createTab(this.contentItems[e]),this.contentItems[e]._$hide();if(0<this.contentItems.length){if(!(t=this.contentItems[this.config.activeItemIndex||0]))throw new Error("Configured activeItemIndex out of bounds");this.setActiveContentItem(t)}}}},{key:"setActiveContentItem",value:function(e){if(-1===Object(l.g)(e,this.contentItems))throw new Error("contentItem is not a child of this stack");null!==this._activeContentItem&&this._activeContentItem._$hide(),this._activeContentItem=e,this.header.setActiveContentItem(e),e._$show(),this.emit("activeContentItemChanged",e),this.layoutManager.emit("activeContentItemChanged",e),this.emitBubblingEvent("stateChanged")}},{key:"getActiveContentItem",value:function(){return this.header.activeContentItem}},{key:"addChild",value:function(e,t){t>this.contentItems.length&&(t-=1),e=this.layoutManager._$normalizeContentItem(e,this),s.a.prototype.addChild.call(this,e,t),this.childElementContainer.append(e.element),this.header.createTab(e,t),this.setActiveContentItem(e),this.callDownwards("setSize"),this._$validateClosability(),this.parent instanceof r.a&&this.parent._validateDocking(),this.emitBubblingEvent("stateChanged")}},{key:"removeChild",value:function(e,t){var i=Object(l.g)(e,this.contentItems);s.a.prototype.removeChild.call(this,e,t),this.header.removeTab(e),this.header.activeContentItem===e&&(0<this.contentItems.length?this.setActiveContentItem(this.contentItems[n(i-1,0)]):this._activeContentItem=null),this._$validateClosability(),this.parent instanceof r.a&&this.parent._validateDocking(),this.emitBubblingEvent("stateChanged")}},{key:"undisplayChild",value:function(e){if(1<this.contentItems.length){var t=Object(l.g)(e,this.contentItems);e._$hide&&e._$hide(),this.setActiveContentItem(this.contentItems[0===t?t+1:t-1])}else this.header.hideTab(e),e._$hide&&e._$hide(),s.a.prototype.undisplayChild.call(this,e),this.parent instanceof r.a&&this.parent._validateDocking();this.emitBubblingEvent("stateChanged")}},{key:"_$validateClosability",value:function(){var e,t,n;for(e=this.header._isClosable(),n=0,t=this.contentItems.length;n<t&&e;n++)e=this.contentItems[n].config.isClosable;this.header._$setClosable(e)}},{key:"_$destroy",value:function(){s.a.prototype._$destroy.call(this),this.header._$destroy(),this.element.off("mouseenter mouseleave")}},{key:"_$onDrop",value:function(e){if("header"===this._dropSegment)return this._resetHeaderDropZone(),void this.addChild(e,this._dropIndex);if("body"!==this._dropSegment){var t,n,i,o="top"===this._dropSegment||"bottom"===this._dropSegment,s="left"===this._dropSegment||"right"===this._dropSegment,r="top"===this._dropSegment||"left"===this._dropSegment,a=o&&this.parent.isColumn||s&&this.parent.isRow,c=o?"column":"row",h=o?"height":"width";e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),("row"===e.config.type||"column"===e.config.type)&&((n=this.layoutManager.createContentItem({type:"stack"},this)).addChild(e),e=n),a?(t=Object(l.g)(this,this.parent.contentItems),this.parent.addChild(e,r?t:t+1,!0),this.config[h]*=.5,e.config[h]=this.config[h],this.parent.callDownwards("setSize")):(c=o?"column":"row",i=this.layoutManager.createContentItem({type:c},this),this.parent.replaceChild(this,i),i.addChild(e,r?0:void 0,!0),i.addChild(this,r?void 0:0,!0),this.config[h]=50,e.config[h]=50,i.callDownwards("setSize")),this.parent._validateDocking()}else this.addChild(e)}},{key:"_$highlightDropZone",value:function(e,t){var n,i;for(n in this._contentAreaDimensions)if((i=this._contentAreaDimensions[n].hoverArea).x1<e&&i.x2>e&&i.y1<t&&i.y2>t)return void("header"===n?(this._dropSegment="header",this._highlightHeaderDropZone(this._sided?t:e)):(this._resetHeaderDropZone(),this._highlightBodyDropZone(n)))}},{key:"_$getArea",value:function(){if("none"===this.element.css("display"))return null;var e=s.a.prototype._$getArea,t=e.call(this,this.header.element),n=e.call(this,this.childElementContainer),i=n.x2-n.x1,o=n.y2-n.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},this._activeContentItem&&!1===this._activeContentItem.isComponent?t:0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2}},e.call(this,this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x1+.25*i,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x1+.5*i,y2:n.y2}},this._contentAreaDimensions.top={hoverArea:{x1:n.x1+.25*i,y1:n.y1,x2:n.x1+.75*i,y2:n.y1+.5*o},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y1+.5*o}},this._contentAreaDimensions.right={hoverArea:{x1:n.x1+.75*i,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1+.5*i,y1:n.y1,x2:n.x2,y2:n.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:n.x1+.25*i,y1:n.y1+.5*o,x2:n.x1+.75*i,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1+.5*o,x2:n.x2,y2:n.y2}},e.call(this,this.element))}},{key:"_highlightHeaderDropZone",value:function(t){var n,i,o,s,r,a,l,c,h=this.header.tabs.length,u=!1;if(0===h)return l=this.header.element.offset(),void this.layoutManager.dropTargetIndicator.highlightArea({x1:l.left,x2:l.left+100,y1:l.top+this.header.element.height()-20,y2:l.top+this.header.element.height()});for(n=0;n<h;n++)if(r=(i=this.header.tabs[n].element).offset(),this._sided?(s=r.top,o=r.left,c=i.height()):(s=r.left,o=r.top,c=i.width()),t>s&&t<s+c){u=!0;break}if(!(0==u&&t<s)){if(t<s+c/2?(this._dropIndex=n,i.before(this.layoutManager.tabDropPlaceholder)):(this._dropIndex=e(n+1,h),i.after(this.layoutManager.tabDropPlaceholder)),this._sided){var d=this.layoutManager.tabDropPlaceholder.offset().top;return void this.layoutManager.dropTargetIndicator.highlightArea({x1:o,x2:o+i.innerHeight(),y1:d,y2:d+this.layoutManager.tabDropPlaceholder.width()})}a=this.layoutManager.tabDropPlaceholder.offset().left,this.layoutManager.dropTargetIndicator.highlightArea({x1:a,x2:a+this.layoutManager.tabDropPlaceholder.width(),y1:o,y2:o+i.innerHeight()})}}},{key:"_resetHeaderDropZone",value:function(){this.layoutManager.tabDropPlaceholder.remove()}},{key:"toggleMaximise",value:function(e){this.isMaximised||this.dock(!1),s.a.prototype.toggleMaximise.call(this,e)}},{key:"_setupHeaderPosition",value:function(){var e=0<=["right","left","bottom"].indexOf(this._header.show)&&this._header.show;if(this.header.element.toggle(!!this._header.show),this._side=e,this._sided=0<=["right","left"].indexOf(this._side),this.element.removeClass("lm_left lm_right lm_bottom"),this._side&&this.element.addClass("lm_"+this._side),this.element.find(".lm_header").length&&this.childElementContainer){var t=0<=["right","bottom"].indexOf(this._side)?"before":"after";this.header.element[t](this.childElementContainer),this.callDownwards("setSize")}}},{key:"_highlightBodyDropZone",value:function(e){var t=this._contentAreaDimensions[e].highlightArea;this.layoutManager.dropTargetIndicator.highlightArea(t),this._dropSegment=e}}]),i}();i.a=m},function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var i=n(44),o=n(20);e.exports=Object.keys||function(e){return i(e,o)}},function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},function(e,t,n){var i=n(45),o=n(14);e.exports=function(e){return i(o(e))}},function(e){var n=Math.ceil;e.exports=function(e){return isNaN(e=+e)?0:(0<e?t:n)(e)}},function(e,t,n){var i=n(50)("keys"),o=n(52);e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var i=n(4),o=n(2),s=n(54),r=n(56),a=n(16),l="prototype",c=function e(t,n,c){var h,u,d,f=t&e.F,m=t&e.G,p=t&e.S,g=t&e.P,y=t&e.B,v=t&e.W,_=m?o:o[n]||(o[n]={}),b=_[l],w=m?i:p?i[n]:(i[n]||{})[l];for(h in m&&(c=n),c)(u=!f&&w&&void 0!==w[h])&&a(_,h)||(d=u?w[h]:c[h],_[h]=m&&"function"!=typeof w[h]?c[h]:y&&u?s(d,i):v&&w[h]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t[l]=e[l],t}(d):g&&"function"==typeof d?s(Function.call,d):d,g&&((_.virtual||(_.virtual={}))[h]=d,t&e.R&&b&&!b[h]&&r(b,h,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var i=n(8),o=n(57),s=n(58),r=Object.defineProperty;t.f=n(5)?Object.defineProperty:function(e,t,n){if(i(e),t=s(t,!0),i(n),o)try{return r(e,t,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(9),o=n(4).document,s=i(o)&&i(o.createElement);e.exports=function(e){return s?o.createElement(e):{}}},function(e,t){"use strict";t.a=function(){function e(t,n){p(this,e),this._reactComponent=null,this._originalComponentWillUpdate=null,this._container=t,this._initialState=n,this._reactClass=this._getReactClass(),this._container.on("open",this._render,this),this._container.on("destroy",this._destroy,this)}return c(e,[{key:"_render",value:function(){this._reactComponent=ReactDOM.render(this._getReactComponent(),this._container.getElement()[0]),this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate||function(){},this._reactComponent.componentWillUpdate=this._onUpdate.bind(this),this._container.getState()&&this._reactComponent.setState(this._container.getState())}},{key:"_destroy",value:function(){ReactDOM.unmountComponentAtNode(this._container.getElement()[0]),this._container.off("open",this._render,this),this._container.off("destroy",this._destroy,this)}},{key:"_onUpdate",value:function(e,t){this._container.setState(t),this._originalComponentWillUpdate.call(this._reactComponent,e,t)}},{key:"_getReactClass",value:function(){var e,t=this._container._config.component;if(!t)throw new Error("No react component name. type: react-component needs a field `component`");if(!(e=this._container.layoutManager.getComponent(t)))throw new Error('React component "'+t+'" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return e}},{key:"_getReactComponent",value:function(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container},t=$.extend(e,this._container._config.props);return React.createElement(this._reactClass,t)}}]),e}()},function(e,t,n){"use strict";var i=n(1),o=n(0),s=function(e){function t(e){var n;return p(this,t),(n=h(this,u(t).call(this)))._layoutManager=e,n._dontPropagateToParent=null,n._childEventSource=null,n.on(i.a,Object(o.c)(n._onEventFromThis,d(n))),n._boundOnEventFromChild=Object(o.c)(n._onEventFromChild,d(n)),$(window).on("gl_child_event",n._boundOnEventFromChild),n}return f(t,i.b),c(t,[{key:"_onEventFromThis",value:function(){var e=Array.prototype.slice.call(arguments);this._layoutManager.isSubWindow&&e[0]!==this._dontPropagateToParent&&this._propagateToParent(e),this._propagateToChildren(e),this._dontPropagateToParent=null,this._childEventSource=null}},{key:"_$onEventFromParent",value:function(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)}},{key:"_onEventFromChild",value:function(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)}},{key:"_propagateToParent",value:function(e){var t,n="gl_child_event";document.createEvent?(t=window.opener.document.createEvent("HTMLEvents")).initEvent(n,!0,!0):(t=window.opener.document.createEventObject()).eventType=n,t.eventName=n,t.__glArgs=e,t.__gl=this._layoutManager,document.createEvent?window.opener.dispatchEvent(t):window.opener.fireEvent("on"+t.eventType,t)}},{key:"_propagateToChildren",value:function(e){var t,n;for(n=0;n<this._layoutManager.openPopouts.length;n++)(t=this._layoutManager.openPopouts[n].getGlInstance())&&t!==this._childEventSource&&t.eventHub._$onEventFromParent(e)}},{key:"destroy",value:function(){$(window).off("gl_child_event",this._boundOnEventFromChild)}}]),t}();t.a=s},function(e,t){"use strict";t.a=function(){function e(t,n){p(this,e),this.name=t,this.origin=n,this.isPropagationStopped=!1}return c(e,[{key:"stopPropagation",value:function(){this.isPropagationStopped=!0}}]),e}()},function(e,t){"use strict";var n=function(e){function t(e,n){var i;return p(this,t),(i=h(this,u(t).call(this))).name="Configuration Error",i.message=e,i.node=n,i}return f(t,r(Error)),t}();t.a=n},function(e,t,n){"use strict";var i=n(1),o=n(29),s=n(31),r=n(0),a=function(e){function t(e,n){var i;return p(this,t),(i=h(this,u(t).call(this))).layoutManager=e,i.element=$('<div class="lm_header"><ul class="lm_tabs"></ul><ul class="lm_controls"></ul><ul class="lm_tabdropdown_list"></ul></div>'),!0===i.layoutManager.config.settings.selectionEnabled&&(i.element.addClass("lm_selectable"),i.element.on("click touchstart",Object(r.c)(i._onHeaderClick,d(i)))),i.tabsContainer=i.element.find(".lm_tabs"),i.tabDropdownContainer=i.element.find(".lm_tabdropdown_list"),i.tabDropdownContainer.hide(),i.controlsContainer=i.element.find(".lm_controls"),i.parent=n,i.parent.on("resize",i._updateTabSizes,d(i)),i.tabs=[],i.tabsMarkedForRemoval=[],i.activeContentItem=null,i.closeButton=null,i.dockButton=null,i.tabDropdownButton=null,i.hideAdditionalTabsDropdown=Object(r.c)(i._hideAdditionalTabsDropdown,d(i)),$(document).mouseup(i.hideAdditionalTabsDropdown),i._lastVisibleTabIndex=-1,i._tabControlOffset=i.layoutManager.config.settings.tabControlOffset,i._createControls(),i}return f(t,i.b),c(t,[{key:"createTab",value:function(e,t){var n,i;for(i=0;i<this.tabs.length;i++)if(this.tabs[i].contentItem===e)return;return n=new o.a(this,e),0===this.tabs.length?(this.tabs.push(n),void this.tabsContainer.append(n.element)):(void 0===t&&(t=this.tabs.length),0<t?this.tabs[t-1].element.after(n.element):this.tabs[0].element.before(n.element),this.tabs.splice(t,0,n),void this._updateTabSizes())}},{key:"removeTab",value:function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t]._$destroy(),void this.tabs.splice(t,1);for(t=0;t<this.tabsMarkedForRemoval.length;t++)if(this.tabsMarkedForRemoval[t].contentItem===e)return this.tabsMarkedForRemoval[t]._$destroy(),void this.tabsMarkedForRemoval.splice(t,1);throw new Error("contentItem is not controlled by this header")}},{key:"hideTab",value:function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t].element.hide(),this.tabsMarkedForRemoval.push(this.tabs[t]),void this.tabs.splice(t,1);throw new Error("contentItem is not controlled by this header")}},{key:"setActiveContentItem",value:function(e){var t,n,i,o;for(t=0;t<this.tabs.length;t++)i=this.tabs[t].contentItem===e,this.tabs[t].setActive(i),!0===i&&(this.activeContentItem=e,this.parent.config.activeItemIndex=t);if(this.layoutManager.config.settings.reorderOnTabMenuClick&&-1!==this._lastVisibleTabIndex&&this.parent.config.activeItemIndex>this._lastVisibleTabIndex){for(o=this.tabs[this.parent.config.activeItemIndex],n=this.parent.config.activeItemIndex;0<n;n--)this.tabs[n]=this.tabs[n-1];this.tabs[0]=o,this.parent.config.activeItemIndex=0}this._updateTabSizes(),this.parent.emitBubblingEvent("stateChanged")}},{key:"position",value:function(e){var t=this.parent._header.show;if(this.parent._docker&&this.parent._docker.docked)throw new Error("Can't change header position in docked stack");return t&&!this.parent._side&&(t="top"),void 0!==e&&this.parent._header.show!=e&&(this.parent._header.show=e,this.parent._setupHeaderPosition()),t}},{key:"_$setClosable",value:function(e){return this._canDestroy=e||1<this.tabs.length,this.closeButton&&this._isClosable()&&(this.closeButton.element[e?"show":"hide"](),!0)}},{key:"_setDockable",value:function(e){return this.dockButton&&this.parent._header&&this.parent._header.dock&&(this.dockButton.element.toggle(!!e),!0)}},{key:"_$destroy",value:function(){this.emit("destroy",this);for(var e=0;e<this.tabs.length;e++)this.tabs[e]._$destroy();$(document).off("mouseup",this.hideAdditionalTabsDropdown),this.element.remove()}},{key:"_getHeaderSetting",value:function(e){if(e in this.parent._header)return this.parent._header[e]}},{key:"_createControls",value:function(){var e,t,n,i,o,a,l,c,h;if(h=Object(r.c)(this._showAdditionalTabsDropdown,this),c=this.layoutManager.config.labels.tabDropdown,this.tabDropdownButton=new s.a(this,c,"lm_tabdropdown",h),this.tabDropdownButton.element.hide(),this.parent._header&&this.parent._header.dock){var u=Object(r.c)(this.parent.dock,this.parent);n=this._getHeaderSetting("dock"),this.dockButton=new s.a(this,n,"lm_dock",u)}this._getHeaderSetting("popout")&&(t=Object(r.c)(this._onPopoutClick,this),n=this._getHeaderSetting("popout"),new s.a(this,n,"lm_popout",t)),this._getHeaderSetting("maximise")&&(a=Object(r.c)(this.parent.toggleMaximise,this.parent),i=this._getHeaderSetting("maximise"),o=this._getHeaderSetting("minimise"),l=new s.a(this,i,"lm_maximise",a),this.parent.on("maximised",function(){l.element.attr("title",o)}),this.parent.on("minimised",function(){l.element.attr("title",i)})),this._isClosable()&&(e=Object(r.c)(this.parent.remove,this.parent),n=this._getHeaderSetting("close"),this.closeButton=new s.a(this,n,"lm_close",e))}},{key:"_showAdditionalTabsDropdown",value:function(){this.tabDropdownContainer.show()}},{key:"_hideAdditionalTabsDropdown",value:function(){this.tabDropdownContainer.hide()}},{key:"_isClosable",value:function(){return this.parent.config.isClosable&&this.layoutManager.config.settings.showCloseIcon}},{key:"_onPopoutClick",value:function(){!0===this.layoutManager.config.settings.popoutWholeStack?this.parent.popout():this.activeContentItem.popout()}},{key:"_onHeaderClick",value:function(e){e.target===this.element[0]&&this.parent.select()}},{key:"_updateTabSizes",value:function(e){if(0!==this.tabs.length){this.tabDropdownButton.element.toggle(!0===e);var t=function(e){return e?"width":"height"};this.element.css(t(!this.parent._sided),""),this.element[t(this.parent._sided)](this.layoutManager.config.dimensions.headerHeight);var n,i,o,s,r=this.element.outerWidth()-this.controlsContainer.outerWidth()-this._tabControlOffset,a=0,l=0,c=0,h=this.layoutManager.config.settings.tabOverlapAllowance,u=!1,d=this.activeContentItem?this.tabs.indexOf(this.activeContentItem.tab):0,f=this.tabs[d];for(this.parent._sided&&(r=this.element.outerHeight()-this.controlsContainer.outerHeight()-this._tabControlOffset),this._lastVisibleTabIndex=-1,i=0;i<this.tabs.length;i++)if(n=this.tabs[i].element,this.tabsContainer.append(n),a+=n.outerWidth()+parseInt(n.css("margin-right"),10),(l=d<=i?a:a+f.element.outerWidth()+parseInt(f.element.css("margin-right"),10))>r){if(u)i===d&&(n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n));else if((c=0<d&&d<=i?(l-r)/(i-1):(l-r)/i)<h){for(o=0;o<=i;o++)s=o!==d&&0!==o?"-"+c+"px":"",this.tabs[o].element.css({"z-index":i-o,"margin-left":s});this._lastVisibleTabIndex=i,this.tabsContainer.append(n)}else u=!0;if(u&&i!==d){if(!e)return void this._updateTabSizes(!0);n.css({"z-index":"auto","margin-left":""}),this.tabDropdownContainer.append(n)}}else this._lastVisibleTabIndex=i,n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n)}}}]),t}();t.a=a},function(e,t,n){"use strict";var i=n(7),o=n(30),s=n(0);t.a=function(){function e(t,n){p(this,e),this.header=t,this.contentItem=n,this.element=$('<li class="lm_tab"><i class="lm_left"></i><span class="lm_title"></span><div class="lm_close_tab"></div><i class="lm_right"></i></li>'),this.titleElement=this.element.find(".lm_title"),this.closeElement=this.element.find(".lm_close_tab"),this.closeElement[n.config.isClosable?"show":"hide"](),this.isActive=!1,this.setTitle(n.config.title),this.contentItem.on("titleChanged",this.setTitle,this),this._layoutManager=this.contentItem.layoutManager,!0===this._layoutManager.config.settings.reorderEnabled&&!0===n.config.reorderEnabled&&(this._dragListener=new i.a(this.element),this._dragListener.on("dragStart",this._onDragStart,this),this.contentItem.on("destroy",this._dragListener.destroy,this._dragListener)),this._onTabClickFn=Object(s.c)(this._onTabClick,this),this._onCloseClickFn=Object(s.c)(this._onCloseClick,this),this.element.on("mousedown touchstart",this._onTabClickFn),this.contentItem.config.isClosable?(this.closeElement.on("click touchstart",this._onCloseClickFn),this.closeElement.on("mousedown",this._onCloseMousedown)):this.closeElement.remove(),this.contentItem.tab=this,this.contentItem.emit("tab",this),this.contentItem.layoutManager.emit("tabCreated",this),this.contentItem.isComponent&&(this.contentItem.container.tab=this,this.contentItem.container.emit("tab",this))}return c(e,[{key:"setTitle",value:function(e){this.element.attr("title",Object(s.k)(e)),this.titleElement.html(e)}},{key:"setActive",value:function(e){e===this.isActive||(this.isActive=e,e?this.element.addClass("lm_active"):this.element.removeClass("lm_active"))}},{key:"_$destroy",value:function(){this.element.off("mousedown touchstart",this._onTabClickFn),this.closeElement.off("click touchstart",this._onCloseClickFn),this._dragListener&&(this.contentItem.off("destroy",this._dragListener.destroy,this._dragListener),this._dragListener.off("dragStart",this._onDragStart),this._dragListener=null),this.element.remove()}},{key:"_onDragStart",value:function(e,t){return this.header._canDestroy?(!0===this.contentItem.parent.isMaximised&&this.contentItem.parent.toggleMaximise(),void new o.a(e,t,this._dragListener,this._layoutManager,this.contentItem,this.header.parent)):null}},{key:"_onTabClick",value:function(e){if(0===e.button||"touchstart"===e.type){var t=this.header.parent.getActiveContentItem();this.contentItem!==t&&this.header.parent.setActiveContentItem(this.contentItem)}else 1===e.button&&this.contentItem.config.isClosable&&this._onCloseClick(e)}},{key:"_onCloseClick",value:function(e){e.stopPropagation(),this.header._canDestroy&&this.header.parent.removeChild(this.contentItem)}},{key:"_onCloseMousedown",value:function(e){e.stopPropagation()}}]),e}()},function(e,t,n){"use strict";var i=n(1),o=n(0),s=function(e){function t(e,n,i,s,r,a){var l;p(this,t),(l=h(this,u(t).call(this)))._dragListener=i,l._layoutManager=s,l._contentItem=r,l._originalParent=a,l._area=null,l._lastValidArea=null,l._dragListener.on("drag",l._onDrag,d(l)),l._dragListener.on("dragStop",l._onDrop,d(l)),l.element=$('<div class="lm_dragProxy"><div class="lm_header"><ul class="lm_tabs"><li class="lm_tab lm_active"><i class="lm_left"></i><span class="lm_title"></span><i class="lm_right"></i></li></ul></div><div class="lm_content"></div></div>'),a&&a._side&&(l._sided=a._sided,l.element.addClass("lm_"+a._side),0<=["right","bottom"].indexOf(a._side)&&l.element.find(".lm_content").after(l.element.find(".lm_header"))),l.element.css({left:e,top:n}),l.element.find(".lm_tab").attr("title",Object(o.k)(l._contentItem.config.title)),l.element.find(".lm_title").html(l._contentItem.config.title),l.childElementContainer=l.element.find(".lm_content"),l.childElementContainer.append(r.element),l._undisplayTree(),l._layoutManager._$calculateItemAreas(),l._setDimensions(),$(document.body).append(l.element);var c=l._layoutManager.container.offset();return l._minX=c.left,l._minY=c.top,l._maxX=l._layoutManager.container.width()+l._minX,l._maxY=l._layoutManager.container.height()+l._minY,l._width=l.element.width(),l._height=l.element.height(),l._setDropPosition(e,n),l}return f(t,i.b),c(t,[{key:"_onDrag",value:function(e,t,n){var i=(n=Object(o.e)(n)).pageX,s=n.pageY;(i>this._minX&&i<this._maxX&&s>this._minY&&s<this._maxY||!0!==this._layoutManager.config.settings.constrainDragToContainer)&&this._setDropPosition(i,s)}},{key:"_setDropPosition",value:function(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))}},{key:"_onDrop",value:function(){this._updateTree(),this._layoutManager.dropTargetIndicator.hide(),null===this._area?null===this._lastValidArea?this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy():this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._area.contentItem._$onDrop(this._contentItem,this._area),this.element.remove(),this._layoutManager.emit("itemDropped",this._contentItem)}},{key:"_undisplayTree",value:function(){this._contentItem.parent&&this._contentItem.parent.undisplayChild(this._contentItem)}},{key:"_updateTree",value:function(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(this)}},{key:"_setDimensions",value:function(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,n=e.dragProxyHeight;this.element.width(t),this.element.height(n),t-=this._sided?e.headerHeight:0,n-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(n),this._contentItem.element.width(t),this._contentItem.element.height(n),this._contentItem.callDownwards("_$show"),this._contentItem.callDownwards("setSize")}}]),t}();t.a=s},function(e,t){"use strict";t.a=function(){function e(t,n,i,o){p(this,e),this._header=t,this.element=$('<li class="'+i+'" title="'+n+'"></li>'),this._header.on("destroy",this._$destroy,this),this._action=o,this.element.on("click touchstart",this._action),this._header.controlsContainer.append(this.element)}return c(e,[{key:"_$destroy",value:function(){this.element.off(),this.element.remove()}}]),e}()},function(e,t,n){"use strict";var i=n(3),o=n(33),s=function(e){function t(e,n,i){var s;p(this,t),s=h(this,u(t).call(this,e,n,i));var r=e.getComponent(s.config.componentName),a=$.extend(!0,{},s.config.componentState||{});return a.componentName=s.config.componentName,s.componentName=s.config.componentName,""===s.config.title&&(s.config.title=s.config.componentName),s.isComponent=!0,s.container=new o.a(s.config,d(s),e),s.instance=new r(s.container,a),s.element=s.container._element,s}return f(t,i.a),c(t,[{key:"close",value:function(){this.parent.removeChild(this)}},{key:"setSize",value:function(){"none"!==this.element.css("display")&&this.container._$setSize(this.element.width(),this.element.height())}},{key:"_$init",value:function(){i.a.prototype._$init.call(this),this.container.emit("open")}},{key:"_$hide",value:function(){this.container.hide(),i.a.prototype._$hide.call(this)}},{key:"_$show",value:function(){this.container.show(),i.a.prototype._$show.call(this)}},{key:"_$shown",value:function(){this.container.shown(),i.a.prototype._$shown.call(this)}},{key:"_$destroy",value:function(){this.container.emit("destroy",this),i.a.prototype._$destroy.call(this)}},{key:"_$getArea",value:function(){return null}}]),t}();t.a=s},function(e,t,n){"use strict";var i=n(1),o=function(e){function t(e,n,i){var o;return p(this,t),(o=h(this,u(t).call(this))).width=null,o.height=null,o.title=e.componentName,o.parent=n,o.layoutManager=i,o.isHidden=!1,o._config=e,o._element=$('<div class="lm_item_container"><div class="lm_content"></div></div>'),o._contentElement=o._element.find(".lm_content"),o}return f(t,i.b),c(t,[{key:"getElement",value:function(){return this._contentElement}},{key:"hide",value:function(){this.emit("hide"),this.isHidden=!0,this._element.hide()}},{key:"show",value:function(){this.emit("show"),this.isHidden=!1,this._element.show(),(0!=this.height||0!=this.width)&&this.emit("shown")}},{key:"setSize",value:function(e,t){for(var n,i,o,s,r=this.parent,a=this;!r.isColumn&&!r.isRow;)if(a=r,(r=r.parent).isRoot)return!1;for(n=("height"===(i=r.isColumn?"height":"width")?t:e)/(this[i]*(1/(a.config[i]/100)))*100,o=(a.config[i]-n)/(r.contentItems.length-1),s=0;s<r.contentItems.length;s++)r.contentItems[s]===a?r.contentItems[s].config[i]=n:r.contentItems[s].config[i]+=o;return r.callDownwards("setSize"),!0}},{key:"close",value:function(){this._config.isClosable&&(this.emit("close"),this.parent.close())}},{key:"getState",value:function(){return this._config.componentState}},{key:"extendState",value:function(e){this.setState($.extend(!0,this.getState(),e))}},{key:"setState",value:function(e){this._config.componentState=e,this.parent.emitBubblingEvent("stateChanged")}},{key:"setTitle",value:function(e){this.parent.setTitle(e)}},{key:"_$setSize",value:function(e,t){(e!==this.width||t!==this.height)&&(this.width=e,this.height=t,$.zepto?this._contentElement.width(e):this._contentElement.outerWidth(e),$.zepto?this._contentElement.height(t):this._contentElement.outerHeight(t),this.emit("resize"))}}]),t}();t.a=o},function(e,n,i){"use strict";var o=i(68),s=i.n(o),r=i(1),a=i(11),l=i(0),d=function(e){function n(e,t,i,o,s){var r;return p(this,n),(r=h(this,u(n).call(this))).isInitialised=!1,r._config=e,r._dimensions=t,r._parentId=i,r._indexInParent=o,r._layoutManager=s,r._popoutWindow=null,r._id=null,r._createWindow(),r}return f(n,r.b),c(n,[{key:"toConfig",value:function(){if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");return{dimensions:{width:this.getGlInstance().width,height:this.getGlInstance().height,left:this._popoutWindow.screenX||this._popoutWindow.screenLeft,top:this._popoutWindow.screenY||this._popoutWindow.screenTop},content:this.getGlInstance().toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}}},{key:"getGlInstance",value:function(){return this._popoutWindow.__glInstance}},{key:"getWindow",value:function(){return this._popoutWindow}},{key:"close",value:function(){if(this.getGlInstance())this.getGlInstance()._$closeWindow();else try{this.getWindow().close()}catch(e){}}},{key:"popIn",value:function(){var e,t;this._indexInParent;this._parentId&&(e=$.extend(!0,{},this.getGlInstance().toConfig()).content[0],!(t=this._layoutManager.root.getItemsById(this._parentId)[0])&&(t=0<this._layoutManager.root.contentItems.length?this._layoutManager.root.contentItems[0]:this._layoutManager.root)),t.addChild(e,this._indexInParent),this.close()}},{key:"_createWindow",value:function(){var e,n=this._createUrl(),i=t(1e6*Math.random()).toString(36),o=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=window.open(n,i,o),this._popoutWindow)$(this._popoutWindow).on("load",Object(l.c)(this._positionWindow,this)).on("unload beforeunload",Object(l.c)(this._onClose,this)),e=setInterval(Object(l.c)(function(){this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),clearInterval(e))},this),10);else if(!0===this._layoutManager.config.settings.blockedPopoutsThrowError){var s=new Error("Popout blocked");throw s.type="popoutBlocked",s}}},{key:"_serializeWindowOptions",value:function(e){var t,n=[];for(t in e)n.push(t+"="+e[t]);return n.join(",")}},{key:"_createUrl",value:function(){var e,t={content:this._config},n="gl-window-config-"+Object(l.f)();t=(new a.a).minifyConfig(t);try{localStorage.setItem(n,s()(t))}catch(t){throw new Error("Error while writing to localStorage "+t.toString())}return 1===(e=document.location.href.split("?")).length?e[0]+"?gl-window="+n:document.location.href+"&gl-window="+n}},{key:"_positionWindow",value:function(){this._popoutWindow.moveTo(this._dimensions.left,this._dimensions.top),this._popoutWindow.focus()}},{key:"_onInitialised",value:function(){this.isInitialised=!0,this.getGlInstance().on("popIn",this.popIn,this),this.emit("initialised")}},{key:"_onClose",value:function(){setTimeout(Object(l.c)(this.emit,this,["closed"]),50)}}]),n}();n.a=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),o=(n.n(i),n(37)),s=(n.n(o),n(38)),r=(n.n(s),n(39));n.d(t,"default",function(){return r.a});var a=n(33);n.d(t,"ItemContainer",function(){return a.a});var l=n(34);n.d(t,"BrowserPopout",function(){return l.a});var c=n(28);n.d(t,"Header",function(){return c.a});var h=n(31);n.d(t,"HeaderButton",function(){return h.a});var u=n(29);n.d(t,"Tab",function(){return u.a});var d=n(32);n.d(t,"Component",function(){return d.a});var f=n(12);n.d(t,"Root",function(){return f.a});var m=n(6);n.d(t,"RowOrColumn",function(){return m.a});var p=n(13);n.d(t,"Stack",function(){return p.a});var g=n(26);n.d(t,"BubblingEvent",function(){return g.a});var y=n(11);n.d(t,"ConfigMinifier",function(){return y.a});var v=n(7);n.d(t,"DragListener",function(){return v.a});var _=n(1);n.d(t,"EventEmitter",function(){return _.b});var b=n(25);n.d(t,"EventHub",function(){return b.a});var w=n(24);n.d(t,"ReactComponentHandler",function(){return w.a}),{}.ES6&&(n(74),n(77))},function(){},function(){},function(){},function(e,i,o){"use strict";var s=o(1),r=o(24),a=o(11),l=o(25),m=o(12),y=o(6),v=o(13),_=o(32),b=o(3),w=o(34),x=o(70),k=o(71),I=o(72),C=o(27),S=o(73),E=o(0),j=function(e){function i(e,t){var n;if(p(this,i),!$){throw'Please either expose $ on GoldenLayout\'s scope (e.g. window) or add "jquery" to ',"your paths when using RequireJS/AMD",new Error('jQuery is missing as dependency for GoldenLayout. Please either expose $ on GoldenLayout\'s scope (e.g. window) or add "jquery" to your paths when using RequireJS/AMD')}return(n=h(this,u(i).call(this))).isInitialised=!1,n._isFullPage=!1,n._resizeTimeoutId=null,n._components={"lm-react-component":r.a},n._itemAreas=[],n._resizeFunction=Object(E.c)(n._onResize,d(n)),n._unloadFunction=Object(E.c)(n._onUnload,d(n)),n._maximisedItem=null,n._maximisePlaceholder=$('<div class="lm_maximise_place"></div>'),n._creationTimeoutPassed=!1,n._subWindowsCreated=!1,n._dragSources=[],n._updatingColumnsResponsive=!1,n._firstLoad=!0,n.width=null,n.height=null,n.root=null,n.openPopouts=[],n.selectedItem=null,n.isSubWindow=!1,n.eventHub=new l.a(d(n)),n.config=n._createConfig(e),n.container=t,n.dropTargetIndicator=null,n.transitionIndicator=null,n.tabDropPlaceholder=$('<div class="lm_drop_tab_placeholder"></div>'),!0===n.isSubWindow&&$("body").css("visibility","hidden"),n._typeToItem={column:Object(E.c)(y.a,d(n),[!0]),row:Object(E.c)(y.a,d(n),[!1]),stack:v.a,component:_.a},n}return f(i,s.b),c(i,[{key:"minifyConfig",value:function(e){return(new a.a).minifyConfig(e)}},{key:"unminifyConfig",value:function(e){return(new a.a).unminifyConfig(e)}},{key:"registerComponent",value:function(e,t){if("function"!=typeof t)throw new Error("Please register a constructor function");if(void 0!==this._components[e])throw new Error("Component "+e+" is already registered");this._components[e]=t}},{key:"toConfig",value:function(e){var t,n,i;if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");if(e&&!(e instanceof b.a))throw new Error("Root must be a ContentItem");for((t={settings:Object(E.b)({},this.config.settings),dimensions:Object(E.b)({},this.config.dimensions),labels:Object(E.b)({},this.config.labels)}).content=[],(n=function(e,t){var i,o;for(i in t.config)"content"!==i&&(e[i]=t.config[i]);if(t.contentItems.length)for(e.content=[],o=0;o<t.contentItems.length;o++)e.content[o]={},n(e.content[o],t.contentItems[o])})(t,e?{contentItems:[e]}:this.root),this._$reconcilePopoutWindows(),t.openPopouts=[],i=0;i<this.openPopouts.length;i++)t.openPopouts.push(this.openPopouts[i].toConfig());return t.maximisedItemId=this._maximisedItem?"__glMaximised":null,t}},{key:"getComponent",value:function(e){if(void 0===this._components[e])throw new C.a('Unknown component "'+e+'"');return this._components[e]}},{key:"init",value:function(){return!1===this._subWindowsCreated&&(this._createSubWindows(),this._subWindowsCreated=!0),"loading"===document.readyState||null===document.body?void $(document).ready(Object(E.c)(this.init,this)):!0===this.isSubWindow&&!1===this._creationTimeoutPassed?(setTimeout(Object(E.c)(this.init,this),7),void(this._creationTimeoutPassed=!0)):(!0===this.isSubWindow&&this._adjustToWindowMode(),this._setContainer(),this.dropTargetIndicator=new k.a(this.container),this.transitionIndicator=new I.a,this.updateSize(),this._create(this.config),this._bindEvents(),this.isInitialised=!0,this._adjustColumnsResponsive(),void this.emit("initialised"))}},{key:"updateSize",value:function(e,t){2===arguments.length?(this.width=e,this.height=t):(this.width=this.container.width(),this.height=this.container.height()),!0===this.isInitialised&&(this.root.callDownwards("setSize",[this.width,this.height]),this._maximisedItem&&(this._maximisedItem.element.width(this.container.width()),this._maximisedItem.element.height(this.container.height()),this._maximisedItem.callDownwards("setSize")),this._adjustColumnsResponsive())}},{key:"destroy",value:function(){!1===this.isInitialised||(this._onUnload(),$(window).off("resize",this._resizeFunction),$(window).off("unload beforeunload",this._unloadFunction),this.root.callDownwards("_$destroy",[],!0),this.root.contentItems=[],this.tabDropPlaceholder.remove(),this.dropTargetIndicator.destroy(),this.transitionIndicator.destroy(),this.eventHub.destroy(),this._dragSources.forEach(function(e){e._dragListener.destroy(),e._element=null,e._itemConfig=null,e._dragListener=null}),this._dragSources=[])}},{key:"createContentItem",value:function(e,t){var n;if("string"!=typeof e.type)throw new C.a("Missing parameter 'type'",e);if("react-component"===e.type&&(e.type="component",e.componentName="lm-react-component"),!this._typeToItem[e.type])throw n="Unknown type '"+e.type+"'. Valid types are "+Object(E.j)(this._typeToItem).join(","),new C.a(n);return"component"!==e.type||t instanceof v.a||!t||!0===this.isSubWindow&&t instanceof m.a||(e={type:"stack",width:e.width,height:e.height,content:[e]}),new this._typeToItem[e.type](this,e,t)}},{key:"createPopout",value:function(e,t,n,i){var o,s,r,a,l,c,h=e,u=e instanceof b.a,d=this;if(n=n||null,u){for(h=this.toConfig(e).content,n=Object(E.f)(),a=e.parent,l=e;1===a.contentItems.length&&!a.isRoot;)a=a.parent,l=l.parent;a.addId(n),isNaN(i)&&(i=Object(E.g)(l,a.contentItems))}else h instanceof Array||(h=[h]);return!t&&u&&(o=window.screenX||window.screenLeft,s=window.screenY||window.screenTop,t={left:o+(r=e.element.offset()).left,top:s+r.top,width:e.element.width(),height:e.element.height()}),t||u||(t={left:window.screenX||window.screenLeft+20,top:window.screenY||window.screenTop+20,width:500,height:309}),u&&e.remove(),(c=new w.a(h,t,n,i,this)).on("initialised",function(){d.emit("windowOpened",c)}),c.on("closed",function(){d._$reconcilePopoutWindows()}),this.openPopouts.push(c),c}},{key:"createDragSource",value:function(e,t){this.config.settings.constrainDragToContainer=!1;var n=new x.a($(e),t,this);return this._dragSources.push(n),n}},{key:"selectItem",value:function(e,t){if(!0!==this.config.settings.selectionEnabled)throw new Error("Please set selectionEnabled to true to use this feature");e===this.selectedItem||(null!==this.selectedItem&&this.selectedItem.deselect(),e&&!0!==t&&e.select(),this.selectedItem=e,this.emit("selectionChanged",e))}},{key:"_$maximiseItem",value:function(e){null!==this._maximisedItem&&this._$minimiseItem(this._maximisedItem),this._maximisedItem=e,this._maximisedItem.addId("__glMaximised"),e.element.addClass("lm_maximised"),e.element.after(this._maximisePlaceholder),this.root.element.prepend(e.element),e.element.width(this.container.width()),e.element.height(this.container.height()),e.callDownwards("setSize"),this._maximisedItem.emit("maximised"),this.emit("stateChanged")}},{key:"_$minimiseItem",value:function(e){e.element.removeClass("lm_maximised"),e.removeId("__glMaximised"),this._maximisePlaceholder.after(e.element),this._maximisePlaceholder.remove(),e.parent.callDownwards("setSize"),this._maximisedItem=null,e.emit("minimised"),this.emit("stateChanged")}},{key:"_$closeWindow",value:function(){window.setTimeout(function(){window.close()},1)}},{key:"_$getArea",value:function(e,t){var n,i,o=1/0,s=null;for(n=0;n<this._itemAreas.length;n++)e>(i=this._itemAreas[n]).x1&&e<i.x2&&t>i.y1&&t<i.y2&&o>i.surface&&(o=i.surface,s=i);return s}},{key:"_$createRootItemAreas",value:function(){var e={y2:0,x2:0,y1:"y2",x1:"x2"};for(var t in e){var n=this.root._$getArea();n.side=t,n[t]=e[t]?n[e[t]]-50:50,n.surface=(n.x2-n.x1)*(n.y2-n.y1),this._itemAreas.push(n)}}},{key:"_$calculateItemAreas",value:function(){var e,t,n=this._getAllContentItems();if(this._itemAreas=[],1!==n.length){for(this._$createRootItemAreas(),e=0;e<n.length;e++)if(n[e].isStack){if(null===(t=n[e]._$getArea()))continue;if(t instanceof Array)this._itemAreas=this._itemAreas.concat(t);else{this._itemAreas.push(t);var i={};Object(E.b)(i,t),Object(E.b)(i,t.contentItem._contentAreaDimensions.header.highlightArea),i.surface=(i.x2-i.x1)*(i.y2-i.y1),this._itemAreas.push(i)}}}else this._itemAreas.push(this.root._$getArea())}},{key:"_$normalizeContentItem",value:function(e,t){if(!e)throw new Error("No content item defined");if(Object(E.h)(e)&&(e=e()),e instanceof b.a)return e;if($.isPlainObject(e)&&e.type){var n=this.createContentItem(e,t);return n.callDownwards("_$init"),n}throw new Error("Invalid contentItem")}},{key:"_$reconcilePopoutWindows",value:function(){var e,t=[];for(e=0;e<this.openPopouts.length;e++)!1===this.openPopouts[e].getWindow().closed?t.push(this.openPopouts[e]):this.emit("windowClosed",this.openPopouts[e]);this.openPopouts.length!==t.length&&(this.emit("stateChanged"),this.openPopouts=t)}},{key:"_getAllContentItems",value:function(){var e=[];return function t(n){if(e.push(n),n.contentItems instanceof Array)for(var i=0;i<n.contentItems.length;i++)t(n.contentItems[i])}(this.root),e}},{key:"_bindEvents",value:function(){this._isFullPage&&$(window).resize(this._resizeFunction),$(window).on("unload beforeunload",this._unloadFunction)}},{key:"_onResize",value:function(){clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout(Object(E.c)(this.updateSize,this),100)}},{key:"_createConfig",value:function(e){var t=Object(E.d)("gl-window");t&&(this.isSubWindow=!0,e=localStorage.getItem(t),e=JSON.parse(e),e=(new a.a).unminifyConfig(e),localStorage.removeItem(t));return function e(t){for(var n in t)"props"!=n&&"object"==g(t[n])?e(t[n]):"type"==n&&"react-component"===t[n]&&(t.type="component",t.componentName="lm-react-component")}(e=$.extend(!0,{},S.a,e)),!1===e.settings.hasHeaders&&(e.dimensions.headerHeight=0),e}},{key:"_adjustToWindowMode",value:function(){var e=$('<div class="lm_popin" title="'+this.config.labels.popin+'"><div class="lm_icon"></div><div class="lm_bg"></div></div>');e.click(Object(E.c)(function(){this.emit("popIn")},this)),document.title=Object(E.k)(this.config.content[0].title),$("head").append($("body link, body style, template, .gl_keep")),this.container=$("body").html("").css("visibility","visible").append(e),document.body.offsetHeight,window.__glInstance=this}},{key:"_createSubWindows",value:function(){var e,t;for(e=0;e<this.config.openPopouts.length;e++)t=this.config.openPopouts[e],this.createPopout(t.content,t.dimensions,t.parentId,t.indexInParent)}},{key:"_setContainer",value:function(){var e=$(this.container||"body");if(0===e.length)throw new Error("GoldenLayout container not found");if(1<e.length)throw new Error("GoldenLayout more than one container element specified");e[0]===document.body&&(this._isFullPage=!0,$("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"})),this.container=e}},{key:"_create",value:function(e){var t;if(!(e.content instanceof Array))throw t=void 0===e.content?"Missing setting 'content' on top level of configuration":"Configuration parameter 'content' must be an array",new C.a(t,e);if(1<e.content.length)throw t="Top level content can't contain more then one element.",new C.a(t,e);this.root=new m.a(this,{content:e.content},this.container),this.root.callDownwards("_$init"),"__glMaximised"===e.maximisedItemId&&this.root.getItemsById(e.maximisedItemId)[0].toggleMaximise()}},{key:"_onUnload",value:function(){if(!0===this.config.settings.closePopoutsOnUnload)for(var e=0;e<this.openPopouts.length;e++)this.openPopouts[e].close()}},{key:"_adjustColumnsResponsive",value:function(){if(this._useResponsiveLayout()&&!this._updatingColumnsResponsive&&this.config.dimensions&&this.config.dimensions.minItemWidth&&0!==this.root.contentItems.length&&this.root.contentItems[0].isRow){this._firstLoad=!1;var e=this.root.contentItems[0].contentItems.length;if(!(1>=e)){var i=this.config.dimensions.minItemWidth;if(!(e*i<=this.width)){this._updatingColumnsResponsive=!0;for(var o,s=n(t(this.width/i),1),r=this.root.contentItems[0],a=this._findAllStackContainers()[0],l=0;l<e-s;l++)o=r.contentItems[r.contentItems.length-1],this._addChildContentItemsToContainer(a,o);this._updatingColumnsResponsive=!1}}}else this._firstLoad=!1}},{key:"_useResponsiveLayout",value:function(){return this.config.settings&&("always"==this.config.settings.responsiveMode||"onload"==this.config.settings.responsiveMode&&this._firstLoad)}},{key:"_addChildContentItemsToContainer",value:function(e,t){"stack"===t.type?t.contentItems.forEach(function(n){e.addChild(n),t.removeChild(n,!0)}):t.contentItems.forEach(Object(E.c)(function(t){this._addChildContentItemsToContainer(e,t)},this))}},{key:"_findAllStackContainers",value:function(){var e=[];return this._findAllStackContainersRecursive(e,this.root),e}},{key:"_findAllStackContainersRecursive",value:function(e,t){t.contentItems.forEach(Object(E.c)(function(t){"stack"==t.type?e.push(t):!t.isComponent&&this._findAllStackContainersRecursive(e,t)},this))}}]),i}();i.a=j},function(e,t,n){e.exports={default:n(41),__esModule:!0}},function(e,t,n){n(42),e.exports=n(2).Object.keys},function(e,t,n){var i=n(43),o=n(15);n(53)("keys",function(){return function(e){return o(i(e))}})},function(e,t,n){var i=n(14);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(16),o=n(17),s=n(47)(!1),r=n(19)("IE_PROTO");e.exports=function(e,t){var n,a=o(e),l=0,c=[];for(n in a)n!=r&&i(a,n)&&c.push(n);for(;t.length>l;)i(a,n=t[l++])&&(~s(c,n)||c.push(n));return c}},function(e,t,n){var i=n(46);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},function(e,t,n){var i=n(17),o=n(48),s=n(49);e.exports=function(e){return function(t,n,r){var a,l=i(t),c=o(l.length),h=s(r,c);if(e&&n!=n){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===n)return e||h||0;return!e&&-1}}},function(t,n,i){var o=i(18);t.exports=function(t){return 0<t?e(o(t),9007199254740991):0}},function(t,i,o){var s=o(18);t.exports=function(t,i){return 0>(t=s(t))?n(t+i,0):e(t,i)}},function(e,t,n){var i=n(2),o=n(4),s="__core-js_shared__",r=o[s]||(o[s]={});(e.exports=function(e,t){return r[e]||(r[e]=void 0===t?{}:t)})("versions",[]).push({version:i.version,mode:n(51)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e){e.exports=!0},function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},function(e,t,n){var i=n(21),o=n(2),s=n(10);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],r={};r[e]=t(n),i(i.S+i.F*s(function(){n(1)}),"Object",r)}},function(e,t,n){var i=n(55);e.exports=function(e,t,n){return i(e),void 0===t?e:1===n?function(n){return e.call(t,n)}:2===n?function(n,i){return e.call(t,n,i)}:3===n?function(n,i,o){return e.call(t,n,i,o)}:function(){return e.apply(t,arguments)}}},function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var i=n(22),o=n(59);e.exports=n(5)?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(5)&&!n(10)(function(){return 7!=Object.defineProperty(n(23)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(9);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports={default:n(61),__esModule:!0}},function(e,t,n){n(62);var i=n(2).Object;e.exports=function(e,t){return i.create(e,t)}},function(e,t,n){var i=n(21);i(i.S,"Object",{create:n(63)})},function(e,t,n){var i=n(8),o=n(64),s=n(20),r=n(19)("IE_PROTO"),a=function(){},l="prototype",c=function(){var e,t=n(23)("iframe"),i=s.length;for(t.style.display="none",n(65).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;i--;)delete c[l][s[i]];return c()};e.exports=Object.create||function(e,t){var n;return null===e?n=c():(a[l]=i(e),n=new a,a[l]=null,n[r]=e),void 0===t?n:o(n,t)}},function(e,t,n){var i=n(22),o=n(8),s=n(15);e.exports=n(5)?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),a=r.length,l=0;a>l;)i.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var i=n(4).document;e.exports=i&&i.documentElement},function(e,t){"use strict";t.a={isClosable:!0,reorderEnabled:!0,title:""}},function(e,t,n){"use strict";var i=n(7);t.a=function(){function e(t,n,o){p(this,e),this._isVertical=t,this._size=n,this._grabSize=o<n?n:o,this.element=this._createElement(),this._dragListener=new i.a(this.element)}return c(e,[{key:"on",value:function(e,t,n){this._dragListener.on(e,t,n)}},{key:"_$destroy",value:function(){this.element.remove()}},{key:"_createElement",value:function(){var e=$('<div class="lm_drag_handle"></div>'),t=$('<div class="lm_splitter"></div>');t.append(e);var n=this._grabSize-this._size,i=n/2;return this._isVertical?(e.css("top",-i),e.css("height",this._size+n),t.addClass("lm_vertical"),t.height(this._size)):(e.css("left",-i),e.css("width",this._size+n),t.addClass("lm_horizontal"),t.width(this._size)),t}}]),e}()},function(e,t,n){e.exports={default:n(69),__esModule:!0}},function(e,t,n){var i=n(2),o=i.JSON||(i.JSON={stringify:JSON.stringify});e.exports=function(){return o.stringify.apply(o,arguments)}},function(e,t,n){"use strict";var i=n(7),o=n(30),s=n(0);t.a=function(){function e(t,n,i){p(this,e),this._element=t,this._itemConfig=n,this._layoutManager=i,this._dragListener=null,this._createDragListener()}return c(e,[{key:"_createDragListener",value:function(){null!==this._dragListener&&this._dragListener.destroy(),this._dragListener=new i.a(this._element),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._createDragListener,this)}},{key:"_onDragStart",value:function(e,t){var n=this._itemConfig;Object(s.h)(n)&&(n=n());var i=this._layoutManager._$normalizeContentItem($.extend(!0,{},n)),r=new o.a(e,t,this._dragListener,this._layoutManager,i,null);this._layoutManager.transitionIndicator.transitionElements(this._element,r.element)}}]),e}()},function(e,t){"use strict";t.a=function(){function e(){p(this,e),this.element=$('<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>'),$(document.body).append(this.element)}return c(e,[{key:"destroy",value:function(){this.element.remove()}},{key:"highlight",value:function(e,t,n,i){this.highlightArea({x1:e,y1:t,x2:n,y2:i})}},{key:"highlightArea",value:function(e){this.element.css({left:e.x1,top:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}).show()}},{key:"hide",value:function(){this.element.hide()}}]),e}()},function(e,t,n){"use strict";var i=n(0);t.a=function(){function e(){p(this,e),this._element=$('<div class="lm_transition_indicator"></div>'),$(document.body).append(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null}return c(e,[{key:"destroy",value:function(){this._element.remove()}},{key:"transitionElements",value:function(){}},{key:"_nextAnimationFrame",value:function(){var e,t=this._measure(this._toElement),n=(Object(i.i)()-this._animationStartTime)/this._totalAnimationDuration,o={};if(1<=n)this._element.hide();else{for(e in t.opacity=0,this._fromDimensions)o[e]=this._fromDimensions[e]+(t[e]-this._fromDimensions[e])*n;this._element.css(o),Object(i.a)(Object(i.c)(this._nextAnimationFrame,this))}}},{key:"_measure",value:function(e){var t=e.offset();return{left:t.left,top:t.top,width:e.outerWidth(),height:e.outerHeight()}}}]),e}()},function(e,t){"use strict";t.a={openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:"onload",tabOverlapAllowance:0,reorderOnTabMenuClick:!0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:15,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:"close",maximise:"maximise",minimise:"minimise",popout:"open in new window",popin:"pop in",tabDropdown:"additional tabs"}}},function(e,t,n){n(75)(n(76))},function(e){e.exports=function(e){function t(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"==typeof eval?t("EvalError: No eval function available"):eval.call(null,e)}catch(e){t(e)}}},function(e){e.exports="/* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */\n(function(global, factory) {\n if (typeof define === 'function' && define.amd)\n define(function() { return factory(global) })\n else\n factory(global)\n}(this, function(window) {\n var Zepto = (function() {\n var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {}, classCache = {},\n cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n\n adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table, 'thead': table, 'tfoot': table,\n 'td': tableRow, 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize, uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray ||\n function(object){ return object instanceof Array }\n\n zepto.matches = function(element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false\n var matchesSelector = element.matches || element.webkitMatchesSelector ||\n element.mozMatchesSelector || element.oMatchesSelector ||\n element.matchesSelector\n if (matchesSelector) return matchesSelector.call(element, selector)\n // fall back to performing a selector:\n var match, parent = element.parentNode, temp = !parent\n if (temp) (parent = tempParent).appendChild(element)\n match = ~zepto.qsa(parent, selector).indexOf(element)\n temp && tempParent.removeChild(element)\n return match\n }\n\n function type(obj) {\n return obj == null ? String(obj) :\n class2type[toString.call(obj)] || \"object\"\n }\n\n function isFunction(value) { return type(value) == \"function\" }\n function isWindow(obj) { return obj != null && obj == obj.window }\n function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }\n function isObject(obj) { return type(obj) == \"object\" }\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj)\n\n return 'function' != type && !isWindow(obj) && (\n 'array' == type || length === 0 ||\n (typeof length == 'number' && length > 0 && (length - 1) in obj)\n )\n }\n\n function compact(array) { return filter.call(array, function(item){ return item != null }) }\n function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }\n camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }\n function dasherize(str) {\n return str.replace(/::/g, '/')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')\n .replace(/([a-z\\d])([A-Z])/g, '$1_$2')\n .replace(/_/g, '-')\n .toLowerCase()\n }\n uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }\n\n function classRE(name) {\n return name in classCache ?\n classCache[name] : (classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)'))\n }\n\n function maybeAddPx(name, value) {\n return (typeof value == \"number\" && !cssNumber[dasherize(name)]) ? value + \"px\" : value\n }\n\n function defaultDisplay(nodeName) {\n var element, display\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName)\n document.body.appendChild(element)\n display = getComputedStyle(element, '').getPropertyValue(\"display\")\n element.parentNode.removeChild(element)\n display == \"none\" && (display = \"block\")\n elementDisplay[nodeName] = display\n }\n return elementDisplay[nodeName]\n }\n\n function children(element) {\n return 'children' in element ?\n slice.call(element.children) :\n $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })\n }\n\n function Z(dom, selector) {\n var i, len = dom ? dom.length : 0\n for (i = 0; i < len; i++) this[i] = dom[i]\n this.length = len\n this.selector = selector || ''\n }\n\n // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n zepto.fragment = function(html, name, properties) {\n var dom, nodes, container\n\n // A special case optimization for a single tag\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1></$2>\")\n if (name === undefined) name = fragmentRE.test(html) && RegExp.$1\n if (!(name in containers)) name = '*'\n\n container = containers[name]\n container.innerHTML = '' + html\n dom = $.each(slice.call(container.childNodes), function(){\n container.removeChild(this)\n })\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom)\n $.each(properties, function(key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value)\n else nodes.attr(key, value)\n })\n }\n\n return dom\n }\n\n // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n zepto.Z = function(dom, selector) {\n return new Z(dom, selector)\n }\n\n // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n zepto.isZ = function(object) {\n return object instanceof zepto.Z\n }\n\n // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n zepto.init = function(selector, context) {\n var dom\n // If nothing given, return an empty Zepto collection\n if (!selector) return zepto.Z()\n // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim()\n // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n if (selector[0] == '<' && fragmentRE.test(selector))\n dom = zepto.fragment(selector, RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector)\n // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector\n else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector)\n // Wrap DOM nodes.\n else if (isObject(selector))\n dom = [selector], selector = null\n // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector))\n dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null\n // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined) return $(context).find(selector)\n // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector)\n }\n // create a new Zepto collection from the nodes found\n return zepto.Z(dom, selector)\n }\n\n // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n $ = function(selector, context){\n return zepto.init(selector, context)\n }\n\n function extend(target, source, deep) {\n for (key in source)\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key]))\n target[key] = {}\n if (isArray(source[key]) && !isArray(target[key]))\n target[key] = []\n extend(target[key], source[key], deep)\n }\n else if (source[key] !== undefined) target[key] = source[key]\n }\n\n // Copy all but undefined properties from one or more\n // objects to the `target` object.\n $.extend = function(target){\n var deep, args = slice.call(arguments, 1)\n if (typeof target == 'boolean') {\n deep = target\n target = args.shift()\n }\n args.forEach(function(arg){ extend(target, arg, deep) })\n return target\n }\n\n // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n zepto.qsa = function(element, selector){\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly)\n return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById\n ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :\n (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :\n slice.call(\n isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n )\n }\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector)\n }\n\n $.contains = document.documentElement.contains ?\n function(parent, node) {\n return parent !== node && parent.contains(node)\n } :\n function(parent, node) {\n while (node && (node = node.parentNode))\n if (node === parent) return true\n return false\n }\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value)\n }\n\n // access className property while respecting SVGAnimatedString\n function className(node, value){\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined\n\n if (value === undefined) return svg ? klass.baseVal : klass\n svg ? (klass.baseVal = value) : (node.className = value)\n }\n\n // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n function deserializeValue(value) {\n try {\n return value ?\n value == \"true\" ||\n ( value == \"false\" ? false :\n value == \"null\" ? null :\n +value + \"\" == value ? +value :\n /^[\\[\\{]/.test(value) ? $.parseJSON(value) :\n value )\n : value\n } catch(e) {\n return value\n }\n }\n\n $.type = type\n $.isFunction = isFunction\n $.isWindow = isWindow\n $.isArray = isArray\n $.isPlainObject = isPlainObject\n\n $.isEmptyObject = function(obj) {\n var name\n for (name in obj) return false\n return true\n }\n\n $.isNumeric = function(val) {\n var num = Number(val), type = typeof val\n return val != null && type != 'boolean' &&\n (type != 'string' || val.length) &&\n !isNaN(num) && isFinite(num) || false\n }\n\n $.inArray = function(elem, array, i){\n return emptyArray.indexOf.call(array, elem, i)\n }\n\n $.camelCase = camelize\n $.trim = function(str) {\n return str == null ? \"\" : String.prototype.trim.call(str)\n }\n\n // plugin compatibility\n $.uuid = 0\n $.support = { }\n $.expr = { }\n $.noop = function() {}\n\n $.map = function(elements, callback){\n var value, values = [], i, key\n if (likeArray(elements))\n for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i)\n if (value != null) values.push(value)\n }\n else\n for (key in elements) {\n value = callback(elements[key], key)\n if (value != null) values.push(value)\n }\n return flatten(values)\n }\n\n $.each = function(elements, callback){\n var i, key\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++)\n if (callback.call(elements[i], i, elements[i]) === false) return elements\n } else {\n for (key in elements)\n if (callback.call(elements[key], key, elements[key]) === false) return elements\n }\n\n return elements\n }\n\n $.grep = function(elements, callback){\n return filter.call(elements, callback)\n }\n\n if (window.JSON) $.parseJSON = JSON.parse\n\n // Populate the class2type map\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n class2type[ \"[object \" + name + \"]\" ] = name.toLowerCase()\n })\n\n // Define methods that will be available on all\n // Zepto collections\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function(){\n var i, value, args = []\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i]\n args[i] = zepto.isZ(value) ? value.toArray() : value\n }\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args)\n },\n\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function(fn){\n return $($.map(this, function(el, i){ return fn.call(el, i, el) }))\n },\n slice: function(){\n return $(slice.apply(this, arguments))\n },\n\n ready: function(callback){\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($)\n else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)\n return this\n },\n get: function(idx){\n return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]\n },\n toArray: function(){ return this.get() },\n size: function(){\n return this.length\n },\n remove: function(){\n return this.each(function(){\n if (this.parentNode != null)\n this.parentNode.removeChild(this)\n })\n },\n each: function(callback){\n emptyArray.every.call(this, function(el, idx){\n return callback.call(el, idx, el) !== false\n })\n return this\n },\n filter: function(selector){\n if (isFunction(selector)) return this.not(this.not(selector))\n return $(filter.call(this, function(element){\n return zepto.matches(element, selector)\n }))\n },\n add: function(selector,context){\n return $(uniq(this.concat($(selector,context))))\n },\n is: function(selector){\n return this.length > 0 && zepto.matches(this[0], selector)\n },\n not: function(selector){\n var nodes=[]\n if (isFunction(selector) && selector.call !== undefined)\n this.each(function(idx){\n if (!selector.call(this,idx)) nodes.push(this)\n })\n else {\n var excludes = typeof selector == 'string' ? this.filter(selector) :\n (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)\n this.forEach(function(el){\n if (excludes.indexOf(el) < 0) nodes.push(el)\n })\n }\n return $(nodes)\n },\n has: function(selector){\n return this.filter(function(){\n return isObject(selector) ?\n $.contains(this, selector) :\n $(this).find(selector).size()\n })\n },\n eq: function(idx){\n return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)\n },\n first: function(){\n var el = this[0]\n return el && !isObject(el) ? el : $(el)\n },\n last: function(){\n var el = this[this.length - 1]\n return el && !isObject(el) ? el : $(el)\n },\n find: function(selector){\n var result, $this = this\n if (!selector) result = $()\n else if (typeof selector == 'object')\n result = $(selector).filter(function(){\n var node = this\n return emptyArray.some.call($this, function(parent){\n return $.contains(parent, node)\n })\n })\n else if (this.length == 1) result = $(zepto.qsa(this[0], selector))\n else result = this.map(function(){ return zepto.qsa(this, selector) })\n return result\n },\n closest: function(selector, context){\n var nodes = [], collection = typeof selector == 'object' && $(selector)\n this.each(function(_, node){\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))\n node = node !== context && !isDocument(node) && node.parentNode\n if (node && nodes.indexOf(node) < 0) nodes.push(node)\n })\n return $(nodes)\n },\n parents: function(selector){\n var ancestors = [], nodes = this\n while (nodes.length > 0)\n nodes = $.map(nodes, function(node){\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node)\n return node\n }\n })\n return filtered(ancestors, selector)\n },\n parent: function(selector){\n return filtered(uniq(this.pluck('parentNode')), selector)\n },\n children: function(selector){\n return filtered(this.map(function(){ return children(this) }), selector)\n },\n contents: function() {\n return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })\n },\n siblings: function(selector){\n return filtered(this.map(function(i, el){\n return filter.call(children(el.parentNode), function(child){ return child!==el })\n }), selector)\n },\n empty: function(){\n return this.each(function(){ this.innerHTML = '' })\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function(property){\n return $.map(this, function(el){ return el[property] })\n },\n show: function(){\n return this.each(function(){\n this.style.display == \"none\" && (this.style.display = '')\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\")\n this.style.display = defaultDisplay(this.nodeName)\n })\n },\n replaceWith: function(newContent){\n return this.before(newContent).remove()\n },\n wrap: function(structure){\n var func = isFunction(structure)\n if (this[0] && !func)\n var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1\n\n return this.each(function(index){\n $(this).wrapAll(\n func ? structure.call(this, index) :\n clone ? dom.cloneNode(true) : dom\n )\n })\n },\n wrapAll: function(structure){\n if (this[0]) {\n $(this[0]).before(structure = $(structure))\n var children\n // drill down to the inmost element\n while ((children = structure.children()).length) structure = children.first()\n $(structure).append(this)\n }\n return this\n },\n wrapInner: function(structure){\n var func = isFunction(structure)\n return this.each(function(index){\n var self = $(this), contents = self.contents(),\n dom = func ? structure.call(this, index) : structure\n contents.length ? contents.wrapAll(dom) : self.append(dom)\n })\n },\n unwrap: function(){\n this.parent().each(function(){\n $(this).replaceWith($(this).children())\n })\n return this\n },\n clone: function(){\n return this.map(function(){ return this.cloneNode(true) })\n },\n hide: function(){\n return this.css(\"display\", \"none\")\n },\n toggle: function(setting){\n return this.each(function(){\n var el = $(this)\n ;(setting === undefined ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide()\n })\n },\n prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },\n next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },\n html: function(html){\n return 0 in arguments ?\n this.each(function(idx){\n var originHtml = this.innerHTML\n $(this).empty().append( funcArg(this, html, idx, originHtml) )\n }) :\n (0 in this ? this[0].innerHTML : null)\n },\n text: function(text){\n return 0 in arguments ?\n this.each(function(idx){\n var newText = funcArg(this, text, idx, this.textContent)\n this.textContent = newText == null ? '' : ''+newText\n }) :\n (0 in this ? this.pluck('textContent').join(\"\") : null)\n },\n attr: function(name, value){\n var result\n return (typeof name == 'string' && !(1 in arguments)) ?\n (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) :\n this.each(function(idx){\n if (this.nodeType !== 1) return\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key])\n else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))\n })\n },\n removeAttr: function(name){\n return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){\n setAttribute(this, attribute)\n }, this)})\n },\n prop: function(name, value){\n name = propMap[name] || name\n return (1 in arguments) ?\n this.each(function(idx){\n this[name] = funcArg(this, value, idx, this[name])\n }) :\n (this[0] && this[0][name])\n },\n removeProp: function(name){\n name = propMap[name] || name\n return this.each(function(){ delete this[name] })\n },\n data: function(name, value){\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()\n\n var data = (1 in arguments) ?\n this.attr(attrName, value) :\n this.attr(attrName)\n\n return data !== null ? deserializeValue(data) : undefined\n },\n val: function(value){\n if (0 in arguments) {\n if (value == null) value = \"\"\n return this.each(function(idx){\n this.value = funcArg(this, value, idx, this.value)\n })\n } else {\n return this[0] && (this[0].multiple ?\n $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :\n this[0].value)\n }\n },\n offset: function(coordinates){\n if (coordinates) return this.each(function(index){\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n }\n\n if ($this.css('position') == 'static') props['position'] = 'relative'\n $this.css(props)\n })\n if (!this.length) return null\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0]))\n return {top: 0, left: 0}\n var obj = this[0].getBoundingClientRect()\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n }\n },\n css: function(property, value){\n if (arguments.length < 2) {\n var element = this[0]\n if (typeof property == 'string') {\n if (!element) return\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property)\n } else if (isArray(property)) {\n if (!element) return\n var props = {}\n var computedStyle = getComputedStyle(element, '')\n $.each(property, function(_, prop){\n props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))\n })\n return props\n }\n }\n\n var css = ''\n if (type(property) == 'string') {\n if (!value && value !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(property)) })\n else\n css = dasherize(property) + \":\" + maybeAddPx(property, value)\n } else {\n for (key in property)\n if (!property[key] && property[key] !== 0)\n this.each(function(){ this.style.removeProperty(dasherize(key)) })\n else\n css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'\n }\n\n return this.each(function(){ this.style.cssText += ';' + css })\n },\n index: function(element){\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])\n },\n hasClass: function(name){\n if (!name) return false\n return emptyArray.some.call(this, function(el){\n return this.test(className(el))\n }, classRE(name))\n },\n addClass: function(name){\n if (!name) return this\n return this.each(function(idx){\n if (!('className' in this)) return\n classList = []\n var cls = className(this), newName = funcArg(this, name, idx, cls)\n newName.split(/\\s+/g).forEach(function(klass){\n if (!$(this).hasClass(klass)) classList.push(klass)\n }, this)\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"))\n })\n },\n removeClass: function(name){\n return this.each(function(idx){\n if (!('className' in this)) return\n if (name === undefined) return className(this, '')\n classList = className(this)\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function(klass){\n classList = classList.replace(classRE(klass), \" \")\n })\n className(this, classList.trim())\n })\n },\n toggleClass: function(name, when){\n if (!name) return this\n return this.each(function(idx){\n var $this = $(this), names = funcArg(this, name, idx, className(this))\n names.split(/\\s+/g).forEach(function(klass){\n (when === undefined ? !$this.hasClass(klass) : when) ?\n $this.addClass(klass) : $this.removeClass(klass)\n })\n })\n },\n scrollTop: function(value){\n if (!this.length) return\n var hasScrollTop = 'scrollTop' in this[0]\n if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset\n return this.each(hasScrollTop ?\n function(){ this.scrollTop = value } :\n function(){ this.scrollTo(this.scrollX, value) })\n },\n scrollLeft: function(value){\n if (!this.length) return\n var hasScrollLeft = 'scrollLeft' in this[0]\n if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset\n return this.each(hasScrollLeft ?\n function(){ this.scrollLeft = value } :\n function(){ this.scrollTo(value, this.scrollY) })\n },\n position: function() {\n if (!this.length) return\n\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()\n\n // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n offset.top -= parseFloat( $(elem).css('margin-top') ) || 0\n offset.left -= parseFloat( $(elem).css('margin-left') ) || 0\n\n // Add offsetParent borders\n parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0\n parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0\n\n // Subtract the two offsets\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n }\n },\n offsetParent: function() {\n return this.map(function(){\n var parent = this.offsetParent || document.body\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\")\n parent = parent.offsetParent\n return parent\n })\n }\n }\n\n // for now\n $.fn.detach = $.fn.remove\n\n // Generate the `width` and `height` functions\n ;['width', 'height'].forEach(function(dimension){\n var dimensionProperty =\n dimension.replace(/./, function(m){ return m[0].toUpperCase() })\n\n $.fn[dimension] = function(value){\n var offset, el = this[0]\n if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :\n isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :\n (offset = this.offset()) && offset[dimension]\n else return this.each(function(idx){\n el = $(this)\n el.css(dimension, funcArg(this, value, idx, el[dimension]()))\n })\n }\n })\n\n function traverseNode(node, fun) {\n fun(node)\n for (var i = 0, len = node.childNodes.length; i < len; i++)\n traverseNode(node.childNodes[i], fun)\n }\n\n // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n adjacencyOperators.forEach(function(operator, operatorIndex) {\n var inside = operatorIndex % 2 //=> prepend, append\n\n $.fn[operator] = function(){\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType, nodes = $.map(arguments, function(arg) {\n var arr = []\n argType = type(arg)\n if (argType == \"array\") {\n arg.forEach(function(el) {\n if (el.nodeType !== undefined) return arr.push(el)\n else if ($.zepto.isZ(el)) return arr = arr.concat(el.get())\n arr = arr.concat(zepto.fragment(el))\n })\n return arr\n }\n return argType == \"object\" || arg == null ?\n arg : zepto.fragment(arg)\n }),\n parent, copyByClone = this.length > 1\n if (nodes.length < 1) return this\n\n return this.each(function(_, target){\n parent = inside ? target : target.parentNode\n\n // convert all methods to a \"before\" operation\n target = operatorIndex == 0 ? target.nextSibling :\n operatorIndex == 1 ? target.firstChild :\n operatorIndex == 2 ? target :\n null\n\n var parentInDocument = $.contains(document.documentElement, parent)\n\n nodes.forEach(function(node){\n if (copyByClone) node = node.cloneNode(true)\n else if (!parent) return $(node).remove()\n\n parent.insertBefore(node, target)\n if (parentInDocument) traverseNode(node, function(el){\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&\n (!el.type || el.type === 'text/javascript') && !el.src){\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window\n target['eval'].call(target, el.innerHTML)\n }\n })\n })\n })\n }\n\n // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){\n $(html)[operator](this)\n return this\n }\n })\n\n zepto.Z.prototype = Z.prototype = $.fn\n\n // Export internal API functions in the `$.zepto` namespace\n zepto.uniq = uniq\n zepto.deserializeValue = deserializeValue\n $.zepto = zepto\n\n return $\n})()\n\nwindow.Zepto = Zepto\nwindow.$ === undefined && (window.$ = Zepto)\n\n;(function($){\n var _zid = 1, undefined,\n slice = Array.prototype.slice,\n isFunction = $.isFunction,\n isString = function(obj){ return typeof obj == 'string' },\n handlers = {},\n specialEvents={},\n focusinSupported = 'onfocusin' in window,\n focus = { focus: 'focusin', blur: 'focusout' },\n hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }\n\n specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'\n\n function zid(element) {\n return element._zid || (element._zid = _zid++)\n }\n function findHandlers(element, event, fn, selector) {\n event = parse(event)\n if (event.ns) var matcher = matcherFor(event.ns)\n return (handlers[zid(element)] || []).filter(function(handler) {\n return handler\n && (!event.e || handler.e == event.e)\n && (!event.ns || matcher.test(handler.ns))\n && (!fn || zid(handler.fn) === zid(fn))\n && (!selector || handler.sel == selector)\n })\n }\n function parse(event) {\n var parts = ('' + event).split('.')\n return {e: parts[0], ns: parts.slice(1).sort().join(' ')}\n }\n function matcherFor(ns) {\n return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')\n }\n\n function eventCapture(handler, captureSetting) {\n return handler.del &&\n (!focusinSupported && (handler.e in focus)) ||\n !!captureSetting\n }\n\n function realEvent(type) {\n return hover[type] || (focusinSupported && focus[type]) || type\n }\n\n function add(element, events, fn, data, selector, delegator, capture){\n var id = zid(element), set = (handlers[id] || (handlers[id] = []))\n events.split(/\\s/).forEach(function(event){\n if (event == 'ready') return $(document).ready(fn)\n var handler = parse(event)\n handler.fn = fn\n handler.sel = selector\n // emulate mouseenter, mouseleave\n if (handler.e in hover) fn = function(e){\n var related = e.relatedTarget\n if (!related || (related !== this && !$.contains(this, related)))\n return handler.fn.apply(this, arguments)\n }\n handler.del = delegator\n var callback = delegator || fn\n handler.proxy = function(e){\n e = compatible(e)\n if (e.isImmediatePropagationStopped()) return\n e.data = data\n var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))\n if (result === false) e.preventDefault(), e.stopPropagation()\n return result\n }\n handler.i = set.length\n set.push(handler)\n if ('addEventListener' in element)\n element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n }\n function remove(element, events, fn, selector, capture){\n var id = zid(element)\n ;(events || '').split(/\\s/).forEach(function(event){\n findHandlers(element, event, fn, selector).forEach(function(handler){\n delete handlers[id][handler.i]\n if ('removeEventListener' in element)\n element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))\n })\n })\n }\n\n $.event = { add: add, remove: remove }\n\n $.proxy = function(fn, context) {\n var args = (2 in arguments) && slice.call(arguments, 2)\n if (isFunction(fn)) {\n var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }\n proxyFn._zid = zid(fn)\n return proxyFn\n } else if (isString(context)) {\n if (args) {\n args.unshift(fn[context], fn)\n return $.proxy.apply(null, args)\n } else {\n return $.proxy(fn[context], fn)\n }\n } else {\n throw new TypeError(\"expected function\")\n }\n }\n\n $.fn.bind = function(event, data, callback){\n return this.on(event, data, callback)\n }\n $.fn.unbind = function(event, callback){\n return this.off(event, callback)\n }\n $.fn.one = function(event, selector, data, callback){\n return this.on(event, selector, data, callback, 1)\n }\n\n var returnTrue = function(){return true},\n returnFalse = function(){return false},\n ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,\n eventMethods = {\n preventDefault: 'isDefaultPrevented',\n stopImmediatePropagation: 'isImmediatePropagationStopped',\n stopPropagation: 'isPropagationStopped'\n }\n\n function compatible(event, source) {\n if (source || !event.isDefaultPrevented) {\n source || (source = event)\n\n $.each(eventMethods, function(name, predicate) {\n var sourceMethod = source[name]\n event[name] = function(){\n this[predicate] = returnTrue\n return sourceMethod && sourceMethod.apply(source, arguments)\n }\n event[predicate] = returnFalse\n })\n\n event.timeStamp || (event.timeStamp = Date.now())\n\n if (source.defaultPrevented !== undefined ? source.defaultPrevented :\n 'returnValue' in source ? source.returnValue === false :\n source.getPreventDefault && source.getPreventDefault())\n event.isDefaultPrevented = returnTrue\n }\n return event\n }\n\n function createProxy(event) {\n var key, proxy = { originalEvent: event }\n for (key in event)\n if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]\n\n return compatible(proxy, event)\n }\n\n $.fn.delegate = function(selector, event, callback){\n return this.on(event, selector, callback)\n }\n $.fn.undelegate = function(selector, event, callback){\n return this.off(event, selector, callback)\n }\n\n $.fn.live = function(event, callback){\n $(document.body).delegate(this.selector, event, callback)\n return this\n }\n $.fn.die = function(event, callback){\n $(document.body).undelegate(this.selector, event, callback)\n return this\n }\n\n $.fn.on = function(event, selector, data, callback, one){\n var autoRemove, delegator, $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.on(type, selector, data, fn, one)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = data, data = selector, selector = undefined\n if (callback === undefined || data === false)\n callback = data, data = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(_, element){\n if (one) autoRemove = function(e){\n remove(element, e.type, callback)\n return callback.apply(this, arguments)\n }\n\n if (selector) delegator = function(e){\n var evt, match = $(e.target).closest(selector, element).get(0)\n if (match && match !== element) {\n evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})\n return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))\n }\n }\n\n add(element, event, callback, data, selector, delegator || autoRemove)\n })\n }\n $.fn.off = function(event, selector, callback){\n var $this = this\n if (event && !isString(event)) {\n $.each(event, function(type, fn){\n $this.off(type, selector, fn)\n })\n return $this\n }\n\n if (!isString(selector) && !isFunction(callback) && callback !== false)\n callback = selector, selector = undefined\n\n if (callback === false) callback = returnFalse\n\n return $this.each(function(){\n remove(this, event, callback, selector)\n })\n }\n\n $.fn.trigger = function(event, args){\n event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)\n event._args = args\n return this.each(function(){\n // handle focus(), blur() by calling them directly\n if (event.type in focus && typeof this[event.type] == \"function\") this[event.type]()\n // items in the collection might not be DOM elements\n else if ('dispatchEvent' in this) this.dispatchEvent(event)\n else $(this).triggerHandler(event, args)\n })\n }\n\n // triggers event handlers on current element just as if an event occurred,\n // doesn't trigger an actual event, doesn't bubble\n $.fn.triggerHandler = function(event, args){\n var e, result\n this.each(function(i, element){\n e = createProxy(isString(event) ? $.Event(event) : event)\n e._args = args\n e.target = element\n $.each(findHandlers(element, event.type || event), function(i, handler){\n result = handler.proxy(e)\n if (e.isImmediatePropagationStopped()) return false\n })\n })\n return result\n }\n\n // shortcut methods for `.bind(event, fn)` for each event type\n ;('focusin focusout focus blur load resize scroll unload click dblclick '+\n 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+\n 'change select keydown keypress keyup error').split(' ').forEach(function(event) {\n $.fn[event] = function(callback) {\n return (0 in arguments) ?\n this.bind(event, callback) :\n this.trigger(event)\n }\n })\n\n $.Event = function(type, props) {\n if (!isString(type)) props = type, type = props.type\n var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true\n if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])\n event.initEvent(type, bubbles, true)\n return compatible(event)\n }\n\n})(Zepto)\n\n;(function($){\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,\n scriptTypeRE = /^(?:text|application)\\/javascript/i,\n xmlTypeRE = /^(?:text|application)\\/xml/i,\n jsonType = 'application/json',\n htmlType = 'text/html',\n blankRE = /^\\s*$/,\n originAnchor = document.createElement('a')\n\n originAnchor.href = window.location.href\n\n // trigger a custom event and return false if it was cancelled\n function triggerAndReturn(context, eventName, data) {\n var event = $.Event(eventName)\n $(context).trigger(event, data)\n return !event.isDefaultPrevented()\n }\n\n // trigger an Ajax \"global\" event\n function triggerGlobal(settings, context, eventName, data) {\n if (settings.global) return triggerAndReturn(context || document, eventName, data)\n }\n\n // Number of active Ajax requests\n $.active = 0\n\n function ajaxStart(settings) {\n if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')\n }\n function ajaxStop(settings) {\n if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')\n }\n\n // triggers an extra global event \"ajaxBeforeSend\" that's like \"ajaxSend\" but cancelable\n function ajaxBeforeSend(xhr, settings) {\n var context = settings.context\n if (settings.beforeSend.call(context, xhr, settings) === false ||\n triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)\n return false\n\n triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])\n }\n function ajaxSuccess(data, xhr, settings, deferred) {\n var context = settings.context, status = 'success'\n settings.success.call(context, data, status, xhr)\n if (deferred) deferred.resolveWith(context, [data, status, xhr])\n triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])\n ajaxComplete(status, xhr, settings)\n }\n // type: \"timeout\", \"error\", \"abort\", \"parsererror\"\n function ajaxError(error, type, xhr, settings, deferred) {\n var context = settings.context\n settings.error.call(context, xhr, type, error)\n if (deferred) deferred.rejectWith(context, [xhr, type, error])\n triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])\n ajaxComplete(type, xhr, settings)\n }\n // status: \"success\", \"notmodified\", \"error\", \"timeout\", \"abort\", \"parsererror\"\n function ajaxComplete(status, xhr, settings) {\n var context = settings.context\n settings.complete.call(context, xhr, status)\n triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])\n ajaxStop(settings)\n }\n\n function ajaxDataFilter(data, type, settings) {\n if (settings.dataFilter == empty) return data\n var context = settings.context\n return settings.dataFilter.call(context, data, type)\n }\n\n // Empty function, used as default callback\n function empty() {}\n\n $.ajaxJSONP = function(options, deferred){\n if (!('type' in options)) return $.ajax(options)\n\n var _callbackName = options.jsonpCallback,\n callbackName = ($.isFunction(_callbackName) ?\n _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)),\n script = document.createElement('script'),\n originalCallback = window[callbackName],\n responseData,\n abort = function(errorType) {\n $(script).triggerHandler('error', errorType || 'abort')\n },\n xhr = { abort: abort }, abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n $(script).on('load error', function(e, errorType){\n clearTimeout(abortTimeout)\n $(script).off().remove()\n\n if (e.type == 'error' || !responseData) {\n ajaxError(null, errorType || 'error', xhr, options, deferred)\n } else {\n ajaxSuccess(responseData[0], xhr, options, deferred)\n }\n\n window[callbackName] = originalCallback\n if (responseData && $.isFunction(originalCallback))\n originalCallback(responseData[0])\n\n originalCallback = responseData = undefined\n })\n\n if (ajaxBeforeSend(xhr, options) === false) {\n abort('abort')\n return xhr\n }\n\n window[callbackName] = function(){\n responseData = arguments\n }\n\n script.src = options.url.replace(/\\?(.+)=\\?/, '?$1=' + callbackName)\n document.head.appendChild(script)\n\n if (options.timeout > 0) abortTimeout = setTimeout(function(){\n abort('timeout')\n }, options.timeout)\n\n return xhr\n }\n\n $.ajaxSettings = {\n // Default type of request\n type: 'GET',\n // Callback that is executed before request\n beforeSend: empty,\n // Callback that is executed if the request succeeds\n success: empty,\n // Callback that is executed the the server drops error\n error: empty,\n // Callback that is executed on request complete (both: error and success)\n complete: empty,\n // The context for the callbacks\n context: null,\n // Whether to trigger \"global\" Ajax events\n global: true,\n // Transport\n xhr: function () {\n return new window.XMLHttpRequest()\n },\n // MIME types mapping\n // IIS returns Javascript as \"application/x-javascript\"\n accepts: {\n script: 'text/javascript, application/javascript, application/x-javascript',\n json: jsonType,\n xml: 'application/xml, text/xml',\n html: htmlType,\n text: 'text/plain'\n },\n // Whether the request is to another domain\n crossDomain: false,\n // Default timeout\n timeout: 0,\n // Whether data should be serialized to string\n processData: true,\n // Whether the browser should be allowed to cache GET responses\n cache: true,\n //Used to handle the raw response data of XMLHttpRequest.\n //This is a pre-filtering function to sanitize the response.\n //The sanitized response should be returned\n dataFilter: empty\n }\n\n function mimeToDataType(mime) {\n if (mime) mime = mime.split(';', 2)[0]\n return mime && ( mime == htmlType ? 'html' :\n mime == jsonType ? 'json' :\n scriptTypeRE.test(mime) ? 'script' :\n xmlTypeRE.test(mime) && 'xml' ) || 'text'\n }\n\n function appendQuery(url, query) {\n if (query == '') return url\n return (url + '&' + query).replace(/[&?]{1,2}/, '?')\n }\n\n // serialize payload and append it to the URL for GET requests\n function serializeData(options) {\n if (options.processData && options.data && $.type(options.data) != \"string\")\n options.data = $.param(options.data, options.traditional)\n if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType))\n options.url = appendQuery(options.url, options.data), options.data = undefined\n }\n\n $.ajax = function(options){\n var settings = $.extend({}, options || {}),\n deferred = $.Deferred && $.Deferred(),\n urlAnchor, hashIndex\n for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]\n\n ajaxStart(settings)\n\n if (!settings.crossDomain) {\n urlAnchor = document.createElement('a')\n urlAnchor.href = settings.url\n // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049\n urlAnchor.href = urlAnchor.href\n settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host)\n }\n\n if (!settings.url) settings.url = window.location.toString()\n if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex)\n serializeData(settings)\n\n var dataType = settings.dataType, hasPlaceholder = /\\?.+=\\?/.test(settings.url)\n if (hasPlaceholder) dataType = 'jsonp'\n\n if (settings.cache === false || (\n (!options || options.cache !== true) &&\n ('script' == dataType || 'jsonp' == dataType)\n ))\n settings.url = appendQuery(settings.url, '_=' + Date.now())\n\n if ('jsonp' == dataType) {\n if (!hasPlaceholder)\n settings.url = appendQuery(settings.url,\n settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')\n return $.ajaxJSONP(settings, deferred)\n }\n\n var mime = settings.accepts[dataType],\n headers = { },\n setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },\n protocol = /^([\\w-]+:)\\/\\//.test(settings.url) ? RegExp.$1 : window.location.protocol,\n xhr = settings.xhr(),\n nativeSetHeader = xhr.setRequestHeader,\n abortTimeout\n\n if (deferred) deferred.promise(xhr)\n\n if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')\n setHeader('Accept', mime || '*/*')\n if (mime = settings.mimeType || mime) {\n if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]\n xhr.overrideMimeType && xhr.overrideMimeType(mime)\n }\n if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))\n setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')\n\n if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])\n xhr.setRequestHeader = setHeader\n\n xhr.onreadystatechange = function(){\n if (xhr.readyState == 4) {\n xhr.onreadystatechange = empty\n clearTimeout(abortTimeout)\n var result, error = false\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {\n dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))\n\n if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob')\n result = xhr.response\n else {\n result = xhr.responseText\n\n try {\n // http://perfectionkills.com/global-eval-what-are-the-options/\n // sanitize response accordingly if data filter callback provided\n result = ajaxDataFilter(result, dataType, settings)\n if (dataType == 'script') (1,eval)(result)\n else if (dataType == 'xml') result = xhr.responseXML\n else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)\n } catch (e) { error = e }\n\n if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred)\n }\n\n ajaxSuccess(result, xhr, settings, deferred)\n } else {\n ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)\n }\n }\n }\n\n if (ajaxBeforeSend(xhr, settings) === false) {\n xhr.abort()\n ajaxError(null, 'abort', xhr, settings, deferred)\n return xhr\n }\n\n var async = 'async' in settings ? settings.async : true\n xhr.open(settings.type, settings.url, async, settings.username, settings.password)\n\n if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]\n\n for (name in headers) nativeSetHeader.apply(xhr, headers[name])\n\n if (settings.timeout > 0) abortTimeout = setTimeout(function(){\n xhr.onreadystatechange = empty\n xhr.abort()\n ajaxError(null, 'timeout', xhr, settings, deferred)\n }, settings.timeout)\n\n // avoid sending empty string (#319)\n xhr.send(settings.data ? settings.data : null)\n return xhr\n }\n\n // handle optional data/success arguments\n function parseArguments(url, data, success, dataType) {\n if ($.isFunction(data)) dataType = success, success = data, data = undefined\n if (!$.isFunction(success)) dataType = success, success = undefined\n return {\n url: url\n , data: data\n , success: success\n , dataType: dataType\n }\n }\n\n $.get = function(/* url, data, success, dataType */){\n return $.ajax(parseArguments.apply(null, arguments))\n }\n\n $.post = function(/* url, data, success, dataType */){\n var options = parseArguments.apply(null, arguments)\n options.type = 'POST'\n return $.ajax(options)\n }\n\n $.getJSON = function(/* url, data, success */){\n var options = parseArguments.apply(null, arguments)\n options.dataType = 'json'\n return $.ajax(options)\n }\n\n $.fn.load = function(url, data, success){\n if (!this.length) return this\n var self = this, parts = url.split(/\\s/), selector,\n options = parseArguments(url, data, success),\n callback = options.success\n if (parts.length > 1) options.url = parts[0], selector = parts[1]\n options.success = function(response){\n self.html(selector ?\n $('<div>').html(response.replace(rscript, \"\")).find(selector)\n : response)\n callback && callback.apply(self, arguments)\n }\n $.ajax(options)\n return this\n }\n\n var escape = encodeURIComponent\n\n function serialize(params, obj, traditional, scope){\n var type, array = $.isArray(obj), hash = $.isPlainObject(obj)\n $.each(obj, function(key, value) {\n type = $.type(value)\n if (scope) key = traditional ? scope :\n scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'\n // handle data in serializeArray() format\n if (!scope && array) params.add(value.name, value.value)\n // recurse into nested objects\n else if (type == \"array\" || (!traditional && type == \"object\"))\n serialize(params, value, traditional, key)\n else params.add(key, value)\n })\n }\n\n $.param = function(obj, traditional){\n var params = []\n params.add = function(key, value) {\n if ($.isFunction(value)) value = value()\n if (value == null) value = \"\"\n this.push(escape(key) + '=' + escape(value))\n }\n serialize(params, obj, traditional)\n return params.join('&').replace(/%20/g, '+')\n }\n})(Zepto)\n\n;(function($){\n $.fn.serializeArray = function() {\n var name, type, result = [],\n add = function(value) {\n if (value.forEach) return value.forEach(add)\n result.push({ name: name, value: value })\n }\n if (this[0]) $.each(this[0].elements, function(_, field){\n type = field.type, name = field.name\n if (name && field.nodeName.toLowerCase() != 'fieldset' &&\n !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' &&\n ((type != 'radio' && type != 'checkbox') || field.checked))\n add($(field).val())\n })\n return result\n }\n\n $.fn.serialize = function(){\n var result = []\n this.serializeArray().forEach(function(elm){\n result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))\n })\n return result.join('&')\n }\n\n $.fn.submit = function(callback) {\n if (0 in arguments) this.bind('submit', callback)\n else if (this.length) {\n var event = $.Event('submit')\n this.eq(0).trigger(event)\n if (!event.isDefaultPrevented()) this.get(0).submit()\n }\n return this\n }\n\n})(Zepto)\n\n;(function(){\n // getComputedStyle shouldn't freak out when called\n // without a valid element as argument\n try {\n getComputedStyle(undefined)\n } catch(e) {\n var nativeGetComputedStyle = getComputedStyle\n window.getComputedStyle = function(element, pseudoElement){\n try {\n return nativeGetComputedStyle(element, pseudoElement)\n } catch(e) {\n return null\n }\n }\n }\n})()\n return Zepto\n}))\n"},function(){!function(e){e.expr={":":{}},e.support={},e.fn.clone=function(){var t=e();return this.each(function(){t.push(this.cloneNode(!0))}),t},["Left","Top"].forEach(function(t,n){function i(e){return function(e){return e&&"object"==g(e)&&"setInterval"in e}(e)?e:!(9!==e.nodeType)&&(e.defaultView||e.parentWindow)}var o="scroll"+t;e.fn[o]=function(t){var s,r;return void 0===t?(s=this[0])?(r=i(s))?"pageXOffset"in r?r[n?"pageYOffset":"pageXOffset"]:r.document.documentElement[o]||r.document.body[o]:s[o]:null:void this.each(function(){if(r=i(this)){var s=n?e(r).scrollLeft():t,a=n?t:e(r).scrollTop();r.scrollTo(s,a)}else this[o]=t})}}),["width","height"].forEach(function(t){var n=t.replace(/./,function(e){return e[0].toUpperCase()});e.fn["inner"+n]=function(e){var n=this;if(n){var i=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach(function(t){i+=parseInt(n.css("padding-"+t),10),e&&(i+=parseInt(n.css("margin-"+t),10))}),i}return null},e.fn["outer"+n]=function(e){var n=this;if(n){var i=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach(function(t){e&&(i+=parseInt(n.css("margin-"+t),10))}),i}return null}}),e.proxy=function(t,n){if("string"==typeof n){var i=t[n];n=t,t=i}if(e.isFunction(t)){var o=Array.prototype.slice.call(arguments,2),s=function(){return t.apply(n,o.concat(Array.prototype.slice.call(arguments)))};return s.guid=t.guid=t.guid||s.guid||e.guid++,s}};var t=String.prototype.trim;e.trim=function(e,n){return!n&&t?t.call(e):(n=defaultToWhiteSpace(n),e.replace(new RegExp("^["+n+"]+|["+n+"]+$","g"),""))};var n=/^(?:body|html)$/i;e.fn.position=function(){if(!this[0])return null;var t=this[0],i=this.offsetParent(),o=this.offset(),s=n.test(i[0].nodeName)?{top:0,left:0}:i.offset();return o.top-=parseFloat(e(t).css("margin-top"))||0,o.left-=parseFloat(e(t).css("margin-left"))||0,s.top+=parseFloat(e(i[0]).css("border-top-width"))||0,s.left+=parseFloat(e(i[0]).css("border-left-width"))||0,{top:o.top-s.top,left:o.left-s.left}},e.fn.offsetParent=function(){var t=e();return this.each(function(){for(var i=this.offsetParent||document.body;i&&!n.test(i.nodeName)&&"static"===e(i).css("position");)i=i.offsetParent;t.push(i)}),t}}(Zepto)}])},"object"==g(t)&&"object"==g(e)?e.exports=s():(i=[],void 0===(o="function"==typeof(n=s)?n.apply(t,i):n)||(e.exports=o))}).call(this,n(2)(e))},function(e,t,n){"use strict";n.r(t);var i=n(0),o=new(n.n(i).a)({settings:{showPopoutIcon:!1,showCloseIcon:!1},dimensions:{minItemHeight:40},content:[{type:"row",content:[{type:"column",width:40,content:[{type:"component",componentName:"template",title:"Game",componentState:{id:"client_wrapper"}}]},{type:"column",content:[{type:"row",height:65,content:[{type:"stack",content:[{type:"component",title:"Main",componentName:"template",componentState:{id:"mainmenu"}},{type:"component",title:"Log",componentName:"template",componentState:{id:"log"}}]},{type:"component",title:"Music",width:30,componentName:"template",componentState:{id:"music"}}]},{type:"row",content:[{type:"component",title:"Server chat",componentName:"template",componentState:{id:"ooc"}}]}]}]}]});o.registerComponent("template",function(e,t){var n=document.querySelector("#".concat(t.id));e.getElement().html(n.content)}),o.init()},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}}]);
-//# sourceMappingURL=ui.b.js.map \ No newline at end of file