diff --git a/dist/ParaViewWeb.js b/dist/ParaViewWeb.js index b565687298..f39214fb79 100644 --- a/dist/ParaViewWeb.js +++ b/dist/ParaViewWeb.js @@ -20,25 +20,25 @@ createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeF * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=n(20);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(20),o=n(109),a=n(110),i=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),e.exports=i},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e){return g[e]}function o(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function a(e){return(""+e).replace(m,r)}function i(e){return"$"+a(e)}function s(e,t,n,r){var a=typeof e;if("undefined"!==a&&"boolean"!==a||(e=null),null===e||"string"===a||"number"===a||u.isValidElement(e))return n(r,e,""===t?d+o(e,0):t),1;var l,c,g=0,m=""===t?d:t+h;if(Array.isArray(e))for(var v=0;v1||Object.keys(o).length>0?a=new c(r,o):r.length>0&&(a=r[0]);var s=i._call_reqs[t],l=s[0],u=s[1];n.progress?u&&u.receive_progress&&l.notify(a):(l.resolve(a),delete i._call_reqs[t])}else i._protocol_violation("CALL-RESULT received for non-pending request ID "+t)},i._MESSAGE_MAP[g.RESULT]=i._process_RESULT,i._process_CALL_ERROR=function(e){var t=e[2];if(t in i._call_reqs){var n=(e[3],new f(e[4],e[5],e[6])),r=i._call_reqs[t],o=r[0];r[1];o.reject(n),delete i._call_reqs[t]}else i._protocol_violation("CALL-ERROR received for non-pending request ID "+t)},i._MESSAGE_MAP[g.ERROR][g.CALL]=i._process_CALL_ERROR,i._process_INVOCATION=function(e){var t=e[1],n=e[2],r=e[3];if(n in i._registrations){var a=i._registrations[n].endpoint,s=e[4]||[],u=e[5]||{},p=null;r.receive_progress&&(p=function(e,n){var r=[g.YIELD,t,{progress:!0}];e=e||[],n=n||{};var o=Object.keys(n).length;(e.length||o)&&(r.push(e),o&&r.push(n)),i._send_wamp(r)});var d=new l(r.caller,p,r.procedure);o.call(a,s,u,d).then(function(e){var n=[g.YIELD,t,{}];if(e instanceof c){var r=Object.keys(e.kwargs).length;(e.args.length||r)&&(n.push(e.args),r&&n.push(e.kwargs))}else n.push([e]);i._send_wamp(n)},function(e){var n=[g.ERROR,g.INVOCATION,t,{}];if(e instanceof f){n.push(e.error);var r=Object.keys(e.kwargs).length;(e.args.length||r)&&(n.push(e.args),r&&n.push(e.kwargs))}else n.push("wamp.error.runtime_error"),n.push([e]);i._send_wamp(n)})}else i._protocol_violation("INVOCATION received for non-registered registration ID "+t)},i._MESSAGE_MAP[g.INVOCATION]=i._process_INVOCATION,i._socket.onmessage=function(e){var t=e[0];if(i._id)if(t===g.GOODBYE){if(!i._goodbye_sent){var n=[g.GOODBYE,{},"wamp.error.goodbye_and_out"];i._send_wamp(n)}i._id=null,i._realm=null,i._features=null;var r=e[1],l=e[2];i.onleave&&i.onleave(l,r)}else if(t===g.ERROR){var u=e[1];u in i._MESSAGE_MAP[g.ERROR]?i._MESSAGE_MAP[t][u](e):i._protocol_violation("unexpected ERROR message with request_type "+u)}else t in i._MESSAGE_MAP?i._MESSAGE_MAP[t](e):i._protocol_violation("unexpected message type "+t);else if(t===g.WELCOME){i._id=e[1];var c=e[2];if(i._features={},c.roles.broker&&(i._features.subscriber={},i._features.publisher={},c.roles.broker.features)){for(var f in s.publisher.features)i._features.publisher[f]=s.publisher.features[f]&&c.roles.broker.features[f];for(var f in s.subscriber.features)i._features.subscriber[f]=s.subscriber.features[f]&&c.roles.broker.features[f]}if(c.roles.dealer&&(i._features.caller={},i._features.callee={},c.roles.dealer.features)){for(var f in s.caller.features)i._features.caller[f]=s.caller.features[f]&&c.roles.dealer.features[f];for(var f in s.callee.features)i._features.callee[f]=s.callee.features[f]&&c.roles.dealer.features[f]}i.onjoin&&i.onjoin(e[2])}else if(t===g.ABORT){var r=e[1],l=e[2];i.onleave&&i.onleave(l,r)}else if(t===g.CHALLENGE)if(i._onchallenge){var p=e[1],d=e[2];o.call(i._onchallenge,i,p,d).then(function(e){var t=[g.AUTHENTICATE,e,{}];i._send_wamp(t)},function(e){a.debug("onchallenge() raised:",e);var t=[g.ABORT,{message:"sorry, I cannot authenticate (onchallenge handler raised an exception)"},"wamp.error.cannot_authenticate"];i._send_wamp(t),i._socket.close(1e3)})}else{a.debug("received WAMP challenge, but no onchallenge() handler set");var e=[g.ABORT,{message:"sorry, I cannot authenticate (no onchallenge handler set)"},"wamp.error.cannot_authenticate"];i._send_wamp(e),i._socket.close(1e3)}else i._protocol_violation("unexpected message type "+t)},"performance"in e&&"now"in performance?i._created=performance.now():i._created=Date.now()};Object.defineProperty(m.prototype,"defer",{get:function(){return this._defer}}),Object.defineProperty(m.prototype,"id",{get:function(){return this._id}}),Object.defineProperty(m.prototype,"realm",{get:function(){return this._realm}}),Object.defineProperty(m.prototype,"isOpen",{get:function(){return null!==this.id}}),Object.defineProperty(m.prototype,"features",{get:function(){return this._features}}),Object.defineProperty(m.prototype,"subscriptions",{get:function(){for(var e=Object.keys(this._subscriptions),t=[],n=0;n must be a string"),i.assert(!t||Array.isArray(t),"Session.join: must be an array []"),i.assert(!n||"string"==typeof n,"Session.join: must be a string");var r=this;if(r.isOpen)throw"session already open";r._goodbye_sent=!1,r._realm=e;var o={};o.roles=s,t&&(o.authmethods=t),n&&(o.authid=n);var a=[g.HELLO,e,o];r._send_wamp(a)},m.prototype.leave=function(e,t){i.assert(!e||"string"==typeof e,"Session.leave: must be a string"),i.assert(!t||"string"==typeof t,"Session.leave: must be a string");var n=this;if(!n.isOpen)throw"session not open";e||(e="wamp.close.normal");var r={};t&&(r.message=t);var o=[g.GOODBYE,r,e];n._send_wamp(o),n._goodbye_sent=!0},m.prototype.call=function(e,t,n,o){i.assert("string"==typeof e,"Session.call: must be a string"),i.assert(!t||Array.isArray(t),"Session.call: must be an array []"),i.assert(!n||n instanceof Object,"Session.call: must be an object {}"),i.assert(!o||o instanceof Object,"Session.call: must be an object {}");var a=this;if(!a.isOpen)throw"session not open";var s=r(),l=a._defer();a._call_reqs[s]=[l,o];var u=[g.CALL,s,o||{},a.resolve(e)];return t&&(u.push(t),n&&u.push(n)),a._send_wamp(u),l.promise.then?l.promise:l},m.prototype.publish=function(e,t,n,o){i.assert("string"==typeof e,"Session.publish: must be a string"),i.assert(!t||Array.isArray(t),"Session.publish: must be an array []"),i.assert(!n||n instanceof Object,"Session.publish: must be an object {}"),i.assert(!o||o instanceof Object,"Session.publish: must be an object {}");var a=this;if(!a.isOpen)throw"session not open";var s=o&&o.acknowledge,l=null,u=r();s&&(l=a._defer(),a._publish_reqs[u]=[l,o]);var c=[g.PUBLISH,u,o||{},a.resolve(e)];return t&&(c.push(t),n&&c.push(n)),a._send_wamp(c),l?l.promise.then?l.promise:l:void 0},m.prototype.subscribe=function(e,t,n){i.assert("string"==typeof e,"Session.subscribe: must be a string"),i.assert("function"==typeof t,"Session.subscribe: must be a function"),i.assert(!n||n instanceof Object,"Session.subscribe: must be an object {}");var o=this;if(!o.isOpen)throw"session not open";var a=r(),s=o._defer();o._subscribe_reqs[a]=[s,e,t,n];var l=[g.SUBSCRIBE,a];return n?l.push(n):l.push({}),l.push(o.resolve(e)),o._send_wamp(l),s.promise.then?s.promise:s},m.prototype.register=function(e,t,n){i.assert("string"==typeof e,"Session.register: must be a string"),i.assert("function"==typeof t,"Session.register: must be a function"),i.assert(!n||n instanceof Object,"Session.register: must be an object {}");var o=this;if(!o.isOpen)throw"session not open";var a=r(),s=o._defer();o._register_reqs[a]=[s,e,t,n];var l=[g.REGISTER,a];return n?l.push(n):l.push({}),l.push(o.resolve(e)),o._send_wamp(l),s.promise.then?s.promise:s},m.prototype.unsubscribe=function(e){i.assert(e instanceof p,"Session.unsubscribe: must be an instance of class autobahn.Subscription");var t=this;if(!t.isOpen)throw"session not open";if(!(e.active&&e.id in t._subscriptions))throw"subscription not active";var n=t._subscriptions[e.id],o=n.indexOf(e);if(-1===o)throw"subscription not active";n.splice(o,1),e.active=!1;var a=t._defer();if(n.length)a.resolve(!1);else{var s=r();t._unsubscribe_reqs[s]=[a,e.id];var l=[g.UNSUBSCRIBE,s,e.id];t._send_wamp(l)}return a.promise.then?a.promise:a},m.prototype.unregister=function(e){i.assert(e instanceof d,"Session.unregister: must be an instance of class autobahn.Registration");var t=this;if(!t.isOpen)throw"session not open";if(!(e.active&&e.id in t._registrations))throw"registration not active";var n=r(),o=t._defer();t._unregister_reqs[n]=[o,e];var a=[g.UNREGISTER,n,e.id];return t._send_wamp(a),o.promise.then?o.promise:o},m.prototype.prefix=function(e,t){i.assert("string"==typeof e,"Session.prefix: must be a string"),i.assert(!t||"string"==typeof t,"Session.prefix: must be a string or falsy");var n=this;t?n._prefixes[e]=t:e in n._prefixes&&delete n._prefixes[e]},m.prototype.resolve=function(e){i.assert("string"==typeof e,"Session.resolve: must be a string");var t=this,n=e.indexOf(":");if(n>=0){var r=e.substring(0,n);if(r in t._prefixes)return t._prefixes[r]+"."+e.substring(n+1);throw"cannot resolve CURIE prefix '"+r+"'"}return e},t.Session=m,t.Invocation=l,t.Event=u,t.Result=c,t.Error=f,t.Subscription=p,t.Registration=d,t.Publication=h}).call(t,function(){return this}())},function(e,t,n){"use strict";var r=n(36),o=n(308),a=n(313),i=n(165),s=n(312),l=window.btoa||n(307);e.exports=function(e,t,u){var c=u.data,f=u.headers;r.isFormData(c)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(!window.XDomainRequest||"withCredentials"in p||s(u.url)||(p=new window.XDomainRequest),u.auth){var d=u.auth.username||"",h=u.auth.password||"";f.Authorization="Basic "+l(d+":"+h)}if(p.open(u.method.toUpperCase(),o(u.url,u.params,u.paramsSerializer),!0),p.timeout=u.timeout,p.onload=function(){if(p){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r=-1!==["text",""].indexOf(u.responseType||"")?p.responseText:p.response,o={data:i(r,n,u.transformResponse),status:p.status,statusText:p.statusText,headers:n,config:u};(p.status>=200&&p.status<300||!("status"in p)&&p.responseText?e:t)(o),p=null}},r.isStandardBrowserEnv()){var g=n(310),m=u.withCredentials||s(u.url)?g.read(u.xsrfCookieName):void 0;m&&(f[u.xsrfHeaderName]=m)}if("setRequestHeader"in p&&r.forEach(f,function(e,t){"undefined"==typeof c&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),u.withCredentials&&(p.withCredentials=!0),u.responseType)try{p.responseType=u.responseType}catch(v){if("json"!==p.responseType)throw v}r.isArrayBuffer(c)&&(c=new DataView(c)),p.send(c)}},function(e,t,n){"use strict";var r=n(36);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return(t-e)*n+e}function i(e,t,n){var r=(n-e[0])/(t[0]-e[0]);return[a(e[1],t[1],r),a(e[2],t[2],r),a(e[3],t[3],r),255]}function s(e,t){return[e[t].x,e[t].r,e[t].g,e[t].b]}function l(e,t){return e.x-t.x}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;nr;r++)this.controlPoints.push({x:t[r].x,r:t[r].r,g:t[r].g,b:t[r].b});this.build(),this.emit(h,{change:"preset",lut:this})}},{key:"updateControlPoints",value:function(e){this.colorTable=null,this.controlPoints=[];for(var t=e.length,n=0;t>n;n++)this.controlPoints.push({x:e[n].x,r:e[n].r,g:e[n].g,b:e[n].b});this.build(),this.emit(h,{change:"controlPoints",lut:this})}},{key:"setColorForNaN",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3];this.colorNaN=[e,t,n,r]}},{key:"getColorForNaN",value:function(){return this.colorNaN}},{key:"getScalarRange",value:function(){return[Number(this.scalarRange[0]),Number(this.scalarRange[1])]}},{key:"setScalarRange",value:function(e,t){this.scalarRange=[e,t],this.delta=t-e,this.emit(h,{change:"scalarRange",lut:this})}},{key:"build",value:function(e){var t=0;if(!this.colorTable){if(this.colorTable=[],this.discrete){this.colorTableSize=this.controlPoints.length,this.scale=50;for(var n=0;nl[0]&&(t+=1,a=s(this.controlPoints,t),l=s(this.controlPoints,t+1)),this.colorTable.push(i(a,l,o))}}e&&this.emit(h,{change:"controlPoints",lut:this})}}},{key:"setNumberOfColors",value:function(e){this.colorTableSize=e,this.colorTable=null,this.build(),this.emit(h,{change:"numberOfColors",lut:this})}},{key:"getNumberOfControlPoints",value:function(){return this.controlPoints?this.controlPoints.length:0}},{key:"removeControlPoint",value:function(e){return e>0&&ea;a++){var i=Math.floor(a/this.scale);o.data[4*a+0]=Math.floor(255*t[i][0]),o.data[4*a+1]=Math.floor(255*t[i][1]),o.data[4*a+2]=Math.floor(255*t[i][2]),o.data[4*a+3]=255}r.putImageData(o,0,0)}},{key:"getColor",value:function(e){if(isNaN(e))return this.colorNaN;var t=Math.floor(this.colorTableSize*(e-this.scalarRange[0])/this.delta);return 0>t?this.colorTable[0]:t>=this.colorTableSize?this.colorTable[this.colorTable.length-1]:this.colorTable[t]}},{key:"destroy",value:function(){this.off()}},{key:"onChange",value:function(e){return this.on(h,e)}}]),e}();t["default"]=v,d["default"].mixInto(v)},function(e,t){"use strict";function n(e){return e.size<4?e.size.toString():"list-1"===e.widget?"1":6===e.size?e.name.toLowerCase().indexOf("bound")?"3x2":e.name.toLowerCase().indexOf("range")?"3x2":(console.log("What is the layout for",e),"2x3"):(console.log("Could not find layout for",e),"NO_LAYOUT")}function r(e){return"proxy"===e.type?"string":e.type}function o(e){if(e.values){if(Array.isArray(e.values)){var t=function(){var t={};return e.values.forEach(function(e){t[e]=e}),{v:t}}();if("object"===("undefined"==typeof t?"undefined":s(t)))return t.v}if("proxy"===e.type){var n={};for(var r in e.values)n[r]=r;return n}return e.values}return e.range?{range:e.range}:{}}function a(e,t){l[t.widget]||console.log("No propType for",t);var a=t.depends?t.depends.split(":"):null,i=a?Boolean(Number(a.pop())):!0,u=a?a.pop():null,c=a?a.join(":"):null,f=[t.name,t.doc].concat(e.value).join(" ").toLowerCase();return{show:function(e){if(c&&void 0!==e.properties[c])return e.properties[c][0]===u?i:!i;if(e.filter&&e.filter.length){var n=function(){var t=e.filter.toLowerCase().split(" "),n=!0;return t.forEach(function(e){n=n&&-1!==f.indexOf(e)}),{v:n}}();if("object"===("undefined"==typeof n?"undefined":s(n)))return n.v}return!!e.advanced||!t.advanced},ui:{propType:l[t.widget]||t.widget,label:t.name,help:t.doc,noEmpty:!0,layout:n(t),type:r(t),domain:o(t),componentLabels:[],size:t.size},data:{id:[e.id,e.name].join(":"),value:[].concat(e.value),size:t.size}}}function i(e){return e.properties.map(function(t,n){return a(t,e.ui[n])})}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.proxyPropToProp=a,t.proxyToProps=i;var l={textfield:"Cell",slider:"Slider","list-n":"Enum","list-1":"Enum",checkbox:"Checkbox"};t["default"]={proxyToProps:i,proxyPropToProp:a}},function(e,t){"use strict";function n(e,t,n){var r;return function(){var o=this,a=arguments,i=function(){r=null,n||e.apply(o,a)},s=n&&!r;clearTimeout(r),r=setTimeout(i,t),s&&e.apply(o,a)}}Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=n,t["default"]={debounce:n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0,subtitle:e},g["default"].createElement(d["default"],{key:"QueryDataModelWidget",ref:"QueryDataModelWidget",model:this.props.model}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=r(o),i=n(119),s=r(i),l=n(43),u=r(l),c=n(83),f=r(c),p=n(3),d=r(p),h=n(706),g=r(h);t["default"]=d["default"].createClass({displayName:"VolumeControl",propTypes:{computation:d["default"].PropTypes.object.isRequired,equalizer:d["default"].PropTypes.object.isRequired,intensity:d["default"].PropTypes.object,lookupTable:d["default"].PropTypes.object.isRequired},componentWillMount:function(){var e=this;this.equalizerSubscription=this.props.equalizer.onChange(function(){e.forceUpdate()}),this.intensitySubscription=this.props.intensity.onChange(function(){e.forceUpdate()}),this.computationSubscription=this.props.intensity.onChange(function(){e.forceUpdate()})},componentWillUnmount:function(){this.equalizerSubscription&&(this.equalizerSubscription.unsubscribe(),this.equalizerSubscription=null),this.intensitySubscription&&(this.intensitySubscription.unsubscribe(),this.intensitySubscription=null),this.computationSubscription&&(this.computationSubscription.unsubscribe(),this.computationSubscription=null)},render:function(){var e=this.props.equalizer,t=this.props.lookupTable,n=d["default"].createElement(u["default"],{key:"toggle-intensity",onChange:this.props.intensity.toggleState,value:this.props.intensity.getState()}),r=d["default"].createElement(u["default"],{key:"reset",icon:g["default"].undoIcon,toggle:!1,onChange:this.props.equalizer.resetOpacities,value:!0}),o=d["default"].createElement(u["default"],{key:"toggle-gpu",icon:g["default"].mobileIcon,onChange:this.props.computation.toggleState,value:!this.props.computation.getState()});return d["default"].createElement("div",null,d["default"].createElement(a["default"],{title:"LookupTable",key:"LookupTableWidget_parent",subtitle:n},d["default"].createElement(f["default"],{key:"LookupTableWidget",ref:"LookupTableWidget",originalRange:t.originalRange,lookupTable:t.lookupTable,lookupTableManager:t.lookupTableManager})),d["default"].createElement(a["default"],{title:"Opacity Control",subtitle:[o,r]},d["default"].createElement(s["default"],{ref:"EqualizerWidget",key:"Equalizer",layers:e.getOpacities(),onChange:e.updateOpacities,colors:e.getColors(),spacing:5})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(82),a=r(o),i=n(371),s=r(i),l=n(3),u=r(l),c=n(43),f=r(c),p=n(65),d=r(p);t["default"]=u["default"].createClass({displayName:"CellProperty",propTypes:{data:u["default"].PropTypes.object.isRequired,help:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func,show:u["default"].PropTypes.func,ui:u["default"].PropTypes.object.isRequired,viewData:u["default"].PropTypes.object},mixins:[a["default"]],valueChange:function(e,t){var n=this.state.data;n.value[e]=t,this.setState({data:n}),this.props.onChange&&this.props.onChange(n)},render:function(){return u["default"].createElement("div",{className:this.props.show(this.props.viewData)?d["default"].container:d["default"].hidden},u["default"].createElement("div",{className:d["default"].header},u["default"].createElement("strong",null,this.props.ui.label),u["default"].createElement("span",null,u["default"].createElement(f["default"],{icon:d["default"].helpIcon,value:this.state.helpOpen,toggle:!!this.props.ui.help,onChange:this.helpToggled}))),u["default"].createElement("div",{className:d["default"].inputBlock},u["default"].createElement("table",{className:d["default"].inputTable},u["default"].createElement("tbody",null,(0,s["default"])(this.props.data,this.state.ui,this.valueChange)))),u["default"].createElement("div",{className:this.state.helpOpen?d["default"].helpBox:d["default"].hidden,dangerouslySetInnerHTML:{__html:this.props.ui.help}}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(82),a=r(o),i=n(372),s=r(i),l=n(3),u=r(l),c=n(43),f=r(c),p=n(65),d=r(p);t["default"]=u["default"].createClass({displayName:"CheckboxProperty",propTypes:{data:u["default"].PropTypes.object.isRequired,help:u["default"].PropTypes.string,name:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func,show:u["default"].PropTypes.func,ui:u["default"].PropTypes.object.isRequired,viewData:u["default"].PropTypes.object},mixins:[a["default"]],valueChange:function(e,t){var n=this.state.data;null===e?n.value=t:n.value[e]=t,this.setState({data:n}),this.props.onChange&&this.props.onChange(n)},render:function(){var e=this,t=function(){if(Array.isArray(e.props.data.value)){for(var t=[],n=0;nthis.props.maxZoom&&(r=this.props.maxZoom),this.zoom!==r){var o=this.center[0],a=this.center[1],i=r/this.zoom,s=e.relative.x/this.state.width,l=e.relative.y/this.state.height;this.zoom=r,this.center[0]=s+i*(o-s),this.center[1]=l+i*(a-l),this.imageToDraw.drawToCanvas&&this.imageToDraw.drawToCanvas()}e.isFinal&&(this.baseZoom=this.zoom)}this.baseCenter=[this.center[0],this.center[1]]},dragCallback:function(e,t){var n=!1;if(e.activeArea=this.imageToDraw.activeArea,this.baseZoom=this.zoom,this.props.listener&&this.props.listener.drag&&(n=this.props.listener.drag(e,t)),!n){e.isFirst&&(this.baseCenter=[this.center[0],this.center[1]]);var r=e.deltaX/this.state.width,o=e.deltaY/this.state.height;this.center[0]=this.baseCenter[0]+r,this.center[1]=this.baseCenter[1]+o,e.isFinal&&(this.baseCenter=[this.center[0],this.center[1]]),this.imageToDraw.drawToCanvas&&this.imageToDraw.drawToCanvas()}},clickCallback:function(e,t){e.activeArea=this.imageToDraw.activeArea,this.props.listener&&this.props.listener.click&&this.props.listener.click(e,t)},renderImage:function(e){this.imageToDraw.drawToCanvas=a,this.imageToDraw.src=e.url},renderCanvas:function(e){this.imageToDraw.drawToCanvas=i,this.imageToDraw.data=e,this.imageToDraw.width=e.outputSize[0],this.imageToDraw.height=e.outputSize[1],this.sendToServer&&this.imageExporter.exportImage(e),this.imageToDraw.firstRender?(this.imageToDraw.firstRender=!1,this.resetCamera()):this.imageToDraw.drawToCanvas()},resetCamera:function(){var e=this.state.width,t=this.state.height,n=this.imageToDraw,r=n?n.width:500,o=n?n.height:500;this.zoom=Math.min(e/r,t/o),this.baseZoom=Math.min(e/r,t/o),this.baseCenter=[.5,.5],this.center=[.5,.5],n.drawToCanvas()},recordImages:function(e){this.sendToServer=e},handleKeyDown:function(e){if(82===e.keyCode)this.resetCamera();else if(85===e.keyCode&&!this.state.dialog){var t=c["default"].findDOMNode(this.refs.thumbnail);"CANVAS"===this.imageToDraw.data.canvas.nodeName?this.imageToDraw.data.canvas.width===this.imageToDraw.data.area[2]&&this.imageToDraw.data.canvas.height===this.imageToDraw.data.area[3]?t.src=this.imageToDraw.data.canvas.toDataURL("image/png"):t.src=this.imageExporter.extractCanvasRegion(this.imageToDraw.data.canvas,this.imageToDraw.data.area,this.imageToDraw.data.outputSize):t.src=this.imageToDraw.data.canvas.src,this.setState({dialog:!this.state.dialog})}},updateTitle:function(e){var t=e.target.value;this.setState({title:t})},updateDescription:function(e){var t=e.target.value;this.setState({description:t})},toggleDialog:function(){this.setState({dialog:!this.state.dialog})},updateMetadata:function(){this.setState({dialog:!this.state.dialog}),this.imageExporter.updateMetadata({title:this.state.title,description:this.state.description,image:c["default"].findDOMNode(this.refs.thumbnail).src,path:this.props.imageBuilder.queryDataModel.basepath})},render:function(){return l["default"].createElement("div",{className:b["default"].container},l["default"].createElement("canvas",{className:b["default"].renderer,ref:"canvasRenderer",width:this.state.width,height:this.state.height}),l["default"].createElement("div",{className:this.state.dialog?b["default"].dialog:b["default"].hidden},l["default"].createElement("div",{className:b["default"].inside},l["default"].createElement("img",{ref:"thumbnail",className:b["default"].thumbnail,height:Math.floor(this.state.height/2)}),l["default"].createElement("div",{className:b["default"].metadata,style:{height:Math.floor(this.state.height/2)+"px"}},l["default"].createElement("strong",{className:b["default"].title},l["default"].createElement(p["default"],{html:this.state.title,onChange:this.updateTitle})),l["default"].createElement("div",{className:b["default"].description},l["default"].createElement(p["default"],{html:this.state.description,onChange:this.updateDescription}))),l["default"].createElement("div",{className:b["default"].buttons},l["default"].createElement("button",{className:b["default"].button,onClick:this.toggleDialog},"Cancel"),l["default"].createElement("button",{className:b["default"].button,onClick:this.updateMetadata},"Save")))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i),l=n(15),u=r(l),c=n(376),f=r(c),p=n(37),d=r(p),h=n(56),g=r(h),m=Object.keys(f["default"]),v="multiview-viewport-active-change",_="multiview-layout-change",y=a["default"].createClass({displayName:"MultiViewRenderer",propTypes:{activeColor:a["default"].PropTypes.string,borderColor:a["default"].PropTypes.string,crosshairColor:a["default"].PropTypes.string,layout:a["default"].PropTypes.string,renderers:a["default"].PropTypes.object,spacing:a["default"].PropTypes.number},getDefaultProps:function(){return{spacing:10,borderColor:"#000000",activeColor:"#0000FF",crosshairColor:"#000000",renderers:{}}},getInitialState:function(){return{width:200,height:200}},componentWillMount:function(){function e(e,n){this.dataToDraw=e,t(this.name)}var t=this.drawViewportByName;this.dragCenter=!1,this.dragInViewport=null,this.center=[.5,.5],this.layout=this.props.layout||"3xT",this.viewports=[];for(var n in this.props.renderers){var r=this.props.renderers[n],o=r.builder,a=r.painter;o&&o.onImageReady(e).context(r),a&&a.onPainterReady(e).context(r),this.viewports.push({name:n,active:!1})}this.sizeSubscription=d["default"].onSizeChange(this.updateDimensions),d["default"].startListening()},componentDidMount:function(){this.updateDimensions(),this.mouseHandler=new g["default"](s["default"].findDOMNode(this.refs.canvasRenderer)),this.mouseHandler.attach({drag:this.dragCallback,click:this.clickCallback,zoom:this.zoomCallback})},componentDidUpdate:function(e,t){this.drawLayout()},componentWillUnmount:function(){this.off(),this.mouseHandler&&(this.mouseHandler.destroy(),this.mouseHandler=null),this.sizeSubscription&&(this.sizeSubscription.unsubscribe(),this.sizeSubscription=null)},setLayout:function(e){this.layout=e,this.drawLayout(),this.emit(_,e)},getLayouts:function(){return m},getActiveLayout:function(){return this.layout},setRenderMethod:function(e){var t=this;this.viewports.forEach(function(n){n.active&&(n.name=e,t.emit(v,n))}),this.drawViewportByName(null)},getRenderMethods:function(){return Object.keys(this.props.renderers)},getActiveRenderMethod:function(){return this.viewports.forEach(function(e){return e.active?e.name:void 0}),"No render method"},updateDimensions:function(){var e=s["default"].findDOMNode(this).parentNode,t=d["default"].getSize(e);return!e||this.state.width===t.clientWidth&&this.state.height===t.clientHeight?!1:(this.setState({width:t.clientWidth,height:t.clientHeight}),!0)},dragCallback:function(e,t){var n=this.getViewPort(e);if(!n&&!this.dragInViewport||this.dragCenter)this.dragCenter=!0,this.center[0]=e.relative.x/this.state.width,this.center[1]=e.relative.y/this.state.height,this.drawLayout();else{this.dragInViewport=this.dragInViewport||n;var r=this.props.renderers[this.dragInViewport.name],o=r.builder,a=o?o.getListeners():null;a&&a.drag&&(e.activeArea=this.dragInViewport.activeArea,a.drag(e,t))}e.isFinal&&(this.dragCenter=!1,this.dragInViewport=null)},clickCallback:function(e,t){this.dragCenter=!1,this.dragInViewport=null;var n=this.getViewPort(e);if(n){this.viewports.forEach(function(e){e.active=!1}),n.active=!0;var r=this.props.renderers[n.name],o=r.builder,a=o?o.getListeners():null;a&&a.click&&(e.activeArea=n.activeArea,a.click(e,t)),this.emit(v,n)}this.drawLayout()},zoomCallback:function(e,t){var n=this.getViewPort(e);if(n){var r=this.props.renderers[n.name],o=r.builder,a=o?o.getListeners():null;a&&a.zoom&&(e.activeArea=n.activeArea,a.zoom(e,t))}},getViewPort:function(e){for(var t=this.viewports.length,n=e.relative.x,r=e.relative.y;t--;){var o=this.viewports[t].activeArea||this.viewports[t].region;if(n>=o[0]&&r>=o[1]&&n<=o[0]+o[2]&&r<=o[1]+o[3])return this.viewports[t]}return null},drawViewport:function(e){var t=this.props.renderers[e.name],n=e.region,r=s["default"].findDOMNode(this.refs.canvasRenderer).getContext("2d");if(!(!t||t.builder&&!t.dataToDraw||t.painter&&!t.painter.isReady()))if(t.painter){var o={x:n[0]+2,y:n[1]+2,width:n[2]-4,height:n[3]-4};e.activeArea=[].concat(e.region),t.painter.paint(r,o)}else{var a=this.props.renderers[e.name].dataToDraw,i=n[2]-2,l=n[3]-2,u=a.outputSize[0],c=a.outputSize[1],f=Math.min(i/u,l/c);r.clearRect(n[0]+1,n[1]+1,n[2]-2,n[3]-2);var p=Math.floor(u*f)-2,d=Math.floor(c*f)-2,h=1+n[0]+.5*i-p/2,g=1+n[1]+.5*l-d/2;try{if(r.drawImage(a.canvas,a.area[0],a.area[1],a.area[2],a.area[3],h,g,p,d),a.crosshair){var m=[p/a.area[2],d/a.area[3]],v=[h,g];r.beginPath(),r.moveTo(v[0]+m[0]*a.crosshair[0],g),r.lineTo(v[0]+m[0]*a.crosshair[0],g+d),r.moveTo(h,v[1]+m[1]*a.crosshair[1]),r.lineTo(h+p,v[1]+m[1]*a.crosshair[1]),r.strokeStyle=this.props.crosshairColor,r.lineWidth=1,r.stroke()}e.activeArea=[h,g,p,d]}catch(_){console.log("Error in MultiLayoutRenderer::drawViewport",_)}}},drawViewportByName:function(e){var t=this,n=e?this.props.renderers[e]:null;return n&&n.builder&&!n.dataToDraw?void n.builder.update():void this.viewports.forEach(function(n){n.name!==e&&null!==e||t.drawViewport(n)})},drawLayout:function(){var e=s["default"].findDOMNode(this.refs.canvasRenderer).getContext("2d"),t=e.canvas.width=this.state.width,n=e.canvas.height=this.state.height,r=[this.center[0]*t,this.center[1]*n],o=this.props.spacing,a=f["default"][this.layout](r,o,t,n),i=this.viewports,l=a.length;e.clearRect(0,0,t,n);for(var u=0;l>u;++u){var c=a.shift();ul;)i.pop();this.drawViewportByName(null)},onActiveViewportChange:function(e){return this.on(v,e)},onLayoutChange:function(e){return this.on(_,e)},render:function(){return a["default"].createElement("canvas",{className:"CanvasMultiImageRenderer",ref:"canvasRenderer",width:this.state.width,height:this.state.height})}});u["default"].mixInto(y),t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=e.length,r=n*t,o=e[Math.floor(r)],a=e[Math.ceil(r)],i=r-Math.floor(r);return((a-o)*i+o).toFixed(5)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(99),i=r(a),s=n(3),l=r(s),u=n(22),c=r(u),f=n(37),p=r(f),d=n(712),h=r(d);t["default"]=l["default"].createClass({displayName:"LineChartViewer",propTypes:{colors:l["default"].PropTypes.array,cursor:l["default"].PropTypes.number,data:l["default"].PropTypes.any.isRequired,height:l["default"].PropTypes.number,legend:l["default"].PropTypes.bool,width:l["default"].PropTypes.number},getDefaultProps:function(){return{colors:["#e1002a","#417dc0","#1d9a57","#e9bc2f","#9b3880"],height:200,legend:!1,width:200}},getInitialState:function(){return{fieldsColors:{},height:this.props.height/2,legend:this.props.legend,width:this.props.width/2}},componentWillMount:function(){this.xPosition=0,this.sizeSubscription=p["default"].onSizeChange(this.updateDimensions),p["default"].startListening()},componentDidMount:function(){this.updateDimensions()},componentDidUpdate:function(e,t){this.drawChart()},componentWillUnmount:function(){this.sizeSubscription&&(this.sizeSubscription.unsubscribe(),this.sizeSubscription=null)},toggleLegend:function(){this.setState({legend:!this.state.legend})},updateDimensions:function(){this.xPosition=0;var e=c["default"].findDOMNode(this).parentNode,t=p["default"].getSize(e);return!e||this.state.width===t.clientWidth&&this.state.height===t.clientHeight?!1:(this.setState({width:t.clientWidth,height:t.clientHeight}),!0)},onMove:function(e){this.xPosition=e.clientX-(e.target.getClientRects()[0].x||e.target.getClientRects()[0].left),this.isMounted()&&this.state.legend&&this.drawChart()},drawChart:function(){if(this.props.data){var e=c["default"].findDOMNode(this.refs.canvas).getContext("2d"),t=this.props.data.fields,n=t.length,r={},a=this.xPosition/e.canvas.width;e.canvas.width=this.state.width,e.canvas.height=this.state.height,e.clearRect(0,0,e.canvas.width,e.canvas.height);for(var s=0;n>s;++s)this.drawField(e,s,t[s].data,t[s].range),r[t[s].name]=this.props.colors[s],this.refs.hasOwnProperty(t[s].name)&&(c["default"].findDOMNode(this.refs[t[s].name]).innerHTML=o(t[s].data,a));(0,i["default"])(this.state.fieldsColors,r)||this.setState({fieldsColors:r}),this.state.legend&&(c["default"].findDOMNode(this.refs.xValueLabel).innerHTML=((this.props.data.xRange[1]-this.props.data.xRange[0])*a+this.props.data.xRange[0]).toFixed(5),e.beginPath(),e.lineWidth=1,e.strokeStyle="#000000",e.moveTo(this.xPosition,0),e.lineTo(this.xPosition,e.canvas.height),e.stroke()),void 0!==this.props.cursor&&(e.beginPath(),e.lineWidth=1,e.strokeStyle="#0000FF",e.moveTo(this.props.cursor*e.canvas.width,0),e.lineTo(this.props.cursor*e.canvas.width,e.canvas.height),e.stroke())}},drawField:function(e,t,n,r){function o(e){var t=n[e];return t=t>a?i>t?t:i:a,l-Math.floor((t-a)*d)}for(var a=Number.MAX_VALUE,i=Number.MIN_VALUE,s=e.canvas.width,l=e.canvas.height,u=n.length,c=n.length,f=new Uint16Array(c);c--;){var p=n[c];a=Math.min(a,p),i=Math.max(i,p),f[c]=Math.floor(s*(c/u))}r&&(a=r[0],i=r[1]);var d=l/(i-a);e.beginPath(),e.lineWidth=1,e.strokeStyle=this.props.colors[t],e.moveTo(f[0],o(0));for(var h=1;u>h;h++)isNaN(n[h])?u>h+1&&!isNaN(n[h+1])&&e.moveTo(f[h+1],o(h+1)):e.lineTo(f[h],o(h));return e.stroke(),[a,i]},render:function(){var e=[];for(var t in this.state.fieldsColors){var n=this.state.fieldsColors[t];e.push(l["default"].createElement("li",{className:h["default"].legendItem,key:t},l["default"].createElement("i",{className:h["default"].legendItemColor,style:{color:n}}),l["default"].createElement("b",null,t),l["default"].createElement("span",{className:h["default"].legendItemValue,ref:t})))}return l["default"].createElement("div",{className:h["default"].container},l["default"].createElement("canvas",{className:h["default"].canvas,ref:"canvas",onMouseMove:this.onMove,width:this.state.width,height:this.state.height}),l["default"].createElement("div",{className:this.state.legend?h["default"].legend:h["default"].hidden},l["default"].createElement("div",{className:h["default"].legendBar},l["default"].createElement("span",{className:h["default"].legendText,ref:"xValueLabel"}),l["default"].createElement("i",{className:h["default"].toggleLegendButton,onClick:this.toggleLegend})),l["default"].createElement("ul",{className:h["default"].legendContent},e)),l["default"].createElement("div",{className:this.state.legend?h["default"].hidden:h["default"].legend,onClick:this.toggleLegend},l["default"].createElement("div",{className:h["default"].legendButtons},l["default"].createElement("i",{className:h["default"].toggleLegendButton}))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(714),s=r(i);t["default"]=a["default"].createClass({displayName:"ActionListWidget",propTypes:{list:a["default"].PropTypes.array.isRequired,onClick:a["default"].PropTypes.func},processClick:function(e){for(var t=e.target;!t.dataset.name;)t=t.parentNode;this.props.onClick&&this.props.onClick(t.dataset.name,t.dataset.action,t.dataset.user)},render:function(){var e=this,t=[];return this.props.list.forEach(function(n){t.push(a["default"].createElement("li",{className:s["default"].item,key:n.name,title:n.name,"data-name":n.name,"data-action":n.action||"default","data-user":n.data||"",onClick:e.processClick},a["default"].createElement("i",{className:n.icon}),n.name))}),a["default"].createElement("ul",{className:s["default"].list},t)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i),l=n(744),u=r(l),c=n(717),f=r(c);t["default"]=a["default"].createClass({displayName:"ColorPickerWidget",propTypes:{color:a["default"].PropTypes.array,onChange:a["default"].PropTypes.func,swatch:a["default"].PropTypes.string},getDefaultProps:function(){return{color:[0,0,0],swatch:u["default"]}},getInitialState:function(){return this.image=new Image,this.image.src=this.props.swatch,{swatch:this.props.swatch,color:this.props.color,preview:!1,originalColor:[this.props.color[0],this.props.color[1],this.props.color[2]]}},componentDidMount:function(){var e=s["default"].findDOMNode(this.refs.canvas).getContext("2d");e.fillStyle="rgb("+this.state.originalColor.join(",")+")",e.fillRect(0,0,1,1)},componentDidUpdate:function(e,t){if(e.color[0]===this.props.color[0]&&e.color[1]===this.props.color[1]&&e.color[2]===this.props.color[2]||this.setState({originalColor:this.props.color}),!this.state.preview){var n=s["default"].findDOMNode(this.refs.canvas).getContext("2d");n.fillStyle="rgb("+this.state.originalColor.join(",")+")",n.fillRect(0,0,1,1)}},showColor:function(e){var t=this.state.originalColor,n=s["default"].findDOMNode(this.refs.canvas).getContext("2d");if(e.preventDefault(),"mouseleave"===e.type)return n.fillStyle="rgb("+t.join(",")+")",n.fillRect(0,0,1,1),void this.setState({color:[t[0],t[1],t[2]],preview:!1});var r=s["default"].findDOMNode(this.refs.swatch),o=r.getBoundingClientRect(),a=this.image.width/o.width,i=a*(e.pageX-o.left),l=a*(e.pageY-o.top);n.drawImage(r,i,l,1,1,0,0,1,1),t=n.getImageData(0,0,1,1).data,"click"===e.type?(this.setState({color:[t[0],t[1],t[2]],preview:!1}),this.props.onChange&&this.props.onChange(t)):this.setState({color:[t[0],t[1],t[2]],preview:!0})},rgbColorChange:function(e){var t=this.state.color,n=e.target.value,r=Number(e.target.dataset.colorIdx);t[r]=n;var o=s["default"].findDOMNode(this.refs.canvas).getContext("2d");o.fillStyle="rgb("+t.join(",")+")",o.fillRect(0,0,1,1),this.setState({color:[t[0],t[1],t[2]],preview:!1}),this.props.onChange&&this.props.onChange(t)},updateColor:function(e){this.setState({originalColor:e})},updateSwatch:function(e){this.image.src=e,this.setState({swatch:e})},render:function(){return a["default"].createElement("div",{className:f["default"].container},a["default"].createElement("div",{className:f["default"].activeColor},a["default"].createElement("canvas",{className:f["default"].colorCanvas,ref:"canvas",width:"1",height:"1"}),a["default"].createElement("input",{className:f["default"].colorRGB,type:"number",min:"0",max:"255",value:this.state.color[0],"data-color-idx":"0",onChange:this.rgbColorChange}),a["default"].createElement("input",{className:f["default"].colorRGB,type:"number",min:"0",max:"255",value:this.state.color[1],"data-color-idx":"1",onChange:this.rgbColorChange}),a["default"].createElement("input",{className:f["default"].colorRGB,type:"number",min:"0",max:"255",value:this.state.color[2],"data-color-idx":"2",onChange:this.rgbColorChange})),a["default"].createElement("div",{className:f["default"].swatch},a["default"].createElement("img",{ref:"swatch",className:f["default"].swatchImage,width:"100%",src:this.state.swatch,onClick:this.showColor,onMouseMove:this.showColor,onMouseLeave:this.showColor})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(388),s=r(i),l=n(159),u=r(l);t["default"]=a["default"].createClass({displayName:"CompositePipelineWidget",propTypes:{model:a["default"].PropTypes.object.isRequired},componentDidMount:function(){this.attachListener(this.props.model)},componentWillReceiveProps:function(e){var t=this.props.model,n=e.model;t!==n&&(this.detachListener(),this.attachListener(n))},componentWillUnmount:function(){this.detachListener()},attachListener:function(e){var t=this;this.pipelineSubscription=e.onChange(function(e,n){t.forceUpdate()})},detachListener:function(){this.pipelineSubscription&&(this.pipelineSubscription.unsubscribe(),this.pipelineSubscription=null)},render:function(){var e=this.props.model,t=e.getPipelineDescription();return a["default"].createElement("div",{className:u["default"].container},t.map(function(t,n){return a["default"].createElement(s["default"],{key:n,item:t,layer:t.ids.join(""),model:e})}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i);t["default"]=a["default"].createClass({displayName:"ContentEditableWidget",propTypes:{blurOnEnter:a["default"].PropTypes.bool,className:a["default"].PropTypes.string,html:a["default"].PropTypes.string,onBlur:a["default"].PropTypes.func,onChange:a["default"].PropTypes.func},getDefaultProps:function(){return{blurOnEnter:!1,className:""}},shouldComponentUpdate:function(e){return e.html!==s["default"].findDOMNode(this).innerHTML},componentDidUpdate:function(){this.props.html!==s["default"].findDOMNode(this).innerHTML&&(s["default"].findDOMNode(this).innerHTML=this.props.html)},setFocus:function(){var e=document.createRange();e.selectNodeContents(s["default"].findDOMNode(this));var t=window.getSelection();t.removeAllRanges(),t.addRange(e)},blurEditable:function(e){13===e.charCode&&(s["default"].findDOMNode(this).blur(),window.getSelection().removeAllRanges(),this.props.onBlur&&this.props.onBlur())},emitChange:function(e){var t=s["default"].findDOMNode(this).innerHTML;this.props.onChange&&t!==this.lastHtml&&(e.target={value:t},this.props.onChange(e)),this.lastHtml=t,"blur"===e.type&&this.props.onBlur&&this.props.onBlur()},render:function(){return a["default"].createElement("div",{className:this.props.className,onInput:this.emitChange,onBlur:this.emitChange,onKeyPress:this.props.blurOnEnter?this.blurEditable:function(){},contentEditable:!0,dangerouslySetInnerHTML:{__html:this.props.html}})}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(99),a=r(o),i=n(56),s=r(i),l=n(3),u=r(l),c=n(22),f=r(c),p=n(718),d=r(p);t["default"]=u["default"].createClass({displayName:"Coordinate2DWidget",propTypes:{height:u["default"].PropTypes.number,hideXY:u["default"].PropTypes.bool,onChange:u["default"].PropTypes.func,width:u["default"].PropTypes.number,x:u["default"].PropTypes.number,y:u["default"].PropTypes.number},getDefaultProps:function(){return{width:50,height:50,x:0,y:0}},getInitialState:function(){return{x:this.props.x,y:this.props.y}},componentDidMount:function(){this.drawControl(),this.mouseHandler=new s["default"](f["default"].findDOMNode(this.refs.canvas)),this.mouseHandler.attach({click:this.pointerAction,mousedown:this.pointerAction,mouseup:this.pointerAction,drag:this.pointerAction})},componentDidUpdate:function(e,t){this.drawControl()},componentWillUnmount:function(){this.mouseHandler.destroy()},coordinates:function(){return{x:this.state.x,y:this.state.y}},updateCoordinates:function(e){var t=this,n={},r=!1;["x","y"].forEach(function(o){e.hasOwnProperty(o)&&(n[o]=t.limitValue(parseFloat(e[o])),r=!0)}),r&&this.setState(n)},limitValue:function(e){return Math.max(-1,Math.min(e,1))},updateX:function(e){var t=parseFloat(e.target.value);this.setState({x:t})},updateY:function(e){var t=parseFloat(e.target.value);this.setState({y:t})},pointerAction:function(e){var t=f["default"].findDOMNode(this.refs.canvas).getBoundingClientRect(),n=e.pointers[0].clientX-t.left-this.props.width/2,r=-(e.pointers[0].clientY-t.top-this.props.height/2);this.setState({x:this.limitValue(n/(this.props.width/2)),y:this.limitValue(r/(this.props.height/2))})},drawControl:function(){var e=f["default"].findDOMNode(this.refs.canvas).getContext("2d"),t=e.canvas.height,n=e.canvas.width;if(e.clearRect(0,0,n,t),this.drawPlus("lightgrey"),this.drawPlus("black",{x:this.state.x*(this.props.width/2),y:-this.state.y*(this.props.height/2)}),this.props.onChange){var r={x:this.state.x,y:this.state.y};(0,a["default"])(r,this.lastSharedState)||(this.lastSharedState=r,this.props.onChange(this.lastSharedState))}},drawPlus:function(e,t){var n=f["default"].findDOMNode(this.refs.canvas).getContext("2d"),r=n.canvas.height,o=n.canvas.width,a=5;void 0===t?t={x:o/2,y:r/2}:(t.x+=this.props.width/2,t.y+=this.props.height/2),n.beginPath(),n.lineWidth=2,n.strokeStyle=e,n.moveTo(t.x,t.y-a),n.lineTo(t.x,t.y+a),n.stroke(),n.moveTo(t.x-a,t.y),n.lineTo(t.x+a,t.y),n.stroke()},render:function(){return u["default"].createElement("section",{className:d["default"].container},u["default"].createElement("canvas",{ref:"canvas",className:d["default"].canvas,width:this.props.width,height:this.props.height}),u["default"].createElement("section",{className:this.props.hideXY?d["default"].hidden:d["default"].inputContainer},u["default"].createElement("label",{className:d["default"].inputLabel}," x: "),u["default"].createElement("input",{className:d["default"].input,type:"number",onChange:this.updateX,min:"-1.0",max:"1.0",step:"0.01",value:this.state.x}),u["default"].createElement("br",null),u["default"].createElement("label",{className:d["default"].inputLabel}," y: "),u["default"].createElement("input",{className:d["default"].input,type:"number",onChange:this.updateY,min:"-1.0",max:"1.0",step:"0.01",value:this.state.y})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(720),s=r(i);t["default"]=a["default"].createClass({displayName:"DropDownWidget",propTypes:{field:a["default"].PropTypes.string,fields:a["default"].PropTypes.array,onChange:a["default"].PropTypes.func},getInitialState:function(){return{open:!1,field:this.props.field||this.props.fields[0]}},toggleDropdown:function(){this.setState({open:!this.state.open})},setField:function(e){this.setState({field:e.target.innerHTML}),this.props.onChange(e.target.innerHTML)},getField:function(e){return this.state.field},render:function(){var e=this;return a["default"].createElement("div",{className:s["default"].container,onClick:this.toggleDropdown},this.state.field,a["default"].createElement("ul",{className:this.state.open?s["default"].list:s["default"].hidden},this.props.fields.map(function(t){return"__internal"===t?null:t===e.state.field?a["default"].createElement("li",{className:s["default"].selectedItem,key:t,onClick:e.setField},t):a["default"].createElement("li",{className:s["default"].item,key:t,onClick:e.setField},t)})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(725),s=r(i);t["default"]=a["default"].createClass({displayName:"LayoutsWidget",propTypes:{onChange:a["default"].PropTypes.func},onLayoutChange:function(e){var t=e.currentTarget.getAttribute("name");this.props.onChange&&this.props.onChange(t)},render:function(){return a["default"].createElement("section",null,a["default"].createElement("table",{className:s["default"].table,name:"2x2",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"1x2",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"2x1",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"1x1",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xL",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{rowSpan:"2",className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xT",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{colSpan:"2",className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xR",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{rowSpan:"2",className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xB",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{colSpan:"2",className:s["default"].td})))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(728),s=r(i);t["default"]=a["default"].createClass({displayName:"PresetListWidget",propTypes:{activeName:a["default"].PropTypes.string,height:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,presets:a["default"].PropTypes.object,visible:a["default"].PropTypes.bool},getDefaultProps:function(){return{activeName:"",height:"1em",presets:{},visible:!0}},getInitialState:function(){return{activeName:this.props.activeName}},updateActive:function(e){var t=e.target.dataset.name;this.setState({activeName:t}),this.props.onChange&&this.props.onChange(t)},render:function(){var e=this;if(!this.props.presets||!this.props.visible)return null;var t=this.state.activeName,n=this.props.height,r=this.props.presets,o=Object.keys(r);return a["default"].createElement("div",{className:s["default"].container},a["default"].createElement("div",{className:s["default"].bottomPadding}),o.map(function(o){return a["default"].createElement("img",{ -src:"data:image/png;base64,"+r[o],key:o,style:{height:n},"data-name":o,onClick:e.updateActive,className:o===t?s["default"].activeLine:s["default"].line})}),a["default"].createElement("div",{className:s["default"].bottomPadding}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(137),s=r(i),l=n(118),u=r(l),c=n(167),f=n(730),p=r(f);t["default"]=a["default"].createClass({displayName:"ProxyPropertyGroup",propTypes:{advanced:a["default"].PropTypes.bool,collapsed:a["default"].PropTypes.bool,filter:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,proxy:a["default"].PropTypes.object},getDefaultProps:function(){return{advanced:!1,collapsed:!1}},getInitialState:function(){return{collapsed:this.props.collapsed,changeSet:{},properties:(0,c.proxyToProps)(this.props.proxy)}},componentWillReceiveProps:function(e){var t=this.props.proxy,n=e.proxy;(0,s["default"])(t,n)||this.setState({properties:(0,c.proxyToProps)(n),changeSet:{}})},toggleCollapsedMode:function(){var e=!this.state.collapsed;this.setState({collapsed:e})},valueChange:function(e){var t=this.state.changeSet;t[e.id]=1===e.size&&Array.isArray(e.value)?e.value[0]:e.value,this.setState({changeSet:t}),this.props.onChange&&this.props.onChange(t)},render:function(){var e=this,t={},n={advanced:this.props.advanced,filter:this.props.filter,properties:t},r=Object.keys(this.state.changeSet).length;return this.state.properties.forEach(function(e){t[e.data.id]=e.data.value}),a["default"].createElement("div",{className:p["default"].container},a["default"].createElement("div",{className:p["default"].toolbar,onClick:this.toggleCollapsedMode},a["default"].createElement("i",{className:this.state.collapsed?p["default"].collapedIcon:p["default"].expandedIcon}),a["default"].createElement("span",{className:p["default"].title},this.props.proxy.name),a["default"].createElement("span",{className:r?p["default"].tag:p["default"].emptyTag},a["default"].createElement("i",{className:p["default"].tagBackground}),a["default"].createElement("strong",{className:p["default"].tagCount},r))),a["default"].createElement("div",{className:this.state.collapsed?p["default"].hidden:p["default"].content},this.state.properties.map(function(t){return(0,u["default"])(t,n,e.valueChange)})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(731),l=r(s);t["default"]=i["default"].createClass({displayName:"ScalarRangeWidget",propTypes:{max:i["default"].PropTypes.number,min:i["default"].PropTypes.number,onApply:i["default"].PropTypes.func,visible:i["default"].PropTypes.bool},getInitialState:function(){return{max:this.props.max||1,min:this.props.min||0}},componentWillReceiveProps:function(e){var t=e.min,n=e.max;this.state.min===t&&this.state.max===n||this.setState({min:t,max:n})},updateRange:function(e){var t=e.target.name,n=e.target.value;!isNaN(parseFloat(n))&&isFinite(n)&&this.setState(o({},t,n))},apply:function(e){var t=this.state,n=t.min,r=t.max,o=e.target.dataset.type;n=Number(n),r=Number(r),this.props.onApply&&this.props.onApply({type:o,min:n,max:r})},render:function(){return this.props.visible?i["default"].createElement("div",{className:l["default"].container},i["default"].createElement("input",{className:l["default"].rangeInput,type:"text",pattern:"-*[0-9]*.*[0-9]*",name:"min",value:this.state.min,onChange:this.updateRange}),i["default"].createElement("input",{className:l["default"].rangeInput,type:"text",pattern:"-*[0-9]*.*[0-9]*",name:"max",value:this.state.max,onChange:this.updateRange}),i["default"].createElement("div",{className:l["default"].actionLine},i["default"].createElement("i",{onClick:this.apply,"data-type":"data",className:l["default"].dataRangeIcon}),i["default"].createElement("i",{onClick:this.apply,"data-type":"time",className:l["default"].timeRangeIcon}),i["default"].createElement("i",{onClick:this.apply,"data-type":"custom",className:l["default"].customRangeIcon}))):null}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(732),s=r(i);t["default"]=a["default"].createClass({displayName:"TextInputWidget",propTypes:{className:a["default"].PropTypes.string,name:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,value:a["default"].PropTypes.string},getDefaultProps:function(){return{value:"",className:""}},getInitialState:function(){return{editing:!1,valueRep:this.props.value}},valueChange:function(e){var t=e.target.value;this.setState({editing:!0,valueRep:t})},endEditing:function(){this.setState({editing:!1}),this.props.name?this.props.onChange(this.state.valueRep,this.props.name):this.props.onChange(this.state.valueRep)},render:function(){return a["default"].createElement("div",{className:[s["default"].container,this.props.className].join(" ")},a["default"].createElement("input",{className:s["default"].entry,type:"text",value:this.state.editing?this.state.valueRep:this.props.value,onChange:this.valueChange,onBlur:this.endEditing}),a["default"].createElement("i",{className:this.state.editing?s["default"].editingButton:s["default"].button}))}})},function(e,t,n){var r=n(34),o=n(28),a=n(73);e.exports=function(e){return function(t,n,i){var s,l=r(t),u=o(l.length),c=a(i,u);if(e&&n!=n){for(;u>c;)if(s=l[c++],s!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c;return!e&&-1}}},function(e,t,n){"use strict";var r=n(8),o=n(40),a=n(93),i=n(38),s=n(95),l=n(39),u=n(70),c=n(124),f=n(216),p=n(59)("id"),d=n(27),h=n(12),g=n(94),m=n(31),v=Object.isExtensible||h,_=m?"_s":"size",y=0,b=function(e,t){if(!h(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!d(e,p)){if(!v(e))return"F";if(!t)return"E";o(e,p,++y)}return"O"+e[p]},w=function(e,t){var n,r=b(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,o){var c=e(function(e,a){s(e,c,t),e._i=r.create(null),e._f=void 0,e._l=void 0,e[_]=0,void 0!=a&&u(a,n,e[o],e)});return a(c.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[_]=0},"delete":function(e){var t=this,n=w(t,e);if(n){var r=n.n,o=n.p;delete t._i[n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),t._f==n&&(t._f=r),t._l==n&&(t._l=o),t[_]--}return!!n},forEach:function(e){for(var t,n=i(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!w(this,e)}}),m&&r.setDesc(c.prototype,"size",{get:function(){return l(this[_])}}),c},def:function(e,t,n){var r,o,a=w(e,t);return a?a.v=n:(e._l=a={i:o=b(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[_]++,"F"!==o&&(e._i[o]=a)),e},getEntry:w,setStrong:function(e,t,n){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?f(0,n.k):"values"==t?f(0,n.v):f(0,[n.k,n.v]):(e._t=void 0,f(1))},n?"entries":"values",!n,!0),g(t)}}},function(e,t,n){var r=n(70),o=n(88);e.exports=function(e){return function(){if(o(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return r(this,!1,t.push,t),t}}},function(e,t,n){"use strict";var r=n(40),o=n(93),a=n(13),i=n(12),s=n(95),l=n(70),u=n(87),c=n(27),f=n(59)("weak"),p=Object.isExtensible||i,d=u(5),h=u(6),g=0,m=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},_=function(e,t){return d(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=_(this,e);return t?t[1]:void 0},has:function(e){return!!_(this,e)},set:function(e,t){var n=_(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var a=e(function(e,o){s(e,a,t),e._i=g++,e._l=void 0,void 0!=o&&l(o,n,e[r],e)});return o(a.prototype,{"delete":function(e){return i(e)?p(e)?c(e,f)&&c(e[f],this._i)&&delete e[f][this._i]:m(this)["delete"](e):!1},has:function(e){return i(e)?p(e)?c(e,f)&&c(e[f],this._i):m(this).has(e):!1}}),a},def:function(e,t,n){return p(a(t))?(c(t,f)||r(t,f,{}),t[f][e._i]=n):m(e).set(t,n),e},frozenStore:m,WEAK:f}},function(e,t,n){var r=n(12),o=n(16).document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){"use strict";var r=n(13);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(34),o=n(8).getNames,a={}.toString,i="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(t){return i.slice()}};e.exports.get=function(e){return i&&"[object Window]"==a.call(e)?s(e):o(r(e))}},function(e,t,n){e.exports=n(16).document&&document.documentElement},function(e,t,n){var r=n(71),o=n(14)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},function(e,t,n){var r=n(12),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){var r=n(12),o=n(44),a=n(14)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(13);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){var i=e["return"];throw void 0!==i&&r(i.call(e)),a}}},function(e,t,n){"use strict";var r=n(8),o=n(51),a=n(72),i={};n(40)(i,n(14)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(i,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(8),o=n(34),a=r.isEnum;e.exports=function(e){return function(t){for(var n,i=o(t),s=r.getKeys(i),l=s.length,u=0,c=[];l>u;)a.call(i,n=s[u++])&&c.push(e?[n,i[n]]:i[n]);return c}}},function(e,t,n){var r=n(8),o=n(13),a=n(16).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.getNames(o(e)),n=r.getSymbols;return n?t.concat(n(e)):t}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(16),o="__core-js_shared__",a=r[o]||(r[o]={});e.exports=function(e){return a[e]||(a[e]={})}},function(e,t,n){var r=n(28),o=n(223),a=n(39);e.exports=function(e,t,n,i){var s=String(a(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(l>=c)return s;""==u&&(u=" ");var f=c-l,p=o.call(u,Math.ceil(f/u.length));return p.length>f&&(p=p.slice(0,f)),i?p+s:s+p}},function(e,t,n){"use strict";var r=n(74),o=n(39);e.exports=function(e){var t=String(o(this)),n="",a=r(e);if(0>a||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){var r,o,a,i=n(38),s=n(91),l=n(210),u=n(207),c=n(16),f=c.process,p=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,g=0,m={},v="onreadystatechange",_=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},y=function(e){_.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},d=function(e){delete m[e]},"process"==n(44)(f)?r=function(e){f.nextTick(i(_,e,1))}:h?(o=new h,a=o.port2,o.port1.onmessage=y,r=i(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",y,!1)):r=v in u("script")?function(e){l.appendChild(u("script"))[v]=function(){l.removeChild(this),_.call(e)}}:function(e){setTimeout(i(_,e,1),0)}),e.exports={set:p,clear:d}},function(e,t,n){var r=n(88),o=n(14)("iterator"),a=n(71);e.exports=n(45).getIteratorMethod=function(e){return void 0!=e?e[o]||e["@@iterator"]||a[r(e)]:void 0}},function(e,t,n){"use strict";var r=n(58),o=n(216),a=n(71),i=n(34);e.exports=n(124)(Array,"Array",function(e,t){this._t=i(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){!function(r,o){e.exports=t=o(n(7))}(this,function(e){return function(t){var n=e,r=n.lib,o=r.WordArray,a=r.Hasher,i=n.algo,s=[],l=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;n>=r;r++)if(!(e%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,o=0;64>o;)e(r)&&(8>o&&(s[o]=n(t.pow(r,.5))),l[o]=n(t.pow(r,1/3)),o++),r++}();var u=[],c=i.SHA256=a.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],f=n[6],p=n[7],d=0;64>d;d++){if(16>d)u[d]=0|e[t+d];else{var h=u[d-15],g=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,m=u[d-2],v=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[d]=g+u[d-7]+v+u[d-16]}var _=s&c^~s&f,y=r&o^r&a^o&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),x=p+w+_+l[d]+u[d],C=b+y;p=f,f=c,c=s,s=i+x|0,i=a,a=o,o=r,r=x+C|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+a|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+f|0,n[7]=n[7]+p|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=t.floor(r/4294967296),n[(o+64>>>9<<4)+15]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=a._createHelper(c),n.HmacSHA256=a._createHmacHelper(c)}(Math),e.SHA256})},function(e,t,n){!function(r,o,a){e.exports=t=o(n(7),n(97))}(this,function(e){return function(){function t(){return i.create.apply(i,arguments)}var n=e,r=n.lib,o=r.Hasher,a=n.x64,i=a.Word,s=a.WordArray,l=n.algo,u=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],c=[];!function(){for(var e=0;80>e;e++)c[e]=t()}();var f=l.SHA512=o.extend({_doReset:function(){this._hash=new s.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],a=n[2],i=n[3],s=n[4],l=n[5],f=n[6],p=n[7],d=r.high,h=r.low,g=o.high,m=o.low,v=a.high,_=a.low,y=i.high,b=i.low,w=s.high,x=s.low,C=l.high,E=l.low,T=f.high,P=f.low,k=p.high,M=p.low,S=d,D=h,R=g,A=m,I=v,O=_,N=y,F=b,L=w,B=x,j=C,W=E,U=T,V=P,z=k,q=M,H=0;80>H;H++){var X=c[H];if(16>H)var G=X.high=0|e[t+2*H],Y=X.low=0|e[t+2*H+1];else{var Q=c[H-15],K=Q.high,Z=Q.low,J=(K>>>1|Z<<31)^(K>>>8|Z<<24)^K>>>7,$=(Z>>>1|K<<31)^(Z>>>8|K<<24)^(Z>>>7|K<<25),ee=c[H-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,oe=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),ae=c[H-7],ie=ae.high,se=ae.low,le=c[H-16],ue=le.high,ce=le.low,Y=$+se,G=J+ie+($>>>0>Y>>>0?1:0),Y=Y+oe,G=G+re+(oe>>>0>Y>>>0?1:0),Y=Y+ce,G=G+ue+(ce>>>0>Y>>>0?1:0);X.high=G,X.low=Y}var fe=L&j^~L&U,pe=B&W^~B&V,de=S&R^S&I^R&I,he=D&A^D&O^A&O,ge=(S>>>28|D<<4)^(S<<30|D>>>2)^(S<<25|D>>>7),me=(D>>>28|S<<4)^(D<<30|S>>>2)^(D<<25|S>>>7),ve=(L>>>14|B<<18)^(L>>>18|B<<14)^(L<<23|B>>>9),_e=(B>>>14|L<<18)^(B>>>18|L<<14)^(B<<23|L>>>9),ye=u[H],be=ye.high,we=ye.low,xe=q+_e,Ce=z+ve+(q>>>0>xe>>>0?1:0),xe=xe+pe,Ce=Ce+fe+(pe>>>0>xe>>>0?1:0),xe=xe+we,Ce=Ce+be+(we>>>0>xe>>>0?1:0),xe=xe+Y,Ce=Ce+G+(Y>>>0>xe>>>0?1:0),Ee=me+he,Te=ge+de+(me>>>0>Ee>>>0?1:0);z=U,q=V,U=j,V=W,j=L,W=B,B=F+xe|0,L=N+Ce+(F>>>0>B>>>0?1:0)|0,N=I,F=O,I=R,O=A,R=S,A=D,D=xe+Ee|0,S=Ce+Te+(xe>>>0>D>>>0?1:0)|0}h=r.low=h+D,r.high=d+S+(D>>>0>h>>>0?1:0),m=o.low=m+A,o.high=g+R+(A>>>0>m>>>0?1:0),_=a.low=_+O,a.high=v+I+(O>>>0>_>>>0?1:0),b=i.low=b+F,i.high=y+N+(F>>>0>b>>>0?1:0),x=s.low=x+B,s.high=w+L+(B>>>0>x>>>0?1:0),E=l.low=E+W,l.high=C+j+(W>>>0>E>>>0?1:0),P=f.low=P+V,f.high=T+U+(V>>>0>P>>>0?1:0),M=p.low=M+q,p.high=k+z+(q>>>0>M>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),t[(r+128>>>10<<5)+31]=n,e.sigBytes=4*t.length,this._process();var o=this._hash.toX32();return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});n.SHA512=o._createHelper(f),n.HmacSHA512=o._createHmacHelper(f)}(),e.SHA512})},function(e,t,n){"use strict";var r=n(35),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,a=t;if(n=!1,r&&a){if(r===a)return!0;if(o(r))return!1;if(o(a)){e=r,t=a.parentNode,n=!0;continue e}return r.contains?r.contains(a):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(a)):!1}return!1}}var o=n(609);e.exports=r},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){return i?void 0:a(!1),p.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?i.innerHTML="":i.innerHTML="<"+e+">",s[e]=!i.firstChild),s[e]?p[e]:null}var o=n(20),a=n(5),i=o.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],u=[1,"","
"],c=[3,"","
"],f=[1,'',""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){p[e]=f,s[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=r.bind(t),i=0;i0&&(i=1/Math.sqrt(i),e[0]=n*i,e[1]=r*i,e[2]=o*i,e[3]=a*i),e},o.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},o.lerp=function(e,t,n,r){var o=t[0],a=t[1],i=t[2],s=t[3];return e[0]=o+r*(n[0]-o),e[1]=a+r*(n[1]-a),e[2]=i+r*(n[2]-i),e[3]=s+r*(n[3]-s),e},o.random=function(e,t){return t=t||1,e[0]=r.RANDOM(),e[1]=r.RANDOM(),e[2]=r.RANDOM(),e[3]=r.RANDOM(),o.normalize(e,e),o.scale(e,e,t),e},o.transformMat4=function(e,t,n){var r=t[0],o=t[1],a=t[2],i=t[3];return e[0]=n[0]*r+n[4]*o+n[8]*a+n[12]*i,e[1]=n[1]*r+n[5]*o+n[9]*a+n[13]*i,e[2]=n[2]*r+n[6]*o+n[10]*a+n[14]*i,e[3]=n[3]*r+n[7]*o+n[11]*a+n[15]*i,e},o.transformQuat=function(e,t,n){var r=t[0],o=t[1],a=t[2],i=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*a-l*o,f=u*o+l*r-i*a,p=u*a+i*o-s*r,d=-i*r-s*o-l*a;return e[0]=c*u+d*-i+f*-l-p*-s,e[1]=f*u+d*-s+p*-i-c*-l,e[2]=p*u+d*-l+c*-s-f*-i,e[3]=t[3],e},o.forEach=function(){var e=o.create();return function(t,n,r,o,a,i){var s,l;for(n||(n=4),r||(r=0),l=o?Math.min(o*n+r,t.length):t.length,s=r;l>s;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,i),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}(),o.str=function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},e.exports=o},function(e,t,n){function r(e,t){if(null==e)return o;switch(typeof e){case"function":return"undefined"!=typeof t?function(n,r,o){return e.call(t,n,r,o)}:e;case"object":return function(t){return i(t,e)};case"string":case"number":return a(e)}}var o=n(622),a=n(623),i=n(627);e.exports=r},function(e,t,n){function r(e){var t=[];return o(e,function(e,n){t.push(e)}),t}var o=n(135);e.exports=r},function(e,t,n){var r,o;r=[n(633)],o=function(e){function t(t,n){return-1!==e(t,n)}return t}.apply(t,r),!(void 0!==o&&(e.exports=o))},function(e,t,n){var r,o;r=[n(634),n(635),n(637)],o=function(e,t,n){function r(r,o){if(null==r)return e;switch(typeof r){case"function":return"undefined"!=typeof o?function(e,t,n){return r.call(o,e,t,n)}:r;case"object":return function(e){return n(e,r)};case"string":case"number":return t(r)}}return r}.apply(t,r),!(void 0!==o&&(e.exports=o))},function(e,t,n){var r,o;r=[n(636),n(100),n(138),n(246)],o=function(e,t,n,r){function o(t,r){switch(n(t)){case"Object":return a(t,r);case"Array":return i(t,r);default:return e(t)}}function a(e,n){if(r(e)){var a={};return t(e,function(e,t){this[t]=o(e,n)},a),a}return n?n(e):e}function i(e,t){for(var n=[],r=-1,a=e.length;++r=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=n(646),a=n(266),i=n(29),s=n(110),l=n(154),u=n(5),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:l,processUpdates:function(e,t){for(var n,i=null,c=null,f=0;f-1?void 0:i(!1),!u.plugins[n]){t.extractEvents?void 0:i(!1),u.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i(!1)}}}function o(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?i(!1):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];a(s,t,n)}return!0}return e.registrationName?(a(e.registrationName,t,n),!0):!1}function a(e,t,n){u.registrationNameModules[e]?i(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=n(5),s=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?i(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];l.hasOwnProperty(n)&&l[n]===o||(l[n]?i(!1):void 0,l[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=u},function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"//")}function o(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function i(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);v(e,a,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function l(e,t,n){var o=e.result,a=e.keyPrefix,i=e.func,s=e.context,l=i.call(s,t,e.count++);Array.isArray(l)?u(l,o,n,m.thatReturnsArgument):null!=l&&(g.isValidElement(l)&&(l=g.cloneAndReplaceKey(l,a+(l!==t?r(l.key||"")+"/":"")+n)),o.push(l))}function u(e,t,n,o,a){var i="";null!=n&&(i=r(n)+"/");var u=s.getPooled(t,i,o,a);v(e,l,u),s.release(u)}function c(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),r}function f(e,t,n){return null}function p(e,t){return v(e,f,null)}function d(e){var t=[];return u(e,t,null,m.thatReturnsArgument),t}var h=n(48),g=n(24),m=n(35),v=n(156),_=h.twoArgumentPooler,y=h.fourArgumentPooler,b=/\/(?!\/)/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,_),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,y);var w={forEach:i,map:c,mapIntoWithKeyPrefixInternal:u,count:p,toArray:d};e.exports=w},function(e,t,n){"use strict"; -function r(e,t){var n=x.hasOwnProperty(t)?x[t]:null;E.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?m(!1):void 0),e.hasOwnProperty(t)&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?m(!1):void 0)}function o(e,t){if(t){"function"==typeof t?m(!1):void 0,p.isValidElement(t)?m(!1):void 0;var n=e.prototype;t.hasOwnProperty(y)&&C.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==y){var a=t[o];if(r(n,o),C.hasOwnProperty(o))C[o](e,a);else{var i=x.hasOwnProperty(o),u=n.hasOwnProperty(o),c="function"==typeof a,f=c&&!i&&!u&&t.autobind!==!1;if(f)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[o]=a,n[o]=a;else if(u){var d=x[o];!i||d!==b.DEFINE_MANY_MERGED&&d!==b.DEFINE_MANY?m(!1):void 0,d===b.DEFINE_MANY_MERGED?n[o]=s(n[o],a):d===b.DEFINE_MANY&&(n[o]=l(n[o],a))}else n[o]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in C;o?m(!1):void 0;var a=n in e;a?m(!1):void 0,e[n]=r}}}function i(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:m(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?m(!1):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,n)}}var f=n(253),p=n(24),d=(n(105),n(104),n(268)),h=n(10),g=n(75),m=n(5),v=n(98),_=n(47),y=(n(9),_({mixins:null})),b=v({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),w=[],x={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},C={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n"+s+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=i.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(30),a=n(107),i=n(10),s=n(35),l={initialize:s,close:function(){p.isBatchingUpdates=!1}},u={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[u,l];i(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var f=new r,p={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=p.isBatchingUpdates;p.isBatchingUpdates=!0,i?e(t,n,r,o,a):f.perform(e,null,t,n,r,o,a)}};e.exports=p},function(e,t,n){"use strict";function r(){if(!T){T=!0,v.EventEmitter.injectReactEventListener(m),v.EventPluginHub.injectEventPluginOrder(s),v.EventPluginHub.injectInstanceHandle(_),v.EventPluginHub.injectMount(y),v.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:C,EnterLeaveEventPlugin:l,ChangeEventPlugin:a,SelectEventPlugin:w,BeforeInputEventPlugin:o}),v.NativeComponent.injectGenericComponentClass(h),v.NativeComponent.injectTextComponentClass(g),v.Class.injectMixin(f),v.DOMProperty.injectDOMPropertyConfig(c),v.DOMProperty.injectDOMPropertyConfig(E),v.EmptyComponent.injectEmptyComponent("noscript"),v.Updates.injectReconcileTransaction(b),v.Updates.injectBatchingStrategy(d),v.RootIndex.injectCreateReactRootIndex(u.canUseDOM?i.createReactRootIndex:x.createReactRootIndex),v.Component.injectEnvironment(p)}}var o=n(642),a=n(644),i=n(645),s=n(647),l=n(648),u=n(20),c=n(651),f=n(653),p=n(142),d=n(258),h=n(657),g=n(257),m=n(665),v=n(666),_=n(64),y=n(23),b=n(670),w=n(676),x=n(677),C=n(678),E=n(675),T=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){if(f.current){var e=f.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;a("uniqueKey",e,t)}}function a(e,t,n){var o=r();if(!o){var a="string"==typeof n?n:n.displayName||n.name;a&&(o=" Check the top-level render call using <"+a+">.")}var i=h[e]||(h[e]={});if(i[o])return null;i[o]=!0;var s={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==f.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function i(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=a},function(e,t,n){"use strict";var r=n(98),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=f[t];return null==n&&(f[t]=n=u(t)),n}function o(e){return c?void 0:l(!1),new c(e.type,e.props)}function a(e){return new p(e)}function i(e){return e instanceof p}var s=n(10),l=n(5),u=null,c=null,f={},p=null,d={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){p=e},injectComponentClasses:function(e){s(f,e)}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:a,isTextComponent:i,injection:d};e.exports=h},function(e,t,n){"use strict";function r(e,t){}var o=(n(9),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});e.exports=o},function(e,t,n){"use strict";function r(e){function t(t,n,r,o,a,i){if(o=o||x,i=i||r,null==n[r]){var s=y[a];return t?new Error("Required "+s+" `"+i+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,a,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,a){var i=t[n],s=g(i);if(s!==e){var l=y[o],u=m(i);return new Error("Invalid "+l+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function a(){return r(b.thatReturns(null))}function i(e){function t(t,n,r,o,a){var i=t[n];if(!Array.isArray(i)){var s=y[o],l=g(i);return new Error("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>"}var _=n(24),y=n(104),b=n(35),w=n(151),x="<>",C={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:a(),arrayOf:i,element:s(),instanceOf:l,node:p(),objectOf:c,oneOf:u,oneOfType:f,shape:d};e.exports=C},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==t?o(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=n(5);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=n(20),a=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t){e.exports="\nprecision mediump float;\n\nuniform sampler2D compositeSampler;\nuniform sampler2D layerSampler;\nvarying vec2 v_texCoord;\n\nvoid main() {\n // Sample the texture containing what we have composited so far\n vec4 color = texture2D(compositeSampler, v_texCoord);\n\n // Sample the new layer to be composited in\n vec4 compColor = texture2D(layerSampler, v_texCoord);\n\n/*\n // Choose the fragment with the greater depth value\n if (color.a > compColor.a) {\n gl_FragColor = color;\n } else {\n gl_FragColor = compColor;\n }\n*/\n\n // Another way to choose the fragment with the greater depth value\n float stepVal = step((compColor.a - color.a), 0.0);\n gl_FragColor = (stepVal * color) + ((1.0 - stepVal) * compColor);\n\n}\n"},function(e,t){e.exports='\nprecision mediump float;\n\nuniform sampler2D underLayerSampler;\nuniform sampler2D overLayerSampler;\nvarying vec2 v_texCoord;\n\nvoid main() {\n vec4 overColor = texture2D(overLayerSampler, v_texCoord);\n vec3 colA = overColor.rgb;\n float alphA = overColor.a;\n\n vec4 underColor = texture2D(underLayerSampler, v_texCoord);\n vec3 colB = underColor.rgb;\n float alphB = underColor.a;\n\n // Well-known "over" operator (A over B, both partially transparent)\n float alphOut = alphA + (alphB * (1.0 - alphA));\n vec3 colOut = ((colA * alphA) + (colB * alphB * (1.0 - alphA))) / alphOut;\n\n gl_FragColor = vec4(colOut.rgb, alphOut);\n}'},function(e,t){e.exports="\nprecision mediump float;\n\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, vec2(v_texCoord.x, 1.0 - v_texCoord.y));\n}"},function(e,t,n){var r=n(566);"string"==typeof r&&(r=[[e.id,r,""]]);n(6)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(580);"string"==typeof r&&(r=[[e.id,r,""]]);n(6)(r,{});r.locals&&(e.exports=r.locals)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r;/** @license MIT License (c) copyright 2013-2014 original author or authors */ +!function(o){"use strict";r=function(){function e(e,n){function r(t,r,a){var i=e._defer(),s=a.length,l=new Array(s);return o({f:t,thisArg:r,args:a,params:l,i:s-1,call:n},i._handler),i}function o(t,r){if(t.i<0)return n(t.f,t.thisArg,t.params,r);var o=e._handler(t.args[t.i]);o.fold(a,t,void 0,r)}function a(e,t,n){e.params[e.i]=t,e.i-=1,o(e,n)}return arguments.length<2&&(n=t),r}function t(e,t,n,r){try{r.resolve(e.apply(t,n))}catch(o){r.reject(o)}}return e.tryCatchResolve=t,e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(n(11))},function(e,t,n){(function(e){n(291);var r=n(615),o=n(49);"AUTOBAHN_DEBUG"in e&&AUTOBAHN_DEBUG&&(n(763),"console"in e&&console.log("AutobahnJS debug enabled"));var a=n(67),i=n(54),s=n(163),l=n(290),u=n(289),c=n(288),f=n(287);t.version=r.version,t.transports=u.transports,t.Connection=l.Connection,t.Session=s.Session,t.Invocation=s.Invocation,t.Event=s.Event,t.Result=s.Result,t.Error=s.Error,t.Subscription=s.Subscription,t.Registration=s.Registration,t.Publication=s.Publication,t.auth_persona=c.auth,t.auth_cra=f,t.when=o,t.util=a,t.log=i}).call(t,function(){return this}())},function(e,t,n){(function(e){function r(){return Math.floor(9007199254740992*Math.random())}var o=(n(49),n(282)),a=n(54),i=n(67);Date.now=Date.now||function(){return+new Date};var s={caller:{features:{caller_identification:!0,progressive_call_results:!0}},callee:{features:{progressive_call_results:!0}},publisher:{features:{subscriber_blackwhite_listing:!0,publisher_exclusion:!0,publisher_identification:!0}},subscriber:{features:{publisher_identification:!0}}},l=function(e,t,n){var r=this;r.caller=e,r.progress=t,r.procedure=n},u=function(e,t,n){var r=this;r.publication=e,r.publisher=t,r.topic=n},c=function(e,t){var n=this;n.args=e||[],n.kwargs=t||{}},f=function(e,t,n){var r=this;r.error=e,r.args=t||[],r.kwargs=n||{}},p=function(e,t,n,r,o){var a=this;a.topic=e,a.handler=t,a.options=n||{},a.session=r,a.id=o,a.active=!0};p.prototype.unsubscribe=function(){var e=this;return e.session.unsubscribe(e)};var d=function(e,t,n,r,o){var a=this;a.procedure=e,a.endpoint=t,a.options=n||{},a.session=r,a.id=o,a.active=!0};d.prototype.unregister=function(){var e=this;return e.session.unregister(e)};var h=function(e){var t=this;t.id=e},g={HELLO:1,WELCOME:2,ABORT:3,CHALLENGE:4,AUTHENTICATE:5,GOODBYE:6,HEARTBEAT:7,ERROR:8,PUBLISH:16,PUBLISHED:17,SUBSCRIBE:32,SUBSCRIBED:33,UNSUBSCRIBE:34,UNSUBSCRIBED:35,EVENT:36,CALL:48,CANCEL:49,RESULT:50,REGISTER:64,REGISTERED:65,UNREGISTER:66,UNREGISTERED:67,INVOCATION:68,INTERRUPT:69,YIELD:70},m=function(t,n,r){var i=this;i._socket=t,i._defer=n,i._onchallenge=r,i._id=null,i._realm=null,i._features=null,i._goodbye_sent=!1,i._transport_is_closing=!1,i._publish_reqs={},i._subscribe_reqs={},i._unsubscribe_reqs={},i._call_reqs={},i._register_reqs={},i._unregister_reqs={},i._subscriptions={},i._registrations={},i._invocations={},i._prefixes={},i._send_wamp=function(e){i._socket.send(e)},i._protocol_violation=function(e){a.debug("failing transport due to protocol violation: "+e),i._socket.close(1002,"protocol violation: "+e)},i._MESSAGE_MAP={},i._MESSAGE_MAP[g.ERROR]={},i._process_SUBSCRIBED=function(e){var t=e[1],n=e[2];if(t in i._subscribe_reqs){var r=i._subscribe_reqs[t],o=r[0],a=r[1],s=r[2],l=r[3];n in i._subscriptions||(i._subscriptions[n]=[]);var u=new p(a,s,l,i,n);i._subscriptions[n].push(u),o.resolve(u),delete i._subscribe_reqs[t]}else i._protocol_violation("SUBSCRIBED received for non-pending request ID "+t)},i._MESSAGE_MAP[g.SUBSCRIBED]=i._process_SUBSCRIBED,i._process_SUBSCRIBE_ERROR=function(e){var t=e[2];if(t in i._subscribe_reqs){var n=(e[3],new f(e[4],e[5],e[6])),r=i._subscribe_reqs[t],o=r[0];o.reject(n),delete i._subscribe_reqs[t]}else i._protocol_violation("SUBSCRIBE-ERROR received for non-pending request ID "+t)},i._MESSAGE_MAP[g.ERROR][g.SUBSCRIBE]=i._process_SUBSCRIBE_ERROR,i._process_UNSUBSCRIBED=function(e){var t=e[1];if(t in i._unsubscribe_reqs){var n=i._unsubscribe_reqs[t],r=n[0],o=n[1];if(o in i._subscriptions){for(var a=i._subscriptions[o],s=0;s1||Object.keys(o).length>0?a=new c(r,o):r.length>0&&(a=r[0]);var s=i._call_reqs[t],l=s[0],u=s[1];n.progress?u&&u.receive_progress&&l.notify(a):(l.resolve(a),delete i._call_reqs[t])}else i._protocol_violation("CALL-RESULT received for non-pending request ID "+t)},i._MESSAGE_MAP[g.RESULT]=i._process_RESULT,i._process_CALL_ERROR=function(e){var t=e[2];if(t in i._call_reqs){var n=(e[3],new f(e[4],e[5],e[6])),r=i._call_reqs[t],o=r[0];r[1];o.reject(n),delete i._call_reqs[t]}else i._protocol_violation("CALL-ERROR received for non-pending request ID "+t)},i._MESSAGE_MAP[g.ERROR][g.CALL]=i._process_CALL_ERROR,i._process_INVOCATION=function(e){var t=e[1],n=e[2],r=e[3];if(n in i._registrations){var a=i._registrations[n].endpoint,s=e[4]||[],u=e[5]||{},p=null;r.receive_progress&&(p=function(e,n){var r=[g.YIELD,t,{progress:!0}];e=e||[],n=n||{};var o=Object.keys(n).length;(e.length||o)&&(r.push(e),o&&r.push(n)),i._send_wamp(r)});var d=new l(r.caller,p,r.procedure);o.call(a,s,u,d).then(function(e){var n=[g.YIELD,t,{}];if(e instanceof c){var r=Object.keys(e.kwargs).length;(e.args.length||r)&&(n.push(e.args),r&&n.push(e.kwargs))}else n.push([e]);i._send_wamp(n)},function(e){var n=[g.ERROR,g.INVOCATION,t,{}];if(e instanceof f){n.push(e.error);var r=Object.keys(e.kwargs).length;(e.args.length||r)&&(n.push(e.args),r&&n.push(e.kwargs))}else n.push("wamp.error.runtime_error"),n.push([e]);i._send_wamp(n)})}else i._protocol_violation("INVOCATION received for non-registered registration ID "+t)},i._MESSAGE_MAP[g.INVOCATION]=i._process_INVOCATION,i._socket.onmessage=function(e){var t=e[0];if(i._id)if(t===g.GOODBYE){if(!i._goodbye_sent){var n=[g.GOODBYE,{},"wamp.error.goodbye_and_out"];i._send_wamp(n)}i._id=null,i._realm=null,i._features=null;var r=e[1],l=e[2];i.onleave&&i.onleave(l,r)}else if(t===g.ERROR){var u=e[1];u in i._MESSAGE_MAP[g.ERROR]?i._MESSAGE_MAP[t][u](e):i._protocol_violation("unexpected ERROR message with request_type "+u)}else t in i._MESSAGE_MAP?i._MESSAGE_MAP[t](e):i._protocol_violation("unexpected message type "+t);else if(t===g.WELCOME){i._id=e[1];var c=e[2];if(i._features={},c.roles.broker&&(i._features.subscriber={},i._features.publisher={},c.roles.broker.features)){for(var f in s.publisher.features)i._features.publisher[f]=s.publisher.features[f]&&c.roles.broker.features[f];for(var f in s.subscriber.features)i._features.subscriber[f]=s.subscriber.features[f]&&c.roles.broker.features[f]}if(c.roles.dealer&&(i._features.caller={},i._features.callee={},c.roles.dealer.features)){for(var f in s.caller.features)i._features.caller[f]=s.caller.features[f]&&c.roles.dealer.features[f];for(var f in s.callee.features)i._features.callee[f]=s.callee.features[f]&&c.roles.dealer.features[f]}i.onjoin&&i.onjoin(e[2])}else if(t===g.ABORT){var r=e[1],l=e[2];i.onleave&&i.onleave(l,r)}else if(t===g.CHALLENGE)if(i._onchallenge){var p=e[1],d=e[2];o.call(i._onchallenge,i,p,d).then(function(e){var t=[g.AUTHENTICATE,e,{}];i._send_wamp(t)},function(e){a.debug("onchallenge() raised:",e);var t=[g.ABORT,{message:"sorry, I cannot authenticate (onchallenge handler raised an exception)"},"wamp.error.cannot_authenticate"];i._send_wamp(t),i._socket.close(1e3)})}else{a.debug("received WAMP challenge, but no onchallenge() handler set");var e=[g.ABORT,{message:"sorry, I cannot authenticate (no onchallenge handler set)"},"wamp.error.cannot_authenticate"];i._send_wamp(e),i._socket.close(1e3)}else i._protocol_violation("unexpected message type "+t)},"performance"in e&&"now"in performance?i._created=performance.now():i._created=Date.now()};Object.defineProperty(m.prototype,"defer",{get:function(){return this._defer}}),Object.defineProperty(m.prototype,"id",{get:function(){return this._id}}),Object.defineProperty(m.prototype,"realm",{get:function(){return this._realm}}),Object.defineProperty(m.prototype,"isOpen",{get:function(){return null!==this.id}}),Object.defineProperty(m.prototype,"features",{get:function(){return this._features}}),Object.defineProperty(m.prototype,"subscriptions",{get:function(){for(var e=Object.keys(this._subscriptions),t=[],n=0;n must be a string"),i.assert(!t||Array.isArray(t),"Session.join: must be an array []"),i.assert(!n||"string"==typeof n,"Session.join: must be a string");var r=this;if(r.isOpen)throw"session already open";r._goodbye_sent=!1,r._realm=e;var o={};o.roles=s,t&&(o.authmethods=t),n&&(o.authid=n);var a=[g.HELLO,e,o];r._send_wamp(a)},m.prototype.leave=function(e,t){i.assert(!e||"string"==typeof e,"Session.leave: must be a string"),i.assert(!t||"string"==typeof t,"Session.leave: must be a string");var n=this;if(!n.isOpen)throw"session not open";e||(e="wamp.close.normal");var r={};t&&(r.message=t);var o=[g.GOODBYE,r,e];n._send_wamp(o),n._goodbye_sent=!0},m.prototype.call=function(e,t,n,o){i.assert("string"==typeof e,"Session.call: must be a string"),i.assert(!t||Array.isArray(t),"Session.call: must be an array []"),i.assert(!n||n instanceof Object,"Session.call: must be an object {}"),i.assert(!o||o instanceof Object,"Session.call: must be an object {}");var a=this;if(!a.isOpen)throw"session not open";var s=r(),l=a._defer();a._call_reqs[s]=[l,o];var u=[g.CALL,s,o||{},a.resolve(e)];return t&&(u.push(t),n&&u.push(n)),a._send_wamp(u),l.promise.then?l.promise:l},m.prototype.publish=function(e,t,n,o){i.assert("string"==typeof e,"Session.publish: must be a string"),i.assert(!t||Array.isArray(t),"Session.publish: must be an array []"),i.assert(!n||n instanceof Object,"Session.publish: must be an object {}"),i.assert(!o||o instanceof Object,"Session.publish: must be an object {}");var a=this;if(!a.isOpen)throw"session not open";var s=o&&o.acknowledge,l=null,u=r();s&&(l=a._defer(),a._publish_reqs[u]=[l,o]);var c=[g.PUBLISH,u,o||{},a.resolve(e)];return t&&(c.push(t),n&&c.push(n)),a._send_wamp(c),l?l.promise.then?l.promise:l:void 0},m.prototype.subscribe=function(e,t,n){i.assert("string"==typeof e,"Session.subscribe: must be a string"),i.assert("function"==typeof t,"Session.subscribe: must be a function"),i.assert(!n||n instanceof Object,"Session.subscribe: must be an object {}");var o=this;if(!o.isOpen)throw"session not open";var a=r(),s=o._defer();o._subscribe_reqs[a]=[s,e,t,n];var l=[g.SUBSCRIBE,a];return n?l.push(n):l.push({}),l.push(o.resolve(e)),o._send_wamp(l),s.promise.then?s.promise:s},m.prototype.register=function(e,t,n){i.assert("string"==typeof e,"Session.register: must be a string"),i.assert("function"==typeof t,"Session.register: must be a function"),i.assert(!n||n instanceof Object,"Session.register: must be an object {}");var o=this;if(!o.isOpen)throw"session not open";var a=r(),s=o._defer();o._register_reqs[a]=[s,e,t,n];var l=[g.REGISTER,a];return n?l.push(n):l.push({}),l.push(o.resolve(e)),o._send_wamp(l),s.promise.then?s.promise:s},m.prototype.unsubscribe=function(e){i.assert(e instanceof p,"Session.unsubscribe: must be an instance of class autobahn.Subscription");var t=this;if(!t.isOpen)throw"session not open";if(!(e.active&&e.id in t._subscriptions))throw"subscription not active";var n=t._subscriptions[e.id],o=n.indexOf(e);if(-1===o)throw"subscription not active";n.splice(o,1),e.active=!1;var a=t._defer();if(n.length)a.resolve(!1);else{var s=r();t._unsubscribe_reqs[s]=[a,e.id];var l=[g.UNSUBSCRIBE,s,e.id];t._send_wamp(l)}return a.promise.then?a.promise:a},m.prototype.unregister=function(e){i.assert(e instanceof d,"Session.unregister: must be an instance of class autobahn.Registration");var t=this;if(!t.isOpen)throw"session not open";if(!(e.active&&e.id in t._registrations))throw"registration not active";var n=r(),o=t._defer();t._unregister_reqs[n]=[o,e];var a=[g.UNREGISTER,n,e.id];return t._send_wamp(a),o.promise.then?o.promise:o},m.prototype.prefix=function(e,t){i.assert("string"==typeof e,"Session.prefix: must be a string"),i.assert(!t||"string"==typeof t,"Session.prefix: must be a string or falsy");var n=this;t?n._prefixes[e]=t:e in n._prefixes&&delete n._prefixes[e]},m.prototype.resolve=function(e){i.assert("string"==typeof e,"Session.resolve: must be a string");var t=this,n=e.indexOf(":");if(n>=0){var r=e.substring(0,n);if(r in t._prefixes)return t._prefixes[r]+"."+e.substring(n+1);throw"cannot resolve CURIE prefix '"+r+"'"}return e},t.Session=m,t.Invocation=l,t.Event=u,t.Result=c,t.Error=f,t.Subscription=p,t.Registration=d,t.Publication=h}).call(t,function(){return this}())},function(e,t,n){"use strict";var r=n(36),o=n(308),a=n(313),i=n(165),s=n(312),l=window.btoa||n(307);e.exports=function(e,t,u){var c=u.data,f=u.headers;r.isFormData(c)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(!window.XDomainRequest||"withCredentials"in p||s(u.url)||(p=new window.XDomainRequest),u.auth){var d=u.auth.username||"",h=u.auth.password||"";f.Authorization="Basic "+l(d+":"+h)}if(p.open(u.method.toUpperCase(),o(u.url,u.params,u.paramsSerializer),!0),p.timeout=u.timeout,p.onload=function(){if(p){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r=-1!==["text",""].indexOf(u.responseType||"")?p.responseText:p.response,o={data:i(r,n,u.transformResponse),status:p.status,statusText:p.statusText,headers:n,config:u};(p.status>=200&&p.status<300||!("status"in p)&&p.responseText?e:t)(o),p=null}},r.isStandardBrowserEnv()){var g=n(310),m=u.withCredentials||s(u.url)?g.read(u.xsrfCookieName):void 0;m&&(f[u.xsrfHeaderName]=m)}if("setRequestHeader"in p&&r.forEach(f,function(e,t){"undefined"==typeof c&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),u.withCredentials&&(p.withCredentials=!0),u.responseType)try{p.responseType=u.responseType}catch(v){if("json"!==p.responseType)throw v}r.isArrayBuffer(c)&&(c=new DataView(c)),p.send(c)}},function(e,t,n){"use strict";var r=n(36);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return(t-e)*n+e}function i(e,t,n){var r=(n-e[0])/(t[0]-e[0]);return[a(e[1],t[1],r),a(e[2],t[2],r),a(e[3],t[3],r),255]}function s(e,t){return[e[t].x,e[t].r,e[t].g,e[t].b]}function l(e,t){return e.x-t.x}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;nr;r++)this.controlPoints.push({x:t[r].x,r:t[r].r,g:t[r].g,b:t[r].b});this.build(),this.emit(h,{change:"preset",lut:this})}},{key:"updateControlPoints",value:function(e){this.colorTable=null,this.controlPoints=[];for(var t=e.length,n=0;t>n;n++)this.controlPoints.push({x:e[n].x,r:e[n].r,g:e[n].g,b:e[n].b});this.build(),this.emit(h,{change:"controlPoints",lut:this})}},{key:"setColorForNaN",value:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?0:arguments[3];this.colorNaN=[e,t,n,r]}},{key:"getColorForNaN",value:function(){return this.colorNaN}},{key:"getScalarRange",value:function(){return[Number(this.scalarRange[0]),Number(this.scalarRange[1])]}},{key:"setScalarRange",value:function(e,t){this.scalarRange=[e,t],this.delta=t-e,this.emit(h,{change:"scalarRange",lut:this})}},{key:"build",value:function(e){var t=0;if(!this.colorTable){if(this.colorTable=[],this.discrete){this.colorTableSize=this.controlPoints.length,this.scale=50;for(var n=0;nl[0]&&(t+=1,a=s(this.controlPoints,t),l=s(this.controlPoints,t+1)),this.colorTable.push(i(a,l,o))}}e&&this.emit(h,{change:"controlPoints",lut:this})}}},{key:"setNumberOfColors",value:function(e){this.colorTableSize=e,this.colorTable=null,this.build(),this.emit(h,{change:"numberOfColors",lut:this})}},{key:"getNumberOfControlPoints",value:function(){return this.controlPoints?this.controlPoints.length:0}},{key:"removeControlPoint",value:function(e){return e>0&&ea;a++){var i=Math.floor(a/this.scale);o.data[4*a+0]=Math.floor(255*t[i][0]),o.data[4*a+1]=Math.floor(255*t[i][1]),o.data[4*a+2]=Math.floor(255*t[i][2]),o.data[4*a+3]=255}r.putImageData(o,0,0)}},{key:"getColor",value:function(e){if(isNaN(e))return this.colorNaN;var t=Math.floor(this.colorTableSize*(e-this.scalarRange[0])/this.delta);return 0>t?this.colorTable[0]:t>=this.colorTableSize?this.colorTable[this.colorTable.length-1]:this.colorTable[t]}},{key:"destroy",value:function(){this.off()}},{key:"onChange",value:function(e){return this.on(h,e)}}]),e}();t["default"]=v,d["default"].mixInto(v)},function(e,t){"use strict";function n(e){return 0===e.size?"-1":e.size<4?e.size.toString():"list-1"===e.widget?"1":6===e.size?e.name.toLowerCase().indexOf("bound")?"3x2":e.name.toLowerCase().indexOf("range")?"3x2":(console.log("What is the layout for",e),"2x3"):(console.log("Could not find layout for",e),"NO_LAYOUT")}function r(e){return"proxy"===e.type?"string":e.type}function o(e){if(e.values){if(Array.isArray(e.values)){var t=function(){var t={};return e.values.forEach(function(e){t[e]=e}),{v:t}}();if("object"===("undefined"==typeof t?"undefined":s(t)))return t.v}if("proxy"===e.type){var n={};for(var r in e.values)n[r]=r;return n}return e.values}return e.range?{range:e.range}:{}}function a(e,t){l[t.widget]||console.log("No propType for",t);var a=t.depends?t.depends.split(":"):null,i=a?Boolean(Number(a.pop())):!0,u=a?a.pop():null,c=a?a.join(":"):null,f=[t.name,t.doc].concat(e.value).join(" ").toLowerCase();return{show:function(e){if(c&&void 0!==e.properties[c])return e.properties[c][0]===u?i:!i;if(e.filter&&e.filter.length){var n=function(){var t=e.filter.toLowerCase().split(" "),n=!0;return t.forEach(function(e){n=n&&-1!==f.indexOf(e)}),{v:n}}();if("object"===("undefined"==typeof n?"undefined":s(n)))return n.v}return!!e.advanced||!t.advanced},ui:{propType:l[t.widget]||t.widget,label:t.name,help:t.doc,noEmpty:!0,layout:n(t),type:r(t),domain:o(t),componentLabels:[],size:t.size},data:{id:[e.id,e.name].join(":"),value:[].concat(e.value),size:t.size}}}function i(e){return e.properties.map(function(t,n){return a(t,e.ui[n])})}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.proxyPropToProp=a,t.proxyToProps=i;var l={textfield:"Cell",slider:"Slider","list-n":"Enum","list-1":"Enum",checkbox:"Checkbox"};t["default"]={proxyToProps:i,proxyPropToProp:a}},function(e,t){"use strict";function n(e,t,n){var r;return function(){var o=this,a=arguments,i=function(){r=null,n||e.apply(o,a)},s=n&&!r;clearTimeout(r),r=setTimeout(i,t),s&&e.apply(o,a)}}Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=n,t["default"]={debounce:n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0,subtitle:e},g["default"].createElement(d["default"],{key:"QueryDataModelWidget",ref:"QueryDataModelWidget",model:this.props.model}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=r(o),i=n(119),s=r(i),l=n(43),u=r(l),c=n(83),f=r(c),p=n(3),d=r(p),h=n(706),g=r(h);t["default"]=d["default"].createClass({displayName:"VolumeControl",propTypes:{computation:d["default"].PropTypes.object.isRequired,equalizer:d["default"].PropTypes.object.isRequired,intensity:d["default"].PropTypes.object,lookupTable:d["default"].PropTypes.object.isRequired},componentWillMount:function(){var e=this;this.equalizerSubscription=this.props.equalizer.onChange(function(){e.forceUpdate()}),this.intensitySubscription=this.props.intensity.onChange(function(){e.forceUpdate()}),this.computationSubscription=this.props.intensity.onChange(function(){e.forceUpdate()})},componentWillUnmount:function(){this.equalizerSubscription&&(this.equalizerSubscription.unsubscribe(),this.equalizerSubscription=null),this.intensitySubscription&&(this.intensitySubscription.unsubscribe(),this.intensitySubscription=null),this.computationSubscription&&(this.computationSubscription.unsubscribe(),this.computationSubscription=null)},render:function(){var e=this.props.equalizer,t=this.props.lookupTable,n=d["default"].createElement(u["default"],{key:"toggle-intensity",onChange:this.props.intensity.toggleState,value:this.props.intensity.getState()}),r=d["default"].createElement(u["default"],{key:"reset",icon:g["default"].undoIcon,toggle:!1,onChange:this.props.equalizer.resetOpacities,value:!0}),o=d["default"].createElement(u["default"],{key:"toggle-gpu",icon:g["default"].mobileIcon,onChange:this.props.computation.toggleState,value:!this.props.computation.getState()});return d["default"].createElement("div",null,d["default"].createElement(a["default"],{title:"LookupTable",key:"LookupTableWidget_parent",subtitle:n},d["default"].createElement(f["default"],{key:"LookupTableWidget",ref:"LookupTableWidget",originalRange:t.originalRange,lookupTable:t.lookupTable,lookupTableManager:t.lookupTableManager})),d["default"].createElement(a["default"],{title:"Opacity Control",subtitle:[o,r]},d["default"].createElement(s["default"],{ref:"EqualizerWidget",key:"Equalizer",layers:e.getOpacities(),onChange:e.updateOpacities,colors:e.getColors(),spacing:5})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(82),a=r(o),i=n(371),s=r(i),l=n(3),u=r(l),c=n(43),f=r(c),p=n(65),d=r(p);t["default"]=u["default"].createClass({displayName:"CellProperty",propTypes:{data:u["default"].PropTypes.object.isRequired,help:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func,show:u["default"].PropTypes.func,ui:u["default"].PropTypes.object.isRequired,viewData:u["default"].PropTypes.object},mixins:[a["default"]],valueChange:function(e,t){var n=this.state.data;null===t?n.value.splice(e,1):n.value[e]=t,this.setState({data:n}),this.props.onChange&&this.props.onChange(n)},addValue:function(){var e=this.state.data,t=e.value;switch(t.length){case 0:t.push(0);break;case 1:t.push(t[0]);break;default:var n=Number(t[t.length-1]),r=Number(t[t.length-2]),o=n+(n-r);!Number.isNaN(o)&&Number.isFinite(o)?t.push(o):t.push(t[t.length-1])}this.setState({data:e}),this.props.onChange&&this.props.onChange(e)},render:function(){return u["default"].createElement("div",{className:this.props.show(this.props.viewData)?d["default"].container:d["default"].hidden},u["default"].createElement("div",{className:d["default"].header},u["default"].createElement("strong",null,this.props.ui.label),u["default"].createElement("span",null,u["default"].createElement("i",{className:"-1"===this.props.ui.layout?d["default"].plusIcon:d["default"].hidden,onClick:this.addValue}),u["default"].createElement(f["default"],{icon:d["default"].helpIcon,value:this.state.helpOpen,toggle:!!this.props.ui.help,onChange:this.helpToggled}))),u["default"].createElement("div",{className:d["default"].inputBlock},u["default"].createElement("table",{className:d["default"].inputTable},(0,s["default"])(this.props.data,this.props.ui,this.valueChange))),u["default"].createElement("div",{className:this.state.helpOpen?d["default"].helpBox:d["default"].hidden,dangerouslySetInnerHTML:{__html:this.props.ui.help}}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(82),a=r(o),i=n(372),s=r(i),l=n(3),u=r(l),c=n(43),f=r(c),p=n(65),d=r(p);t["default"]=u["default"].createClass({displayName:"CheckboxProperty",propTypes:{data:u["default"].PropTypes.object.isRequired,help:u["default"].PropTypes.string,name:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func,show:u["default"].PropTypes.func,ui:u["default"].PropTypes.object.isRequired,viewData:u["default"].PropTypes.object},mixins:[a["default"]],valueChange:function(e,t){var n=this.state.data;null===e?n.value=t:n.value[e]=t,this.setState({data:n}),this.props.onChange&&this.props.onChange(n)},render:function(){var e=this,t=function(){if(Array.isArray(e.props.data.value)){for(var t=[],n=0;nthis.props.maxZoom&&(r=this.props.maxZoom),this.zoom!==r){var o=this.center[0],a=this.center[1],i=r/this.zoom,s=e.relative.x/this.state.width,l=e.relative.y/this.state.height;this.zoom=r,this.center[0]=s+i*(o-s),this.center[1]=l+i*(a-l),this.imageToDraw.drawToCanvas&&this.imageToDraw.drawToCanvas()}e.isFinal&&(this.baseZoom=this.zoom)}this.baseCenter=[this.center[0],this.center[1]]},dragCallback:function(e,t){var n=!1;if(e.activeArea=this.imageToDraw.activeArea,this.baseZoom=this.zoom,this.props.listener&&this.props.listener.drag&&(n=this.props.listener.drag(e,t)),!n){e.isFirst&&(this.baseCenter=[this.center[0],this.center[1]]);var r=e.deltaX/this.state.width,o=e.deltaY/this.state.height;this.center[0]=this.baseCenter[0]+r,this.center[1]=this.baseCenter[1]+o,e.isFinal&&(this.baseCenter=[this.center[0],this.center[1]]),this.imageToDraw.drawToCanvas&&this.imageToDraw.drawToCanvas()}},clickCallback:function(e,t){e.activeArea=this.imageToDraw.activeArea,this.props.listener&&this.props.listener.click&&this.props.listener.click(e,t)},renderImage:function(e){this.imageToDraw.drawToCanvas=a,this.imageToDraw.src=e.url},renderCanvas:function(e){this.imageToDraw.drawToCanvas=i,this.imageToDraw.data=e,this.imageToDraw.width=e.outputSize[0],this.imageToDraw.height=e.outputSize[1],this.sendToServer&&this.imageExporter.exportImage(e),this.imageToDraw.firstRender?(this.imageToDraw.firstRender=!1,this.resetCamera()):this.imageToDraw.drawToCanvas()},resetCamera:function(){var e=this.state.width,t=this.state.height,n=this.imageToDraw,r=n?n.width:500,o=n?n.height:500;this.zoom=Math.min(e/r,t/o),this.baseZoom=Math.min(e/r,t/o),this.baseCenter=[.5,.5],this.center=[.5,.5],n.drawToCanvas()},recordImages:function(e){this.sendToServer=e},handleKeyDown:function(e){if(82===e.keyCode)this.resetCamera();else if(85===e.keyCode&&!this.state.dialog){var t=c["default"].findDOMNode(this.refs.thumbnail);"CANVAS"===this.imageToDraw.data.canvas.nodeName?this.imageToDraw.data.canvas.width===this.imageToDraw.data.area[2]&&this.imageToDraw.data.canvas.height===this.imageToDraw.data.area[3]?t.src=this.imageToDraw.data.canvas.toDataURL("image/png"):t.src=this.imageExporter.extractCanvasRegion(this.imageToDraw.data.canvas,this.imageToDraw.data.area,this.imageToDraw.data.outputSize):t.src=this.imageToDraw.data.canvas.src,this.setState({dialog:!this.state.dialog})}},updateTitle:function(e){var t=e.target.value;this.setState({title:t})},updateDescription:function(e){var t=e.target.value;this.setState({description:t})},toggleDialog:function(){this.setState({dialog:!this.state.dialog})},updateMetadata:function(){this.setState({dialog:!this.state.dialog}),this.imageExporter.updateMetadata({title:this.state.title,description:this.state.description,image:c["default"].findDOMNode(this.refs.thumbnail).src,path:this.props.imageBuilder.queryDataModel.basepath})},render:function(){return l["default"].createElement("div",{className:b["default"].container},l["default"].createElement("canvas",{className:b["default"].renderer,ref:"canvasRenderer",width:this.state.width,height:this.state.height}),l["default"].createElement("div",{className:this.state.dialog?b["default"].dialog:b["default"].hidden},l["default"].createElement("div",{className:b["default"].inside},l["default"].createElement("img",{ref:"thumbnail",className:b["default"].thumbnail,height:Math.floor(this.state.height/2)}),l["default"].createElement("div",{className:b["default"].metadata,style:{height:Math.floor(this.state.height/2)+"px"}},l["default"].createElement("strong",{className:b["default"].title},l["default"].createElement(p["default"],{html:this.state.title,onChange:this.updateTitle})),l["default"].createElement("div",{className:b["default"].description},l["default"].createElement(p["default"],{html:this.state.description,onChange:this.updateDescription}))),l["default"].createElement("div",{className:b["default"].buttons},l["default"].createElement("button",{className:b["default"].button,onClick:this.toggleDialog},"Cancel"),l["default"].createElement("button",{className:b["default"].button,onClick:this.updateMetadata},"Save")))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i),l=n(15),u=r(l),c=n(376),f=r(c),p=n(37),d=r(p),h=n(56),g=r(h),m=Object.keys(f["default"]),v="multiview-viewport-active-change",_="multiview-layout-change",y=a["default"].createClass({displayName:"MultiViewRenderer",propTypes:{activeColor:a["default"].PropTypes.string,borderColor:a["default"].PropTypes.string,crosshairColor:a["default"].PropTypes.string,layout:a["default"].PropTypes.string,renderers:a["default"].PropTypes.object,spacing:a["default"].PropTypes.number},getDefaultProps:function(){return{spacing:10,borderColor:"#000000",activeColor:"#0000FF",crosshairColor:"#000000",renderers:{}}},getInitialState:function(){return{width:200,height:200}},componentWillMount:function(){function e(e,n){this.dataToDraw=e,t(this.name)}var t=this.drawViewportByName;this.dragCenter=!1,this.dragInViewport=null,this.center=[.5,.5],this.layout=this.props.layout||"3xT",this.viewports=[];for(var n in this.props.renderers){var r=this.props.renderers[n],o=r.builder,a=r.painter;o&&o.onImageReady(e).context(r),a&&a.onPainterReady(e).context(r),this.viewports.push({name:n,active:!1})}this.sizeSubscription=d["default"].onSizeChange(this.updateDimensions),d["default"].startListening()},componentDidMount:function(){this.updateDimensions(),this.mouseHandler=new g["default"](s["default"].findDOMNode(this.refs.canvasRenderer)),this.mouseHandler.attach({drag:this.dragCallback,click:this.clickCallback,zoom:this.zoomCallback})},componentDidUpdate:function(e,t){this.drawLayout()},componentWillUnmount:function(){this.off(),this.mouseHandler&&(this.mouseHandler.destroy(),this.mouseHandler=null),this.sizeSubscription&&(this.sizeSubscription.unsubscribe(),this.sizeSubscription=null)},setLayout:function(e){this.layout=e,this.drawLayout(),this.emit(_,e)},getLayouts:function(){return m},getActiveLayout:function(){return this.layout},setRenderMethod:function(e){var t=this;this.viewports.forEach(function(n){n.active&&(n.name=e,t.emit(v,n))}),this.drawViewportByName(null)},getRenderMethods:function(){return Object.keys(this.props.renderers)},getActiveRenderMethod:function(){return this.viewports.forEach(function(e){return e.active?e.name:void 0}),"No render method"},updateDimensions:function(){var e=s["default"].findDOMNode(this).parentNode,t=d["default"].getSize(e);return!e||this.state.width===t.clientWidth&&this.state.height===t.clientHeight?!1:(this.setState({width:t.clientWidth,height:t.clientHeight}),!0)},dragCallback:function(e,t){var n=this.getViewPort(e);if(!n&&!this.dragInViewport||this.dragCenter)this.dragCenter=!0,this.center[0]=e.relative.x/this.state.width,this.center[1]=e.relative.y/this.state.height,this.drawLayout();else{this.dragInViewport=this.dragInViewport||n;var r=this.props.renderers[this.dragInViewport.name],o=r.builder,a=o?o.getListeners():null;a&&a.drag&&(e.activeArea=this.dragInViewport.activeArea,a.drag(e,t))}e.isFinal&&(this.dragCenter=!1,this.dragInViewport=null)},clickCallback:function(e,t){this.dragCenter=!1,this.dragInViewport=null;var n=this.getViewPort(e);if(n){this.viewports.forEach(function(e){e.active=!1}),n.active=!0;var r=this.props.renderers[n.name],o=r.builder,a=o?o.getListeners():null;a&&a.click&&(e.activeArea=n.activeArea,a.click(e,t)),this.emit(v,n)}this.drawLayout()},zoomCallback:function(e,t){var n=this.getViewPort(e);if(n){var r=this.props.renderers[n.name],o=r.builder,a=o?o.getListeners():null;a&&a.zoom&&(e.activeArea=n.activeArea,a.zoom(e,t))}},getViewPort:function(e){for(var t=this.viewports.length,n=e.relative.x,r=e.relative.y;t--;){var o=this.viewports[t].activeArea||this.viewports[t].region;if(n>=o[0]&&r>=o[1]&&n<=o[0]+o[2]&&r<=o[1]+o[3])return this.viewports[t]}return null},drawViewport:function(e){var t=this.props.renderers[e.name],n=e.region,r=s["default"].findDOMNode(this.refs.canvasRenderer).getContext("2d");if(!(!t||t.builder&&!t.dataToDraw||t.painter&&!t.painter.isReady()))if(t.painter){var o={x:n[0]+2,y:n[1]+2,width:n[2]-4,height:n[3]-4};e.activeArea=[].concat(e.region),t.painter.paint(r,o)}else{var a=this.props.renderers[e.name].dataToDraw,i=n[2]-2,l=n[3]-2,u=a.outputSize[0],c=a.outputSize[1],f=Math.min(i/u,l/c);r.clearRect(n[0]+1,n[1]+1,n[2]-2,n[3]-2);var p=Math.floor(u*f)-2,d=Math.floor(c*f)-2,h=1+n[0]+.5*i-p/2,g=1+n[1]+.5*l-d/2;try{if(r.drawImage(a.canvas,a.area[0],a.area[1],a.area[2],a.area[3],h,g,p,d),a.crosshair){var m=[p/a.area[2],d/a.area[3]],v=[h,g];r.beginPath(),r.moveTo(v[0]+m[0]*a.crosshair[0],g),r.lineTo(v[0]+m[0]*a.crosshair[0],g+d),r.moveTo(h,v[1]+m[1]*a.crosshair[1]),r.lineTo(h+p,v[1]+m[1]*a.crosshair[1]),r.strokeStyle=this.props.crosshairColor,r.lineWidth=1,r.stroke()}e.activeArea=[h,g,p,d]}catch(_){console.log("Error in MultiLayoutRenderer::drawViewport",_)}}},drawViewportByName:function(e){var t=this,n=e?this.props.renderers[e]:null;return n&&n.builder&&!n.dataToDraw?void n.builder.update():void this.viewports.forEach(function(n){n.name!==e&&null!==e||t.drawViewport(n)})},drawLayout:function(){var e=s["default"].findDOMNode(this.refs.canvasRenderer).getContext("2d"),t=e.canvas.width=this.state.width,n=e.canvas.height=this.state.height,r=[this.center[0]*t,this.center[1]*n],o=this.props.spacing,a=f["default"][this.layout](r,o,t,n),i=this.viewports,l=a.length;e.clearRect(0,0,t,n);for(var u=0;l>u;++u){var c=a.shift();ul;)i.pop();this.drawViewportByName(null)},onActiveViewportChange:function(e){return this.on(v,e)},onLayoutChange:function(e){return this.on(_,e)},render:function(){return a["default"].createElement("canvas",{className:"CanvasMultiImageRenderer",ref:"canvasRenderer",width:this.state.width,height:this.state.height})}});u["default"].mixInto(y),t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=e.length,r=n*t,o=e[Math.floor(r)],a=e[Math.ceil(r)],i=r-Math.floor(r);return((a-o)*i+o).toFixed(5)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(99),i=r(a),s=n(3),l=r(s),u=n(22),c=r(u),f=n(37),p=r(f),d=n(712),h=r(d);t["default"]=l["default"].createClass({displayName:"LineChartViewer",propTypes:{colors:l["default"].PropTypes.array,cursor:l["default"].PropTypes.number,data:l["default"].PropTypes.any.isRequired,height:l["default"].PropTypes.number,legend:l["default"].PropTypes.bool,width:l["default"].PropTypes.number},getDefaultProps:function(){return{colors:["#e1002a","#417dc0","#1d9a57","#e9bc2f","#9b3880"],height:200,legend:!1,width:200}},getInitialState:function(){return{fieldsColors:{},height:this.props.height/2,legend:this.props.legend,width:this.props.width/2}},componentWillMount:function(){this.xPosition=0,this.sizeSubscription=p["default"].onSizeChange(this.updateDimensions),p["default"].startListening()},componentDidMount:function(){this.updateDimensions()},componentDidUpdate:function(e,t){this.drawChart()},componentWillUnmount:function(){this.sizeSubscription&&(this.sizeSubscription.unsubscribe(),this.sizeSubscription=null)},toggleLegend:function(){this.setState({legend:!this.state.legend})},updateDimensions:function(){this.xPosition=0;var e=c["default"].findDOMNode(this).parentNode,t=p["default"].getSize(e);return!e||this.state.width===t.clientWidth&&this.state.height===t.clientHeight?!1:(this.setState({width:t.clientWidth,height:t.clientHeight}),!0)},onMove:function(e){this.xPosition=e.clientX-(e.target.getClientRects()[0].x||e.target.getClientRects()[0].left),this.isMounted()&&this.state.legend&&this.drawChart()},drawChart:function(){if(this.props.data){var e=c["default"].findDOMNode(this.refs.canvas).getContext("2d"),t=this.props.data.fields,n=t.length,r={},a=this.xPosition/e.canvas.width;e.canvas.width=this.state.width,e.canvas.height=this.state.height,e.clearRect(0,0,e.canvas.width,e.canvas.height);for(var s=0;n>s;++s)this.drawField(e,s,t[s].data,t[s].range),r[t[s].name]=this.props.colors[s],this.refs.hasOwnProperty(t[s].name)&&(c["default"].findDOMNode(this.refs[t[s].name]).innerHTML=o(t[s].data,a));(0,i["default"])(this.state.fieldsColors,r)||this.setState({fieldsColors:r}),this.state.legend&&(c["default"].findDOMNode(this.refs.xValueLabel).innerHTML=((this.props.data.xRange[1]-this.props.data.xRange[0])*a+this.props.data.xRange[0]).toFixed(5),e.beginPath(),e.lineWidth=1,e.strokeStyle="#000000",e.moveTo(this.xPosition,0),e.lineTo(this.xPosition,e.canvas.height),e.stroke()),void 0!==this.props.cursor&&(e.beginPath(),e.lineWidth=1,e.strokeStyle="#0000FF",e.moveTo(this.props.cursor*e.canvas.width,0),e.lineTo(this.props.cursor*e.canvas.width,e.canvas.height),e.stroke())}},drawField:function(e,t,n,r){function o(e){var t=n[e];return t=t>a?i>t?t:i:a,l-Math.floor((t-a)*d)}for(var a=Number.MAX_VALUE,i=Number.MIN_VALUE,s=e.canvas.width,l=e.canvas.height,u=n.length,c=n.length,f=new Uint16Array(c);c--;){var p=n[c];a=Math.min(a,p),i=Math.max(i,p),f[c]=Math.floor(s*(c/u))}r&&(a=r[0],i=r[1]);var d=l/(i-a);e.beginPath(),e.lineWidth=1,e.strokeStyle=this.props.colors[t],e.moveTo(f[0],o(0));for(var h=1;u>h;h++)isNaN(n[h])?u>h+1&&!isNaN(n[h+1])&&e.moveTo(f[h+1],o(h+1)):e.lineTo(f[h],o(h));return e.stroke(),[a,i]},render:function(){var e=[];for(var t in this.state.fieldsColors){var n=this.state.fieldsColors[t];e.push(l["default"].createElement("li",{className:h["default"].legendItem,key:t},l["default"].createElement("i",{className:h["default"].legendItemColor,style:{color:n}}),l["default"].createElement("b",null,t),l["default"].createElement("span",{className:h["default"].legendItemValue,ref:t})))}return l["default"].createElement("div",{className:h["default"].container},l["default"].createElement("canvas",{className:h["default"].canvas,ref:"canvas",onMouseMove:this.onMove,width:this.state.width,height:this.state.height}),l["default"].createElement("div",{className:this.state.legend?h["default"].legend:h["default"].hidden},l["default"].createElement("div",{className:h["default"].legendBar},l["default"].createElement("span",{className:h["default"].legendText,ref:"xValueLabel"}),l["default"].createElement("i",{className:h["default"].toggleLegendButton,onClick:this.toggleLegend})),l["default"].createElement("ul",{className:h["default"].legendContent},e)),l["default"].createElement("div",{className:this.state.legend?h["default"].hidden:h["default"].legend,onClick:this.toggleLegend},l["default"].createElement("div",{className:h["default"].legendButtons},l["default"].createElement("i",{className:h["default"].toggleLegendButton}))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(714),s=r(i);t["default"]=a["default"].createClass({displayName:"ActionListWidget",propTypes:{list:a["default"].PropTypes.array.isRequired,onClick:a["default"].PropTypes.func},processClick:function(e){for(var t=e.target;!t.dataset.name;)t=t.parentNode;this.props.onClick&&this.props.onClick(t.dataset.name,t.dataset.action,t.dataset.user)},render:function(){var e=this,t=[];return this.props.list.forEach(function(n){t.push(a["default"].createElement("li",{className:s["default"].item,key:n.name,title:n.name,"data-name":n.name,"data-action":n.action||"default","data-user":n.data||"",onClick:e.processClick},a["default"].createElement("i",{className:n.icon}),n.name))}),a["default"].createElement("ul",{className:s["default"].list},t)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i),l=n(744),u=r(l),c=n(717),f=r(c);t["default"]=a["default"].createClass({displayName:"ColorPickerWidget",propTypes:{color:a["default"].PropTypes.array,onChange:a["default"].PropTypes.func,swatch:a["default"].PropTypes.string},getDefaultProps:function(){return{color:[0,0,0],swatch:u["default"]}},getInitialState:function(){return this.image=new Image,this.image.src=this.props.swatch,{swatch:this.props.swatch,color:this.props.color,preview:!1,originalColor:[this.props.color[0],this.props.color[1],this.props.color[2]]}},componentDidMount:function(){var e=s["default"].findDOMNode(this.refs.canvas).getContext("2d");e.fillStyle="rgb("+this.state.originalColor.join(",")+")",e.fillRect(0,0,1,1)},componentDidUpdate:function(e,t){if(e.color[0]===this.props.color[0]&&e.color[1]===this.props.color[1]&&e.color[2]===this.props.color[2]||this.setState({originalColor:this.props.color}),!this.state.preview){var n=s["default"].findDOMNode(this.refs.canvas).getContext("2d");n.fillStyle="rgb("+this.state.originalColor.join(",")+")",n.fillRect(0,0,1,1)}},showColor:function(e){var t=this.state.originalColor,n=s["default"].findDOMNode(this.refs.canvas).getContext("2d");if(e.preventDefault(),"mouseleave"===e.type)return n.fillStyle="rgb("+t.join(",")+")",n.fillRect(0,0,1,1),void this.setState({color:[t[0],t[1],t[2]],preview:!1});var r=s["default"].findDOMNode(this.refs.swatch),o=r.getBoundingClientRect(),a=this.image.width/o.width,i=a*(e.pageX-o.left),l=a*(e.pageY-o.top);n.drawImage(r,i,l,1,1,0,0,1,1),t=n.getImageData(0,0,1,1).data,"click"===e.type?(this.setState({color:[t[0],t[1],t[2]],preview:!1}),this.props.onChange&&this.props.onChange(t)):this.setState({color:[t[0],t[1],t[2]],preview:!0})},rgbColorChange:function(e){var t=this.state.color,n=e.target.value,r=Number(e.target.dataset.colorIdx);t[r]=n;var o=s["default"].findDOMNode(this.refs.canvas).getContext("2d");o.fillStyle="rgb("+t.join(",")+")",o.fillRect(0,0,1,1),this.setState({color:[t[0],t[1],t[2]],preview:!1}),this.props.onChange&&this.props.onChange(t)},updateColor:function(e){this.setState({originalColor:e})},updateSwatch:function(e){this.image.src=e,this.setState({swatch:e})},render:function(){return a["default"].createElement("div",{className:f["default"].container},a["default"].createElement("div",{className:f["default"].activeColor},a["default"].createElement("canvas",{className:f["default"].colorCanvas,ref:"canvas",width:"1",height:"1"}),a["default"].createElement("input",{className:f["default"].colorRGB,type:"number",min:"0",max:"255",value:this.state.color[0],"data-color-idx":"0",onChange:this.rgbColorChange}),a["default"].createElement("input",{className:f["default"].colorRGB,type:"number",min:"0",max:"255",value:this.state.color[1],"data-color-idx":"1",onChange:this.rgbColorChange}),a["default"].createElement("input",{className:f["default"].colorRGB,type:"number",min:"0",max:"255",value:this.state.color[2],"data-color-idx":"2",onChange:this.rgbColorChange})),a["default"].createElement("div",{className:f["default"].swatch},a["default"].createElement("img",{ref:"swatch",className:f["default"].swatchImage,width:"100%",src:this.state.swatch,onClick:this.showColor,onMouseMove:this.showColor,onMouseLeave:this.showColor})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(388),s=r(i),l=n(159),u=r(l);t["default"]=a["default"].createClass({displayName:"CompositePipelineWidget",propTypes:{model:a["default"].PropTypes.object.isRequired},componentDidMount:function(){this.attachListener(this.props.model)},componentWillReceiveProps:function(e){var t=this.props.model,n=e.model;t!==n&&(this.detachListener(),this.attachListener(n))},componentWillUnmount:function(){this.detachListener()},attachListener:function(e){var t=this;this.pipelineSubscription=e.onChange(function(e,n){t.forceUpdate()})},detachListener:function(){this.pipelineSubscription&&(this.pipelineSubscription.unsubscribe(),this.pipelineSubscription=null)},render:function(){var e=this.props.model,t=e.getPipelineDescription();return a["default"].createElement("div",{className:u["default"].container},t.map(function(t,n){return a["default"].createElement(s["default"],{key:n,item:t,layer:t.ids.join(""),model:e})}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i);t["default"]=a["default"].createClass({displayName:"ContentEditableWidget",propTypes:{blurOnEnter:a["default"].PropTypes.bool,className:a["default"].PropTypes.string,html:a["default"].PropTypes.string,onBlur:a["default"].PropTypes.func,onChange:a["default"].PropTypes.func},getDefaultProps:function(){return{blurOnEnter:!1,className:""}},shouldComponentUpdate:function(e){return e.html!==s["default"].findDOMNode(this).innerHTML},componentDidUpdate:function(){this.props.html!==s["default"].findDOMNode(this).innerHTML&&(s["default"].findDOMNode(this).innerHTML=this.props.html)},setFocus:function(){var e=document.createRange();e.selectNodeContents(s["default"].findDOMNode(this));var t=window.getSelection();t.removeAllRanges(),t.addRange(e)},blurEditable:function(e){13===e.charCode&&(s["default"].findDOMNode(this).blur(),window.getSelection().removeAllRanges(),this.props.onBlur&&this.props.onBlur())},emitChange:function(e){var t=s["default"].findDOMNode(this).innerHTML;this.props.onChange&&t!==this.lastHtml&&(e.target={value:t},this.props.onChange(e)),this.lastHtml=t,"blur"===e.type&&this.props.onBlur&&this.props.onBlur()},render:function(){return a["default"].createElement("div",{className:this.props.className,onInput:this.emitChange,onBlur:this.emitChange,onKeyPress:this.props.blurOnEnter?this.blurEditable:function(){},contentEditable:!0,dangerouslySetInnerHTML:{__html:this.props.html}})}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(99),a=r(o),i=n(56),s=r(i),l=n(3),u=r(l),c=n(22),f=r(c),p=n(718),d=r(p);t["default"]=u["default"].createClass({displayName:"Coordinate2DWidget",propTypes:{height:u["default"].PropTypes.number,hideXY:u["default"].PropTypes.bool,onChange:u["default"].PropTypes.func,width:u["default"].PropTypes.number,x:u["default"].PropTypes.number,y:u["default"].PropTypes.number},getDefaultProps:function(){return{width:50,height:50,x:0,y:0}},getInitialState:function(){return{x:this.props.x,y:this.props.y}},componentDidMount:function(){this.drawControl(),this.mouseHandler=new s["default"](f["default"].findDOMNode(this.refs.canvas)),this.mouseHandler.attach({click:this.pointerAction,mousedown:this.pointerAction,mouseup:this.pointerAction,drag:this.pointerAction})},componentDidUpdate:function(e,t){this.drawControl()},componentWillUnmount:function(){this.mouseHandler.destroy()},coordinates:function(){return{x:this.state.x,y:this.state.y}},updateCoordinates:function(e){var t=this,n={},r=!1;["x","y"].forEach(function(o){e.hasOwnProperty(o)&&(n[o]=t.limitValue(parseFloat(e[o])),r=!0)}),r&&this.setState(n)},limitValue:function(e){return Math.max(-1,Math.min(e,1))},updateX:function(e){var t=parseFloat(e.target.value);this.setState({x:t})},updateY:function(e){var t=parseFloat(e.target.value);this.setState({y:t})},pointerAction:function(e){var t=f["default"].findDOMNode(this.refs.canvas).getBoundingClientRect(),n=e.pointers[0].clientX-t.left-this.props.width/2,r=-(e.pointers[0].clientY-t.top-this.props.height/2);this.setState({x:this.limitValue(n/(this.props.width/2)),y:this.limitValue(r/(this.props.height/2))})},drawControl:function(){var e=f["default"].findDOMNode(this.refs.canvas).getContext("2d"),t=e.canvas.height,n=e.canvas.width;if(e.clearRect(0,0,n,t),this.drawPlus("lightgrey"),this.drawPlus("black",{x:this.state.x*(this.props.width/2),y:-this.state.y*(this.props.height/2)}),this.props.onChange){var r={x:this.state.x,y:this.state.y};(0,a["default"])(r,this.lastSharedState)||(this.lastSharedState=r,this.props.onChange(this.lastSharedState))}},drawPlus:function(e,t){var n=f["default"].findDOMNode(this.refs.canvas).getContext("2d"),r=n.canvas.height,o=n.canvas.width,a=5;void 0===t?t={x:o/2,y:r/2}:(t.x+=this.props.width/2,t.y+=this.props.height/2),n.beginPath(),n.lineWidth=2,n.strokeStyle=e,n.moveTo(t.x,t.y-a),n.lineTo(t.x,t.y+a),n.stroke(),n.moveTo(t.x-a,t.y),n.lineTo(t.x+a,t.y),n.stroke()},render:function(){return u["default"].createElement("section",{className:d["default"].container},u["default"].createElement("canvas",{ref:"canvas",className:d["default"].canvas,width:this.props.width,height:this.props.height}),u["default"].createElement("section",{className:this.props.hideXY?d["default"].hidden:d["default"].inputContainer},u["default"].createElement("label",{className:d["default"].inputLabel}," x: "),u["default"].createElement("input",{className:d["default"].input,type:"number",onChange:this.updateX,min:"-1.0",max:"1.0",step:"0.01",value:this.state.x}),u["default"].createElement("br",null),u["default"].createElement("label",{className:d["default"].inputLabel}," y: "),u["default"].createElement("input",{className:d["default"].input,type:"number",onChange:this.updateY,min:"-1.0",max:"1.0",step:"0.01",value:this.state.y})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(720),s=r(i);t["default"]=a["default"].createClass({displayName:"DropDownWidget",propTypes:{field:a["default"].PropTypes.string,fields:a["default"].PropTypes.array,onChange:a["default"].PropTypes.func},getInitialState:function(){return{open:!1,field:this.props.field||this.props.fields[0]}},toggleDropdown:function(){this.setState({open:!this.state.open})},setField:function(e){this.setState({field:e.target.innerHTML}),this.props.onChange(e.target.innerHTML)},getField:function(e){return this.state.field},render:function(){var e=this;return a["default"].createElement("div",{className:s["default"].container,onClick:this.toggleDropdown},this.state.field,a["default"].createElement("ul",{className:this.state.open?s["default"].list:s["default"].hidden},this.props.fields.map(function(t){return"__internal"===t?null:t===e.state.field?a["default"].createElement("li",{className:s["default"].selectedItem,key:t,onClick:e.setField},t):a["default"].createElement("li",{className:s["default"].item,key:t,onClick:e.setField},t)})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(725),s=r(i);t["default"]=a["default"].createClass({displayName:"LayoutsWidget",propTypes:{onChange:a["default"].PropTypes.func},onLayoutChange:function(e){var t=e.currentTarget.getAttribute("name");this.props.onChange&&this.props.onChange(t)},render:function(){return a["default"].createElement("section",null,a["default"].createElement("table",{className:s["default"].table,name:"2x2",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"1x2",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"2x1",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"1x1",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xL",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{rowSpan:"2",className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xT",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{colSpan:"2",className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xR",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{rowSpan:"2",className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td})))),a["default"].createElement("table",{className:s["default"].table,name:"3xB",onClick:this.onLayoutChange},a["default"].createElement("tbody",null,a["default"].createElement("tr",null,a["default"].createElement("td",{className:s["default"].td}),a["default"].createElement("td",{className:s["default"].td})),a["default"].createElement("tr",null,a["default"].createElement("td",{colSpan:"2",className:s["default"].td})))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(728),s=r(i);t["default"]=a["default"].createClass({displayName:"PresetListWidget",propTypes:{activeName:a["default"].PropTypes.string,height:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,presets:a["default"].PropTypes.object,visible:a["default"].PropTypes.bool},getDefaultProps:function(){return{activeName:"",height:"1em",presets:{},visible:!0}},getInitialState:function(){return{activeName:this.props.activeName}}, +updateActive:function(e){var t=e.target.dataset.name;this.setState({activeName:t}),this.props.onChange&&this.props.onChange(t)},render:function(){var e=this;if(!this.props.presets||!this.props.visible)return null;var t=this.state.activeName,n=this.props.height,r=this.props.presets,o=Object.keys(r);return a["default"].createElement("div",{className:s["default"].container},a["default"].createElement("div",{className:s["default"].bottomPadding}),o.map(function(o){return a["default"].createElement("img",{src:"data:image/png;base64,"+r[o],key:o,style:{height:n},"data-name":o,onClick:e.updateActive,className:o===t?s["default"].activeLine:s["default"].line})}),a["default"].createElement("div",{className:s["default"].bottomPadding}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(137),s=r(i),l=n(118),u=r(l),c=n(167),f=n(730),p=r(f);t["default"]=a["default"].createClass({displayName:"ProxyPropertyGroup",propTypes:{advanced:a["default"].PropTypes.bool,collapsed:a["default"].PropTypes.bool,filter:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,proxy:a["default"].PropTypes.object},getDefaultProps:function(){return{advanced:!1,collapsed:!1}},getInitialState:function(){return{collapsed:this.props.collapsed,changeSet:{},properties:(0,c.proxyToProps)(this.props.proxy)}},componentWillReceiveProps:function(e){var t=this.props.proxy,n=e.proxy;(0,s["default"])(t,n)||this.setState({properties:(0,c.proxyToProps)(n),changeSet:{}})},toggleCollapsedMode:function(){var e=!this.state.collapsed;this.setState({collapsed:e})},valueChange:function(e){var t=this.state.changeSet;t[e.id]=1===e.size&&Array.isArray(e.value)?e.value[0]:e.value,this.setState({changeSet:t}),this.props.onChange&&this.props.onChange(t)},render:function(){var e=this,t={},n={advanced:this.props.advanced,filter:this.props.filter,properties:t},r=Object.keys(this.state.changeSet).length;return this.state.properties.forEach(function(e){t[e.data.id]=e.data.value}),a["default"].createElement("div",{className:p["default"].container},a["default"].createElement("div",{className:p["default"].toolbar,onClick:this.toggleCollapsedMode},a["default"].createElement("i",{className:this.state.collapsed?p["default"].collapedIcon:p["default"].expandedIcon}),a["default"].createElement("span",{className:p["default"].title},this.props.proxy.name),a["default"].createElement("span",{className:r?p["default"].tag:p["default"].emptyTag},a["default"].createElement("i",{className:p["default"].tagBackground}),a["default"].createElement("strong",{className:p["default"].tagCount},r))),a["default"].createElement("div",{className:this.state.collapsed?p["default"].hidden:p["default"].content},this.state.properties.map(function(t){return(0,u["default"])(t,n,e.valueChange)})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),s=n(731),l=r(s);t["default"]=i["default"].createClass({displayName:"ScalarRangeWidget",propTypes:{max:i["default"].PropTypes.number,min:i["default"].PropTypes.number,onApply:i["default"].PropTypes.func,visible:i["default"].PropTypes.bool},getInitialState:function(){return{max:this.props.max||1,min:this.props.min||0}},componentWillReceiveProps:function(e){var t=e.min,n=e.max;this.state.min===t&&this.state.max===n||this.setState({min:t,max:n})},updateRange:function(e){var t=e.target.name,n=e.target.value;!isNaN(parseFloat(n))&&isFinite(n)&&this.setState(o({},t,n))},apply:function(e){var t=this.state,n=t.min,r=t.max,o=e.target.dataset.type;n=Number(n),r=Number(r),this.props.onApply&&this.props.onApply({type:o,min:n,max:r})},render:function(){return this.props.visible?i["default"].createElement("div",{className:l["default"].container},i["default"].createElement("input",{className:l["default"].rangeInput,type:"text",pattern:"-*[0-9]*.*[0-9]*",name:"min",value:this.state.min,onChange:this.updateRange}),i["default"].createElement("input",{className:l["default"].rangeInput,type:"text",pattern:"-*[0-9]*.*[0-9]*",name:"max",value:this.state.max,onChange:this.updateRange}),i["default"].createElement("div",{className:l["default"].actionLine},i["default"].createElement("i",{onClick:this.apply,"data-type":"data",className:l["default"].dataRangeIcon}),i["default"].createElement("i",{onClick:this.apply,"data-type":"time",className:l["default"].timeRangeIcon}),i["default"].createElement("i",{onClick:this.apply,"data-type":"custom",className:l["default"].customRangeIcon}))):null}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(732),s=r(i);t["default"]=a["default"].createClass({displayName:"TextInputWidget",propTypes:{className:a["default"].PropTypes.string,name:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,value:a["default"].PropTypes.string},getDefaultProps:function(){return{value:"",className:""}},getInitialState:function(){return{editing:!1,valueRep:this.props.value}},valueChange:function(e){var t=e.target.value;this.setState({editing:!0,valueRep:t})},endEditing:function(){this.setState({editing:!1}),this.props.name?this.props.onChange(this.state.valueRep,this.props.name):this.props.onChange(this.state.valueRep)},render:function(){return a["default"].createElement("div",{className:[s["default"].container,this.props.className].join(" ")},a["default"].createElement("input",{className:s["default"].entry,type:"text",value:this.state.editing?this.state.valueRep:this.props.value,onChange:this.valueChange,onBlur:this.endEditing}),a["default"].createElement("i",{className:this.state.editing?s["default"].editingButton:s["default"].button}))}})},function(e,t,n){var r=n(34),o=n(28),a=n(73);e.exports=function(e){return function(t,n,i){var s,l=r(t),u=o(l.length),c=a(i,u);if(e&&n!=n){for(;u>c;)if(s=l[c++],s!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c;return!e&&-1}}},function(e,t,n){"use strict";var r=n(8),o=n(40),a=n(93),i=n(38),s=n(95),l=n(39),u=n(70),c=n(124),f=n(216),p=n(59)("id"),d=n(27),h=n(12),g=n(94),m=n(31),v=Object.isExtensible||h,_=m?"_s":"size",y=0,b=function(e,t){if(!h(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!d(e,p)){if(!v(e))return"F";if(!t)return"E";o(e,p,++y)}return"O"+e[p]},w=function(e,t){var n,r=b(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,o){var c=e(function(e,a){s(e,c,t),e._i=r.create(null),e._f=void 0,e._l=void 0,e[_]=0,void 0!=a&&u(a,n,e[o],e)});return a(c.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[_]=0},"delete":function(e){var t=this,n=w(t,e);if(n){var r=n.n,o=n.p;delete t._i[n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),t._f==n&&(t._f=r),t._l==n&&(t._l=o),t[_]--}return!!n},forEach:function(e){for(var t,n=i(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!w(this,e)}}),m&&r.setDesc(c.prototype,"size",{get:function(){return l(this[_])}}),c},def:function(e,t,n){var r,o,a=w(e,t);return a?a.v=n:(e._l=a={i:o=b(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[_]++,"F"!==o&&(e._i[o]=a)),e},getEntry:w,setStrong:function(e,t,n){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?f(0,n.k):"values"==t?f(0,n.v):f(0,[n.k,n.v]):(e._t=void 0,f(1))},n?"entries":"values",!n,!0),g(t)}}},function(e,t,n){var r=n(70),o=n(88);e.exports=function(e){return function(){if(o(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return r(this,!1,t.push,t),t}}},function(e,t,n){"use strict";var r=n(40),o=n(93),a=n(13),i=n(12),s=n(95),l=n(70),u=n(87),c=n(27),f=n(59)("weak"),p=Object.isExtensible||i,d=u(5),h=u(6),g=0,m=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},_=function(e,t){return d(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=_(this,e);return t?t[1]:void 0},has:function(e){return!!_(this,e)},set:function(e,t){var n=_(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var a=e(function(e,o){s(e,a,t),e._i=g++,e._l=void 0,void 0!=o&&l(o,n,e[r],e)});return o(a.prototype,{"delete":function(e){return i(e)?p(e)?c(e,f)&&c(e[f],this._i)&&delete e[f][this._i]:m(this)["delete"](e):!1},has:function(e){return i(e)?p(e)?c(e,f)&&c(e[f],this._i):m(this).has(e):!1}}),a},def:function(e,t,n){return p(a(t))?(c(t,f)||r(t,f,{}),t[f][e._i]=n):m(e).set(t,n),e},frozenStore:m,WEAK:f}},function(e,t,n){var r=n(12),o=n(16).document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){"use strict";var r=n(13);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(34),o=n(8).getNames,a={}.toString,i="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(t){return i.slice()}};e.exports.get=function(e){return i&&"[object Window]"==a.call(e)?s(e):o(r(e))}},function(e,t,n){e.exports=n(16).document&&document.documentElement},function(e,t,n){var r=n(71),o=n(14)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},function(e,t,n){var r=n(12),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){var r=n(12),o=n(44),a=n(14)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(13);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){var i=e["return"];throw void 0!==i&&r(i.call(e)),a}}},function(e,t,n){"use strict";var r=n(8),o=n(51),a=n(72),i={};n(40)(i,n(14)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(i,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(8),o=n(34),a=r.isEnum;e.exports=function(e){return function(t){for(var n,i=o(t),s=r.getKeys(i),l=s.length,u=0,c=[];l>u;)a.call(i,n=s[u++])&&c.push(e?[n,i[n]]:i[n]);return c}}},function(e,t,n){var r=n(8),o=n(13),a=n(16).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.getNames(o(e)),n=r.getSymbols;return n?t.concat(n(e)):t}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(16),o="__core-js_shared__",a=r[o]||(r[o]={});e.exports=function(e){return a[e]||(a[e]={})}},function(e,t,n){var r=n(28),o=n(223),a=n(39);e.exports=function(e,t,n,i){var s=String(a(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(l>=c)return s;""==u&&(u=" ");var f=c-l,p=o.call(u,Math.ceil(f/u.length));return p.length>f&&(p=p.slice(0,f)),i?p+s:s+p}},function(e,t,n){"use strict";var r=n(74),o=n(39);e.exports=function(e){var t=String(o(this)),n="",a=r(e);if(0>a||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){var r,o,a,i=n(38),s=n(91),l=n(210),u=n(207),c=n(16),f=c.process,p=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,g=0,m={},v="onreadystatechange",_=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},y=function(e){_.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},d=function(e){delete m[e]},"process"==n(44)(f)?r=function(e){f.nextTick(i(_,e,1))}:h?(o=new h,a=o.port2,o.port1.onmessage=y,r=i(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",y,!1)):r=v in u("script")?function(e){l.appendChild(u("script"))[v]=function(){l.removeChild(this),_.call(e)}}:function(e){setTimeout(i(_,e,1),0)}),e.exports={set:p,clear:d}},function(e,t,n){var r=n(88),o=n(14)("iterator"),a=n(71);e.exports=n(45).getIteratorMethod=function(e){return void 0!=e?e[o]||e["@@iterator"]||a[r(e)]:void 0}},function(e,t,n){"use strict";var r=n(58),o=n(216),a=n(71),i=n(34);e.exports=n(124)(Array,"Array",function(e,t){this._t=i(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){!function(r,o){e.exports=t=o(n(7))}(this,function(e){return function(t){var n=e,r=n.lib,o=r.WordArray,a=r.Hasher,i=n.algo,s=[],l=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;n>=r;r++)if(!(e%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,o=0;64>o;)e(r)&&(8>o&&(s[o]=n(t.pow(r,.5))),l[o]=n(t.pow(r,1/3)),o++),r++}();var u=[],c=i.SHA256=a.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],f=n[6],p=n[7],d=0;64>d;d++){if(16>d)u[d]=0|e[t+d];else{var h=u[d-15],g=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,m=u[d-2],v=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[d]=g+u[d-7]+v+u[d-16]}var _=s&c^~s&f,y=r&o^r&a^o&a,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),x=p+w+_+l[d]+u[d],C=b+y;p=f,f=c,c=s,s=i+x|0,i=a,a=o,o=r,r=x+C|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+a|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+f|0,n[7]=n[7]+p|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=t.floor(r/4294967296),n[(o+64>>>9<<4)+15]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=a._createHelper(c),n.HmacSHA256=a._createHmacHelper(c)}(Math),e.SHA256})},function(e,t,n){!function(r,o,a){e.exports=t=o(n(7),n(97))}(this,function(e){return function(){function t(){return i.create.apply(i,arguments)}var n=e,r=n.lib,o=r.Hasher,a=n.x64,i=a.Word,s=a.WordArray,l=n.algo,u=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],c=[];!function(){for(var e=0;80>e;e++)c[e]=t()}();var f=l.SHA512=o.extend({_doReset:function(){this._hash=new s.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],a=n[2],i=n[3],s=n[4],l=n[5],f=n[6],p=n[7],d=r.high,h=r.low,g=o.high,m=o.low,v=a.high,_=a.low,y=i.high,b=i.low,w=s.high,x=s.low,C=l.high,E=l.low,T=f.high,P=f.low,k=p.high,M=p.low,S=d,D=h,R=g,A=m,I=v,O=_,N=y,F=b,L=w,B=x,j=C,W=E,U=T,V=P,z=k,q=M,H=0;80>H;H++){var X=c[H];if(16>H)var G=X.high=0|e[t+2*H],Y=X.low=0|e[t+2*H+1];else{var Q=c[H-15],K=Q.high,Z=Q.low,J=(K>>>1|Z<<31)^(K>>>8|Z<<24)^K>>>7,$=(Z>>>1|K<<31)^(Z>>>8|K<<24)^(Z>>>7|K<<25),ee=c[H-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,oe=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),ae=c[H-7],ie=ae.high,se=ae.low,le=c[H-16],ue=le.high,ce=le.low,Y=$+se,G=J+ie+($>>>0>Y>>>0?1:0),Y=Y+oe,G=G+re+(oe>>>0>Y>>>0?1:0),Y=Y+ce,G=G+ue+(ce>>>0>Y>>>0?1:0);X.high=G,X.low=Y}var fe=L&j^~L&U,pe=B&W^~B&V,de=S&R^S&I^R&I,he=D&A^D&O^A&O,ge=(S>>>28|D<<4)^(S<<30|D>>>2)^(S<<25|D>>>7),me=(D>>>28|S<<4)^(D<<30|S>>>2)^(D<<25|S>>>7),ve=(L>>>14|B<<18)^(L>>>18|B<<14)^(L<<23|B>>>9),_e=(B>>>14|L<<18)^(B>>>18|L<<14)^(B<<23|L>>>9),ye=u[H],be=ye.high,we=ye.low,xe=q+_e,Ce=z+ve+(q>>>0>xe>>>0?1:0),xe=xe+pe,Ce=Ce+fe+(pe>>>0>xe>>>0?1:0),xe=xe+we,Ce=Ce+be+(we>>>0>xe>>>0?1:0),xe=xe+Y,Ce=Ce+G+(Y>>>0>xe>>>0?1:0),Ee=me+he,Te=ge+de+(me>>>0>Ee>>>0?1:0);z=U,q=V,U=j,V=W,j=L,W=B,B=F+xe|0,L=N+Ce+(F>>>0>B>>>0?1:0)|0,N=I,F=O,I=R,O=A,R=S,A=D,D=xe+Ee|0,S=Ce+Te+(xe>>>0>D>>>0?1:0)|0}h=r.low=h+D,r.high=d+S+(D>>>0>h>>>0?1:0),m=o.low=m+A,o.high=g+R+(A>>>0>m>>>0?1:0),_=a.low=_+O,a.high=v+I+(O>>>0>_>>>0?1:0),b=i.low=b+F,i.high=y+N+(F>>>0>b>>>0?1:0),x=s.low=x+B,s.high=w+L+(B>>>0>x>>>0?1:0),E=l.low=E+W,l.high=C+j+(W>>>0>E>>>0?1:0),P=f.low=P+V,f.high=T+U+(V>>>0>P>>>0?1:0),M=p.low=M+q,p.high=k+z+(q>>>0>M>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),t[(r+128>>>10<<5)+31]=n,e.sigBytes=4*t.length,this._process();var o=this._hash.toX32();return o},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});n.SHA512=o._createHelper(f),n.HmacSHA512=o._createHmacHelper(f)}(),e.SHA512})},function(e,t,n){"use strict";var r=n(35),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,a=t;if(n=!1,r&&a){if(r===a)return!0;if(o(r))return!1;if(o(a)){e=r,t=a.parentNode,n=!0;continue e}return r.contains?r.contains(a):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(a)):!1}return!1}}var o=n(609);e.exports=r},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){return i?void 0:a(!1),p.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?i.innerHTML="":i.innerHTML="<"+e+">",s[e]=!i.firstChild),s[e]?p[e]:null}var o=n(20),a=n(5),i=o.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],u=[1,"","
"],c=[3,"","
"],f=[1,'',""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){p[e]=f,s[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=r.bind(t),i=0;i0&&(i=1/Math.sqrt(i),e[0]=n*i,e[1]=r*i,e[2]=o*i,e[3]=a*i),e},o.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},o.lerp=function(e,t,n,r){var o=t[0],a=t[1],i=t[2],s=t[3];return e[0]=o+r*(n[0]-o),e[1]=a+r*(n[1]-a),e[2]=i+r*(n[2]-i),e[3]=s+r*(n[3]-s),e},o.random=function(e,t){return t=t||1,e[0]=r.RANDOM(),e[1]=r.RANDOM(),e[2]=r.RANDOM(),e[3]=r.RANDOM(),o.normalize(e,e),o.scale(e,e,t),e},o.transformMat4=function(e,t,n){var r=t[0],o=t[1],a=t[2],i=t[3];return e[0]=n[0]*r+n[4]*o+n[8]*a+n[12]*i,e[1]=n[1]*r+n[5]*o+n[9]*a+n[13]*i,e[2]=n[2]*r+n[6]*o+n[10]*a+n[14]*i,e[3]=n[3]*r+n[7]*o+n[11]*a+n[15]*i,e},o.transformQuat=function(e,t,n){var r=t[0],o=t[1],a=t[2],i=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*a-l*o,f=u*o+l*r-i*a,p=u*a+i*o-s*r,d=-i*r-s*o-l*a;return e[0]=c*u+d*-i+f*-l-p*-s,e[1]=f*u+d*-s+p*-i-c*-l,e[2]=p*u+d*-l+c*-s-f*-i,e[3]=t[3],e},o.forEach=function(){var e=o.create();return function(t,n,r,o,a,i){var s,l;for(n||(n=4),r||(r=0),l=o?Math.min(o*n+r,t.length):t.length,s=r;l>s;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,i),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}}(),o.str=function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},e.exports=o},function(e,t,n){function r(e,t){if(null==e)return o;switch(typeof e){case"function":return"undefined"!=typeof t?function(n,r,o){return e.call(t,n,r,o)}:e;case"object":return function(t){return i(t,e)};case"string":case"number":return a(e)}}var o=n(622),a=n(623),i=n(627);e.exports=r},function(e,t,n){function r(e){var t=[];return o(e,function(e,n){t.push(e)}),t}var o=n(135);e.exports=r},function(e,t,n){var r,o;r=[n(633)],o=function(e){function t(t,n){return-1!==e(t,n)}return t}.apply(t,r),!(void 0!==o&&(e.exports=o))},function(e,t,n){var r,o;r=[n(634),n(635),n(637)],o=function(e,t,n){function r(r,o){if(null==r)return e;switch(typeof r){case"function":return"undefined"!=typeof o?function(e,t,n){return r.call(o,e,t,n)}:r;case"object":return function(e){return n(e,r)};case"string":case"number":return t(r)}}return r}.apply(t,r),!(void 0!==o&&(e.exports=o))},function(e,t,n){var r,o;r=[n(636),n(100),n(138),n(246)],o=function(e,t,n,r){function o(t,r){switch(n(t)){case"Object":return a(t,r);case"Array":return i(t,r);default:return e(t)}}function a(e,n){if(r(e)){var a={};return t(e,function(e,t){this[t]=o(e,n)},a),a}return n?n(e):e}function i(e,t){for(var n=[],r=-1,a=e.length;++r=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=n(646),a=n(266),i=n(29),s=n(110),l=n(154),u=n(5),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:l,processUpdates:function(e,t){for(var n,i=null,c=null,f=0;f-1?void 0:i(!1),!u.plugins[n]){t.extractEvents?void 0:i(!1),u.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i(!1)}}}function o(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?i(!1):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];a(s,t,n)}return!0}return e.registrationName?(a(e.registrationName,t,n),!0):!1}function a(e,t,n){u.registrationNameModules[e]?i(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=n(5),s=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?i(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];l.hasOwnProperty(n)&&l[n]===o||(l[n]?i(!1):void 0,l[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=u},function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"//")}function o(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function i(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);v(e,a,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function l(e,t,n){var o=e.result,a=e.keyPrefix,i=e.func,s=e.context,l=i.call(s,t,e.count++);Array.isArray(l)?u(l,o,n,m.thatReturnsArgument):null!=l&&(g.isValidElement(l)&&(l=g.cloneAndReplaceKey(l,a+(l!==t?r(l.key||"")+"/":"")+n)),o.push(l))}function u(e,t,n,o,a){var i="";null!=n&&(i=r(n)+"/");var u=s.getPooled(t,i,o,a);v(e,l,u),s.release(u)}function c(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),r}function f(e,t,n){return null}function p(e,t){return v(e,f,null)}function d(e){ +var t=[];return u(e,t,null,m.thatReturnsArgument),t}var h=n(48),g=n(24),m=n(35),v=n(156),_=h.twoArgumentPooler,y=h.fourArgumentPooler,b=/\/(?!\/)/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,_),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,y);var w={forEach:i,map:c,mapIntoWithKeyPrefixInternal:u,count:p,toArray:d};e.exports=w},function(e,t,n){"use strict";function r(e,t){var n=x.hasOwnProperty(t)?x[t]:null;E.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?m(!1):void 0),e.hasOwnProperty(t)&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?m(!1):void 0)}function o(e,t){if(t){"function"==typeof t?m(!1):void 0,p.isValidElement(t)?m(!1):void 0;var n=e.prototype;t.hasOwnProperty(y)&&C.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==y){var a=t[o];if(r(n,o),C.hasOwnProperty(o))C[o](e,a);else{var i=x.hasOwnProperty(o),u=n.hasOwnProperty(o),c="function"==typeof a,f=c&&!i&&!u&&t.autobind!==!1;if(f)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[o]=a,n[o]=a;else if(u){var d=x[o];!i||d!==b.DEFINE_MANY_MERGED&&d!==b.DEFINE_MANY?m(!1):void 0,d===b.DEFINE_MANY_MERGED?n[o]=s(n[o],a):d===b.DEFINE_MANY&&(n[o]=l(n[o],a))}else n[o]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in C;o?m(!1):void 0;var a=n in e;a?m(!1):void 0,e[n]=r}}}function i(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:m(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?m(!1):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,n)}}var f=n(253),p=n(24),d=(n(105),n(104),n(268)),h=n(10),g=n(75),m=n(5),v=n(98),_=n(47),y=(n(9),_({mixins:null})),b=v({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),w=[],x={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},C={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n"+s+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=i.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(30),a=n(107),i=n(10),s=n(35),l={initialize:s,close:function(){p.isBatchingUpdates=!1}},u={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[u,l];i(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var f=new r,p={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=p.isBatchingUpdates;p.isBatchingUpdates=!0,i?e(t,n,r,o,a):f.perform(e,null,t,n,r,o,a)}};e.exports=p},function(e,t,n){"use strict";function r(){if(!T){T=!0,v.EventEmitter.injectReactEventListener(m),v.EventPluginHub.injectEventPluginOrder(s),v.EventPluginHub.injectInstanceHandle(_),v.EventPluginHub.injectMount(y),v.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:C,EnterLeaveEventPlugin:l,ChangeEventPlugin:a,SelectEventPlugin:w,BeforeInputEventPlugin:o}),v.NativeComponent.injectGenericComponentClass(h),v.NativeComponent.injectTextComponentClass(g),v.Class.injectMixin(f),v.DOMProperty.injectDOMPropertyConfig(c),v.DOMProperty.injectDOMPropertyConfig(E),v.EmptyComponent.injectEmptyComponent("noscript"),v.Updates.injectReconcileTransaction(b),v.Updates.injectBatchingStrategy(d),v.RootIndex.injectCreateReactRootIndex(u.canUseDOM?i.createReactRootIndex:x.createReactRootIndex),v.Component.injectEnvironment(p)}}var o=n(642),a=n(644),i=n(645),s=n(647),l=n(648),u=n(20),c=n(651),f=n(653),p=n(142),d=n(258),h=n(657),g=n(257),m=n(665),v=n(666),_=n(64),y=n(23),b=n(670),w=n(676),x=n(677),C=n(678),E=n(675),T=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){if(f.current){var e=f.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;a("uniqueKey",e,t)}}function a(e,t,n){var o=r();if(!o){var a="string"==typeof n?n:n.displayName||n.name;a&&(o=" Check the top-level render call using <"+a+">.")}var i=h[e]||(h[e]={});if(i[o])return null;i[o]=!0;var s={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==f.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function i(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=a},function(e,t,n){"use strict";var r=n(98),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=f[t];return null==n&&(f[t]=n=u(t)),n}function o(e){return c?void 0:l(!1),new c(e.type,e.props)}function a(e){return new p(e)}function i(e){return e instanceof p}var s=n(10),l=n(5),u=null,c=null,f={},p=null,d={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){p=e},injectComponentClasses:function(e){s(f,e)}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:a,isTextComponent:i,injection:d};e.exports=h},function(e,t,n){"use strict";function r(e,t){}var o=(n(9),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});e.exports=o},function(e,t,n){"use strict";function r(e){function t(t,n,r,o,a,i){if(o=o||x,i=i||r,null==n[r]){var s=y[a];return t?new Error("Required "+s+" `"+i+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,a,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,a){var i=t[n],s=g(i);if(s!==e){var l=y[o],u=m(i);return new Error("Invalid "+l+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function a(){return r(b.thatReturns(null))}function i(e){function t(t,n,r,o,a){var i=t[n];if(!Array.isArray(i)){var s=y[o],l=g(i);return new Error("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>"}var _=n(24),y=n(104),b=n(35),w=n(151),x="<>",C={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:a(),arrayOf:i,element:s(),instanceOf:l,node:p(),objectOf:c,oneOf:u,oneOfType:f,shape:d};e.exports=C},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==t?o(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=n(5);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=n(20),a=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t){e.exports="\nprecision mediump float;\n\nuniform sampler2D compositeSampler;\nuniform sampler2D layerSampler;\nvarying vec2 v_texCoord;\n\nvoid main() {\n // Sample the texture containing what we have composited so far\n vec4 color = texture2D(compositeSampler, v_texCoord);\n\n // Sample the new layer to be composited in\n vec4 compColor = texture2D(layerSampler, v_texCoord);\n\n/*\n // Choose the fragment with the greater depth value\n if (color.a > compColor.a) {\n gl_FragColor = color;\n } else {\n gl_FragColor = compColor;\n }\n*/\n\n // Another way to choose the fragment with the greater depth value\n float stepVal = step((compColor.a - color.a), 0.0);\n gl_FragColor = (stepVal * color) + ((1.0 - stepVal) * compColor);\n\n}\n"},function(e,t){e.exports='\nprecision mediump float;\n\nuniform sampler2D underLayerSampler;\nuniform sampler2D overLayerSampler;\nvarying vec2 v_texCoord;\n\nvoid main() {\n vec4 overColor = texture2D(overLayerSampler, v_texCoord);\n vec3 colA = overColor.rgb;\n float alphA = overColor.a;\n\n vec4 underColor = texture2D(underLayerSampler, v_texCoord);\n vec3 colB = underColor.rgb;\n float alphB = underColor.a;\n\n // Well-known "over" operator (A over B, both partially transparent)\n float alphOut = alphA + (alphB * (1.0 - alphA));\n vec3 colOut = ((colA * alphA) + (colB * alphB * (1.0 - alphA))) / alphOut;\n\n gl_FragColor = vec4(colOut.rgb, alphOut);\n}'},function(e,t){e.exports="\nprecision mediump float;\n\nuniform sampler2D u_image;\nvarying vec2 v_texCoord;\n\nvoid main() {\n gl_FragColor = texture2D(u_image, vec2(v_texCoord.x, 1.0 - v_texCoord.y));\n}"},function(e,t,n){var r=n(566);"string"==typeof r&&(r=[[e.id,r,""]]);n(6)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(580);"string"==typeof r&&(r=[[e.id,r,""]]);n(6)(r,{});r.locals&&(e.exports=r.locals)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){var r;/** @license MIT License (c) copyright 2013-2014 original author or authors */ !function(o){r=function(e){function t(e,t){return u(e,this,null==t?[]:c.call(t))}function r(e){var t=arguments.length>1?c.call(arguments,1):[];return function(){return u(e,this,t.concat(c.call(arguments)))}}function o(e,t,n){return l(r,t,n,e)}function a(e){var t=c.call(arguments,1);return function(){var n=this,r=c.call(arguments),o=s.apply(n,[e].concat(r));return i.reduce(t,function(e,t){return t.call(n,e)},o)}}var i=n(49),s=i["try"],l=n(758),u=n(161)(i.Promise),c=Array.prototype.slice;return{lift:r,liftAll:o,call:s,apply:t,compose:a}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(n(11))},function(e,t,n){var r;/** @license MIT License (c) copyright 2010-2014 original author or authors */ !function(o){"use strict";r=function(){function e(t){Error.call(this),this.message=t,this.name=e.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(n(11))},function(e,t,n){var r;/** @license MIT License (c) copyright 2010-2014 original author or authors */ !function(o){"use strict";r=function(){function e(){return{state:"pending"}}function t(e){return{state:"rejected",reason:e}}function n(e){return{state:"fulfilled",value:e}}function r(r){var o=r.state();return 0===o?e():o>0?n(r.value):t(r.value)}return{pending:e,fulfilled:n,rejected:t,inspect:r}}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(n(11))},function(e,t,n){var r;/** @license MIT License (c) copyright 2010-2014 original author or authors */ !function(o){"use strict";r=function(){function e(e){try{throw new Error}catch(t){e.stack=t.stack}}function t(e){e.stack=(new Error).stack}function n(e){return o(e)}function r(e){var t=new Error;return t.stack=n(e),t}function o(e){for(var t=!1,n="",r=0;re._max_retry_delay&&(e._retry_delay=e._max_retry_delay),e._retry_count+=1;var t;return t=e._retry&&e._retry_count<=e._max_retries?{count:e._retry_count,delay:e._retry_delay,will_retry:!0}:{count:null,delay:null,will_retry:!1},e._retry_delay_growth&&(e._retry_delay=e._retry_delay*e._retry_delay_growth),t},l.prototype.open=function(){function e(){if(t._transport=t._create_transport(),t._transport)t._session=new o.Session(t._transport,t._defer,t._options.onchallenge),t._session_close_reason=null,t._session_close_message=null,t._transport.onopen=function(){t._autoreconnect_reset(),t._connect_successes+=1,t._session.join(t._options.realm,t._options.authmethods,t._options.authid)},t._session.onjoin=function(e){if(t.onopen)try{t.onopen(t._session,e)}catch(n){i.debug("Exception raised from app code while firing Connection.onopen()",n)}},t._session.onleave=function(e,n){t._session_close_reason=e,t._session_close_message=n.message||"",t._retry=!1,t._transport.close(1e3)},t._transport.onclose=function(n){t._autoreconnect_reset_timer(),t._transport=null;var r=null;0===t._connect_successes?(r="unreachable",t._retry_if_unreachable||(t._retry=!1)):r=n.wasClean?"closed":"lost";var o=t._autoreconnect_advance();if(t.onclose){var a={reason:t._session_close_reason,message:t._session_close_message,retry_delay:o.delay,retry_count:o.count,will_retry:o.will_retry};try{var s=t.onclose(r,a)}catch(l){i.debug("Exception raised from app code while firing Connection.onclose()",l)}}t._session&&(t._session._id=null,t._session=null,t._session_close_reason=null,t._session_close_message=null),t._retry&&!s&&(o.will_retry?(t._is_retrying=!0,i.debug("retrying in "+o.delay+" s"),t._retry_timer=setTimeout(e,1e3*o.delay)):i.debug("giving up trying to reconnect"))};else if(t._retry=!1,t.onclose){var n={reason:null,message:null,retry_delay:null,retry_count:null,will_retry:!1};t.onclose("unsupported",n)}}var t=this;if(t._transport)throw"connection already open (or opening)";t._autoreconnect_reset(),t._retry=!0,e()},l.prototype.close=function(e,t){var n=this;if(!n._transport&&!n._is_retrying)throw"connection already closed";n._retry=!1,n._session&&n._session.isOpen?n._session.leave(e,t):n._transport&&n._transport.close(1e3)},Object.defineProperty(l.prototype,"defer",{get:function(){return this._defer}}),Object.defineProperty(l.prototype,"session",{get:function(){return this._session}}),Object.defineProperty(l.prototype,"isOpen",{get:function(){return!(!this._session||!this._session.isOpen)}}),Object.defineProperty(l.prototype,"isConnected",{get:function(){return!!this._transport}}),Object.defineProperty(l.prototype,"transport",{get:function(){return this._transport?this._transport:{info:{type:"none",url:null,protocol:null}}}}),Object.defineProperty(l.prototype,"isRetrying",{get:function(){return this._is_retrying}}),t.Connection=l}).call(t,function(){return this}())},function(e,t,n){n(296),n(292),n(297),n(294),n(293),n(298),n(295)},function(e,t){"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e){"use strict";var t,n,r,o;if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");if(n=Object(this),t=n.length>>>0,o=0,arguments.length>=2)r=arguments[1];else{for(;t>o&&!o in n;)o++;if(o>=t)throw new TypeError("Reduce of empty array with no initial value");r=n[o++]}for(;t>o;o++)o in n&&(r=e(r,n[o],o,n));return r}),"indexOf"in Array.prototype||(Array.prototype.indexOf=function(e,t){void 0===t&&(t=0),0>t&&(t+=this.length),0>t&&(t=0);for(var n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1}),"lastIndexOf"in Array.prototype||(Array.prototype.lastIndexOf=function(e,t){for(void 0===t&&(t=this.length-1),0>t&&(t+=this.length),t>this.length-1&&(t=this.length-1),t++;t-- >0;)if(t in this&&this[t]===e)return t;return-1}),"forEach"in Array.prototype||(Array.prototype.forEach=function(e,t){for(var n=0,r=this.length;r>n;n++)n in this&&e.call(t,this[n],n,this)}),"map"in Array.prototype||(Array.prototype.map=function(e,t){for(var n=new Array(this.length),r=0,o=this.length;o>r;r++)r in this&&(n[r]=e.call(t,this[r],r,this));return n}),"filter"in Array.prototype||(Array.prototype.filter=function(e,t){for(var n,r=[],o=0,a=this.length;a>o;o++)o in this&&e.call(t,n=this[o],o,this)&&r.push(n);return r}),"every"in Array.prototype||(Array.prototype.every=function(e,t){for(var n=0,r=this.length;r>n;n++)if(n in this&&!e.call(t,this[n],n,this))return!1;return!0}),"some"in Array.prototype||(Array.prototype.some=function(e,t){for(var n=0,r=this.length;r>n;n++)if(n in this&&e.call(t,this[n],n,this))return!0;return!1}),"function"!=typeof Array.prototype.reduceRight&&(Array.prototype.reduceRight=function(e){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var t,n=Object(this),r=n.length>>>0,o=r-1;if(arguments.length>=2)t=arguments[1];else{for(;o>=0&&!o in n;)o--;if(0>o)throw new TypeError("Reduce of empty array with no initial value");t=n[o--]}for(;o>=0;o--)o in n&&(t=e(t,n[o],o,n));return t})},function(e,t){(function(e){!function(e){e||(e=window.console={log:function(e,t,n,r,o){},info:function(e,t,n,r,o){},warn:function(e,t,n,r,o){},error:function(e,t,n,r,o){},assert:function(e,t){}}),"object"==typeof e.log&&(e.log=Function.prototype.call.bind(e.log,e),e.info=Function.prototype.call.bind(e.info,e),e.warn=Function.prototype.call.bind(e.warn,e),e.error=Function.prototype.call.bind(e.error,e),e.debug=Function.prototype.call.bind(e.info,e)),"group"in e||(e.group=function(t){e.info("\n--- "+t+" ---\n")}),"groupEnd"in e||(e.groupEnd=function(){e.log("\n")}),"assert"in e||(e.assert=function(e,t){if(!e)try{throw new Error("assertion failed: "+t)}catch(n){setTimeout(function(){throw n},0)}}),"time"in e||function(){var t={};e.time=function(e){t[e]=(new Date).getTime()},e.timeEnd=function(n){var r=(new Date).getTime(),o=n in t?r-t[n]:0;e.info(n+": "+o+"ms")}}()}(e.console)}).call(t,function(){return this}())},function(e,t){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);return function(){return t.apply(e,Array.prototype.concat.apply(n,arguments))}})},function(module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return 10>e?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,a,i,s=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,i=[],"[object Array]"===Object.prototype.toString.apply(l)){for(a=l.length,n=0;a>n;n+=1)i[n]=str(n,l)||"null";return o=0===i.length?"[]":gap?"[\n"+gap+i.join(",\n"+gap)+"\n"+s+"]":"["+i.join(",")+"]",gap=s,o}if(rep&&"object"==typeof rep)for(a=rep.length,n=0;a>n;n+=1)"string"==typeof rep[n]&&(r=rep[n],o=str(r,l),o&&i.push(quote(r)+(gap?": ":":")+o));else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(o=str(r,l),o&&i.push(quote(r)+(gap?": ":":")+o));return o=0===i.length?"{}":gap?"{\n"+gap+i.join(",\n"+gap)+"\n"+s+"}":"{"+i.join(",")+"}",gap=s,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx,escapable,gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(text,reviver){function walk(e,t){var n,r,o=e[t];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),exports.JSON=JSON},function(e,t){Object.create||(Object.create=function(){function e(){}return function(t){if(1!=arguments.length)throw new Error("Object.create implementation only accepts one parameter.");return e.prototype=t,new e}}()),Object.keys||(Object.keys=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var a,i,s=[];for(a in o)e.call(o,a)&&s.push(a);if(t)for(i=0;r>i;i++)e.call(o,n[i])&&s.push(n[i]);return s}}())},function(e,t){"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")})},function(e,t){(function(e){"undefined"==typeof e.Uint8Array&&!function(e,t){"use strict";function n(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return null===e?"null":"object"}}function r(e){return Object.prototype.toString.call(e).replace(/^\[object *|\]$/g,"")}function o(e){return"function"==typeof e}function a(e){if(null===e||e===D)throw TypeError();return Object(e)}function i(e){return e>>0}function s(e){return e>>>0}function l(e){function t(t){Object.defineProperty(e,t,{get:function(){return e._getter(t)},set:function(n){e._setter(t,n)},enumerable:!0,configurable:!1})}if(e.length>R)throw RangeError("Array too large for polyfill");var n;for(n=0;n>n}function c(e,t){var n=32-t;return e<>>n}function f(e){return[255&e]}function p(e){return u(e[0],8)}function d(e){return[255&e]}function h(e){return c(e[0],8)}function g(e){return e=j(Number(e)),[0>e?0:e>255?255:255&e]}function m(e){return[e>>8&255,255&e]}function v(e){return u(e[0]<<8|e[1],16)}function _(e){return[e>>8&255,255&e]}function y(e){return c(e[0]<<8|e[1],16)}function b(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function w(e){return u(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function x(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function C(e){return c(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function E(e,t,n){function r(e){var t=O(e),n=e-t;return.5>n?t:n>.5?t+1:t%2?t+1:t}var o,a,i,s,l,u,c,f=(1<e?1:0):0===e?(a=0,i=0,o=1/e===-(1/0)?1:0):(o=0>e,e=I(e),e>=B(2,1-f)?(a=L(O(N(e)/A),1023),i=r(e/B(2,a)*B(2,n)),i/B(2,n)>=2&&(a+=1,i=1),a>f?(a=(1<>=1;return f.reverse(),i=f.join(""),s=(1<0?l*B(2,u-s)*(1+c/B(2,n)):0!==c?l*B(2,-(s-1))*(c/B(2,n)):0>l?-0:0}function P(e){return T(e,11,52)}function k(e){return E(e,11,52)}function M(e){return T(e,8,23)}function S(e){return E(e,8,23)}var D=void 0,R=1e5,A=Math.LN2,I=Math.abs,O=Math.floor,N=Math.log,F=Math.max,L=Math.min,B=Math.pow,j=Math.round;!function(){var e=Object.defineProperty,t=!function(){try{return Object.defineProperty({},"x",{})}catch(e){return!1}}();e&&!t||(Object.defineProperty=function(t,n,r){if(e)try{return e(t,n,r)}catch(o){}if(t!==Object(t))throw TypeError("Object.defineProperty called on non-object");return Object.prototype.__defineGetter__&&"get"in r&&Object.prototype.__defineGetter__.call(t,n,r.get),Object.prototype.__defineSetter__&&"set"in r&&Object.prototype.__defineSetter__.call(t,n,r.set),"value"in r&&(t[n]=r.value),t})}(),function(){function u(e){if(e=i(e),0>e)throw RangeError("ArrayBuffer size is not a small enough positive integer.");Object.defineProperty(this,"byteLength",{value:e}),Object.defineProperty(this,"_bytes",{value:Array(e)});for(var t=0;e>t;t+=1)this._bytes[t]=0}function c(){if(!arguments.length||"object"!=typeof arguments[0])return function(e){if(e=i(e),0>e)throw RangeError("length is not a small enough positive integer.");Object.defineProperty(this,"length",{value:e}),Object.defineProperty(this,"byteLength",{value:e*this.BYTES_PER_ELEMENT}),Object.defineProperty(this,"buffer",{value:new u(this.byteLength)}),Object.defineProperty(this,"byteOffset",{value:0})}.apply(this,arguments);if(arguments.length>=1&&"object"===n(arguments[0])&&arguments[0]instanceof c)return function(e){if(this.constructor!==e.constructor)throw TypeError();var t=e.length*this.BYTES_PER_ELEMENT;Object.defineProperty(this,"buffer",{value:new u(t)}),Object.defineProperty(this,"byteLength",{value:t}),Object.defineProperty(this,"byteOffset",{value:0}),Object.defineProperty(this,"length",{value:e.length});for(var n=0;n=1&&"object"===n(arguments[0])&&!(arguments[0]instanceof c)&&!(arguments[0]instanceof u||"ArrayBuffer"===r(arguments[0])))return function(e){var t=e.length*this.BYTES_PER_ELEMENT;Object.defineProperty(this,"buffer",{value:new u(t)}),Object.defineProperty(this,"byteLength",{value:t}),Object.defineProperty(this,"byteOffset",{value:0}),Object.defineProperty(this,"length",{value:e.length});for(var n=0;n=1&&"object"===n(arguments[0])&&(arguments[0]instanceof u||"ArrayBuffer"===r(arguments[0])))return function(e,t,n){if(t=s(t),t>e.byteLength)throw RangeError("byteOffset out of range");if(t%this.BYTES_PER_ELEMENT)throw RangeError("buffer length minus the byteOffset is not a multiple of the element size.");if(n===D){var r=e.byteLength-t;if(r%this.BYTES_PER_ELEMENT)throw RangeError("length of buffer minus byteOffset not a multiple of the element size");n=r/this.BYTES_PER_ELEMENT}else n=s(n),r=n*this.BYTES_PER_ELEMENT;if(t+r>e.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:e}),Object.defineProperty(this,"byteLength",{value:r}),Object.defineProperty(this,"byteOffset",{value:t}),Object.defineProperty(this,"length",{value:n})}.apply(this,arguments);throw TypeError()}function E(e,t,n){var r=function(){Object.defineProperty(this,"constructor",{value:r}),c.apply(this,arguments),l(this)};"__proto__"in r?r.__proto__=c:(r.from=c.from,r.of=c.of),r.BYTES_PER_ELEMENT=e;var o=function(){};return o.prototype=T,r.prototype=new o,Object.defineProperty(r.prototype,"BYTES_PER_ELEMENT",{value:e}),Object.defineProperty(r.prototype,"_pack",{value:t}),Object.defineProperty(r.prototype,"_unpack",{value:n}),r}e.ArrayBuffer=e.ArrayBuffer||u,Object.defineProperty(c,"from",{value:function(e){return new this(e)}}),Object.defineProperty(c,"of",{value:function(){return new this(arguments)}});var T={};c.prototype=T,Object.defineProperty(c.prototype,"_getter",{value:function(e){if(arguments.length<1)throw SyntaxError("Not enough arguments");if(e=s(e),e>=this.length)return D;var t,n,r=[];for(t=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;t=this.length)){var n,r,o=this._pack(t);for(n=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;nc?F(l+c,0):L(c,l);var f,p=i(t);f=0>p?F(l+p,0):L(p,l);var d;d=n===D?l:i(n);var h;h=0>d?F(l+d,0):L(d,l);var g,m=L(h-f,l-u);for(fromu?(g=-1,f=f+m-1,u=u+m-1):g=1;count>0;)r._setter(u,r._getter(f)),f+=g,u+=g,m-=1;return r}}),Object.defineProperty(c.prototype,"every",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(!o(e))throw TypeError();for(var r=arguments[1],a=0;n>a;a++)if(!e.call(r,t._getter(a),a,t))return!1;return!0}}),Object.defineProperty(c.prototype,"fill",{value:function(e){var t=arguments[1],n=arguments[2],r=a(this),o=r.length,l=s(o);l=F(l,0);var u,c=i(t);u=0>c?F(l+c,0):L(c,l);var f;f=n===D?l:i(n);var p;for(p=0>f?F(l+f,0):L(f,l);p>u;)r._setter(u,e),u+=1;return r}}),Object.defineProperty(c.prototype,"filter",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(!o(e))throw TypeError();for(var r=[],a=arguments[1],i=0;n>i;i++){var l=t._getter(i);e.call(a,l,i,t)&&r.push(l)}return new this.constructor(r)}}),Object.defineProperty(c.prototype,"find",{value:function(e){var t=a(this),n=t.length,r=s(n);if(!o(e))throw TypeError();for(var i=arguments.length>1?arguments[1]:D,l=0;r>l;){var u=t._getter(l),c=e.call(i,u,l,t);if(Boolean(c))return u;++l}return D}}),Object.defineProperty(c.prototype,"findIndex",{value:function(e){var t=a(this),n=t.length,r=s(n);if(!o(e))throw TypeError();for(var i=arguments.length>1?arguments[1]:D,l=0;r>l;){var u=t._getter(l),c=e.call(i,u,l,t);if(Boolean(c))return l;++l}return-1}}),Object.defineProperty(c.prototype,"forEach",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(!o(e))throw TypeError();for(var r=arguments[1],a=0;n>a;a++)e.call(r,t._getter(a),a,t)}}),Object.defineProperty(c.prototype,"indexOf",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(0===n)return-1;var r,o=0;if(arguments.length>0&&(r=Number(arguments[1]),r!==o?o=0:0!==r&&r!==1/0&&r!==-(1/0)&&(o=(r>0||-1)*O(I(r)))),o>=n)return-1;for(var a=o>=0?o:F(n-I(o),0);n>a;a++)if(t._getter(a)===e)return a;return-1}}),Object.defineProperty(c.prototype,"join",{value:function(e){if(this===D||null===this)throw TypeError();for(var t=Object(this),n=s(t.length),r=Array(n),o=0;n>o;++o)r[o]=t._getter(o);return r.join(e===D?",":e)}}),Object.defineProperty(c.prototype,"lastIndexOf",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(0===n)return-1;var r=n;arguments.length>1&&(r=Number(arguments[1]),r!==r?r=0:0!==r&&r!==1/0&&r!==-(1/0)&&(r=(r>0||-1)*O(I(r))));for(var o=r>=0?L(r,n-1):n-I(r);o>=0;o--)if(t._getter(o)===e)return o;return-1}}),Object.defineProperty(c.prototype,"map",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(!o(e))throw TypeError();var r=[];r.length=n;for(var a=arguments[1],i=0;n>i;i++)r[i]=e.call(a,t._getter(i),i,t);return new this.constructor(r)}}),Object.defineProperty(c.prototype,"reduce",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(!o(e))throw TypeError();if(0===n&&1===arguments.length)throw TypeError();var r,a=0;for(r=arguments.length>=2?arguments[1]:t._getter(a++);n>a;)r=e.call(D,r,t._getter(a),a,t),a++;return r}}),Object.defineProperty(c.prototype,"reduceRight",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(!o(e))throw TypeError();if(0===n&&1===arguments.length)throw TypeError();var r,a=n-1;for(r=arguments.length>=2?arguments[1]:t._getter(a--);a>=0;)r=e.call(D,r,t._getter(a),a,t),a--;return r}}),Object.defineProperty(c.prototype,"reverse",{value:function(){if(this===D||null===this)throw TypeError();for(var e=Object(this),t=s(e.length),n=O(t/2),r=0,o=t-1;n>r;++r,--o){var a=e._getter(r);e._setter(r,e._getter(o)),e._setter(o,a)}return e}}),Object.defineProperty(c.prototype,"set",{value:function(e,t){if(arguments.length<1)throw SyntaxError("Not enough arguments");var n,r,o,a,i,l,u,c,f,p;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(n=arguments[0],o=s(arguments[1]),o+n.length>this.length)throw RangeError("Offset plus length of array is out of range");if(c=this.byteOffset+o*this.BYTES_PER_ELEMENT,f=n.length*this.BYTES_PER_ELEMENT,n.buffer===this.buffer){for(p=[],i=0,l=n.byteOffset;f>i;i+=1,l+=1)p[i]=n.buffer._bytes[l];for(i=0,u=c;f>i;i+=1,u+=1)this.buffer._bytes[u]=p[i]}else for(i=0,l=n.byteOffset,u=c;f>i;i+=1,l+=1,u+=1)this.buffer._bytes[u]=n.buffer._bytes[l]}else{if("object"!=typeof arguments[0]||"undefined"==typeof arguments[0].length)throw TypeError("Unexpected argument type(s)");if(r=arguments[0],a=s(r.length),o=s(arguments[1]),o+a>this.length)throw RangeError("Offset plus length of array is out of range");for(i=0;a>i;i+=1)l=r[i],this._setter(o+i,Number(l))}}}),Object.defineProperty(c.prototype,"slice",{value:function(e,t){for(var n=a(this),r=n.length,o=s(r),l=i(e),u=0>l?F(o+l,0):L(l,o),c=t===D?o:i(t),f=0>c?F(o+c,0):L(c,o),p=f-u,d=n.constructor,h=new d(p),g=0;f>u;){var m=n._getter(u);h._setter(g,m),++u,++g}return h}}),Object.defineProperty(c.prototype,"some",{value:function(e){if(this===D||null===this)throw TypeError();var t=Object(this),n=s(t.length);if(!o(e))throw TypeError();for(var r=arguments[1],a=0;n>a;a++)if(e.call(r,t._getter(a),a,t))return!0;return!1}}),Object.defineProperty(c.prototype,"sort",{value:function(e){if(this===D||null===this)throw TypeError();for(var t=Object(this),n=s(t.length),r=Array(n),o=0;n>o;++o)r[o]=t._getter(o);for(e?r.sort(e):r.sort(),o=0;n>o;++o)t._setter(o,r[o]);return t}}),Object.defineProperty(c.prototype,"subarray",{value:function(e,t){function n(e,t,n){return t>e?t:e>n?n:e}e=i(e),t=i(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),0>e&&(e=this.length+e),0>t&&(t=this.length+t),e=n(e,0,this.length),t=n(t,0,this.length);var r=t-e;return 0>r&&(r=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)}});var R=E(1,f,p),A=E(1,d,h),N=E(1,g,h),B=E(2,m,v),j=E(2,_,y),W=E(4,b,w),U=E(4,x,C),V=E(4,S,M),z=E(8,k,P);e.Int8Array=t.Int8Array=e.Int8Array||R,e.Uint8Array=t.Uint8Array=e.Uint8Array||A,e.Uint8ClampedArray=t.Uint8ClampedArray=e.Uint8ClampedArray||N,e.Int16Array=t.Int16Array=e.Int16Array||B,e.Uint16Array=t.Uint16Array=e.Uint16Array||j,e.Int32Array=t.Int32Array=e.Int32Array||W,e.Uint32Array=t.Uint32Array=e.Uint32Array||U,e.Float32Array=t.Float32Array=e.Float32Array||V,e.Float64Array=t.Float64Array=e.Float64Array||z}(),function(){function t(e,t){return o(e.get)?e.get(t):e[t]}function n(e,t,n){if(!(e instanceof ArrayBuffer||"ArrayBuffer"===r(e)))throw TypeError();if(t=s(t),t>e.byteLength)throw RangeError("byteOffset out of range");if(n=n===D?e.byteLength-t:s(n),t+n>e.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:e}),Object.defineProperty(this,"byteLength",{value:n}),Object.defineProperty(this,"byteOffset",{value:t})}function a(n){return function(r,o){if(r=s(r),r+n.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");r+=this.byteOffset;for(var a=new e.Uint8Array(this.buffer,r,n.BYTES_PER_ELEMENT),i=[],u=0;uthis.byteLength)throw RangeError("Array index out of range");var i,u,c=new n([o]),f=new e.Uint8Array(c.buffer),p=[];for(i=0;i>8-s%1*8)){if(r=a.charCodeAt(s+=.75),r>255)throw new n("INVALID_CHARACTER_ERR: DOM Exception 5");t=t<<8|r}return i}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(36);e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else{var i=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)&&(t+="[]"),o.isArray(e)||(e=[e]),o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),i.push(r(t)+"="+r(e))}))}),a=i.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t){"use strict";e.exports=function(e,t){return e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")}},function(e,t,n){"use strict";var r=n(36);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";var r=n(36);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(36);e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),function(e){o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t&&(a[t]=a[t]?a[t]+", "+n:n)}),a):a}},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Rendering=t.React=t.NativeUI=t.IO=t.Interaction=t.InfoViz=t.Common=void 0,n(425);var o=n(322),a=r(o),i=n(363),s=r(i),l=n(365),u=r(l),c=n(358),f=r(c),p=n(367),d=r(p),h=n(400),g=r(h),m=n(424),v=r(m);t.Common=a["default"],t.InfoViz=s["default"],t.Interaction=u["default"],t.IO=f["default"],t.NativeUI=d["default"],t.React=g["default"],t.Rendering=v["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={lookuptables:{spectralflip:{controlpoints:[{x:0,r:.3686274509803922,g:.3098039215686275,b:.6352941176470588},{x:.1,r:.196078431372549,g:.5333333333333333,b:.7411764705882353},{x:.2,r:.4,g:.7607843137254902,b:.6470588235294118},{x:.3,r:.6705882352941176,g:.8666666666666667,b:.6431372549019608},{x:.4,r:.9019607843137255,g:.9607843137254902,b:.596078431372549},{x:.5,r:1,g:1,b:.7490196078431373},{x:.6,r:.996078431372549,g:.8784313725490196,b:.5450980392156862},{x:.7,r:.9921568627450981,g:.6823529411764706,b:.3803921568627451},{x:.8,r:.9568627450980393,g:.4274509803921568,b:.2627450980392157},{x:.9,r:.8352941176470589,g:.2431372549019608,b:.3098039215686275},{x:1,r:.6196078431372549,g:.00392156862745098,b:.2588235294117647}],range:[0,1]},cold2warm:{controlpoints:[{x:0,r:.23137254902,g:.298039215686,b:.752941176471},{x:.5,r:.865,g:.865,b:.865},{x:1,r:.705882352941,g:.0156862745098,b:.149019607843}],range:[0,1]},rainbow:{controlpoints:[{x:0,r:0,g:0,b:1},{x:.25,r:0,g:1,b:1},{x:.5,r:0,g:1,b:0},{x:.75,r:1,g:1,b:0},{x:1,r:1,g:0,b:0}],range:[0,1]},"gray scale":{controlpoints:[{x:0,r:0,g:0,b:0},{x:1,r:1,g:1,b:1}],range:[0,1]},"gray scale flip":{controlpoints:[{x:0,r:1,g:1,b:1},{x:1,r:0,g:0,b:0}],range:[0,1]},spectral:{controlpoints:[{x:0,r:.6196078431372549,g:.00392156862745098,b:.2588235294117647},{x:.1,r:.8352941176470589,g:.2431372549019608,b:.3098039215686275},{x:.2,r:.9568627450980393,g:.4274509803921568,b:.2627450980392157},{x:.3,r:.9921568627450981,g:.6823529411764706,b:.3803921568627451},{x:.4,r:.996078431372549,g:.8784313725490196,b:.5450980392156862},{x:.5,r:1,g:1,b:.7490196078431373},{x:.6,r:.9019607843137255,g:.9607843137254902,b:.596078431372549},{x:.7,r:.6705882352941176,g:.8666666666666667,b:.6431372549019608},{x:.8,r:.4,g:.7607843137254902,b:.6470588235294118},{x:.9,r:.196078431372549,g:.5333333333333333,b:.7411764705882353},{x:1,r:.3686274509803922,g:.3098039215686275,b:.6352941176470588}],range:[0,1]},warm:{controlpoints:[{x:0,r:.4745098039215686,g:.09019607843137255,b:.09019607843137255},{x:.2,r:.7098039215686275,g:.00392156862745098,b:.00392156862745098},{x:.4,r:.9372549019607843,g:.2784313725490196,b:.09803921568627451},{x:.6,r:.9764705882352941,g:.5137254901960784,b:.1411764705882353},{x:.8,r:1,g:.7058823529411765,b:0},{x:1,r:1,g:.8980392156862745,b:.02352941176470588}],range:[0,1]},cool:{controlpoints:[{x:0,r:.4588235294117647,g:.6941176470588235,b:.00392156862745098},{x:.1666666666666667,r:.3450980392156863,g:.5019607843137255,b:.1607843137254902},{x:.3333333333333333,r:.3137254901960784,g:.8431372549019608,b:.7490196078431373},{x:.5,r:.1098039215686274,g:.5843137254901961,b:.803921568627451},{x:.6666666666666666,r:.2313725490196079,g:.407843137254902,b:.6705882352941176},{x:.8333333333333334,r:.6039215686274509,g:.407843137254902,b:1},{x:1,r:.3725490196078431,g:.2,b:.5019607843137255}],range:[0,1]},blues:{controlpoints:[{x:0,r:.2313725490196079,g:.407843137254902,b:.6705882352941176},{x:.1666666666666667,r:.1098039215686274,g:.5843137254901961,b:.803921568627451},{x:.3333333333333333,r:.3058823529411765,g:.8509803921568627,b:.9176470588235294},{x:.5,r:.4509803921568628,g:.6039215686274509,b:.8352941176470589},{x:.6666666666666666,r:.2588235294117647,g:.2392156862745098,b:.6627450980392157},{x:.8333333333333334,r:.3137254901960784,g:.3294117647058823,b:.5294117647058824},{x:1,r:.06274509803921569,g:.1647058823529412,b:.3215686274509804}],range:[0,1]},wildflower:{controlpoints:[{x:0,r:.1098039215686274,g:.5843137254901961,b:.803921568627451},{x:.1666666666666667,r:.2313725490196079,g:.407843137254902,b:.6705882352941176},{x:.3333333333333333,r:.4,g:.2431372549019608,b:.7176470588235294},{x:.5,r:.6352941176470588,g:.3294117647058823,b:.8117647058823529},{x:.6666666666666666,r:.8705882352941177,g:.3803921568627451,b:.807843137254902},{x:.8333333333333334,r:.8627450980392157,g:.3803921568627451,b:.5843137254901961},{x:1,r:.2392156862745098,g:.06274509803921569,b:.3215686274509804}],range:[0,1]},citrus:{controlpoints:[{x:0,r:.396078431372549,g:.4862745098039216,b:.2156862745098039},{x:.2,r:.4588235294117647,g:.6941176470588235,b:.00392156862745098},{x:.4,r:.6980392156862745,g:.7294117647058823,b:.1882352941176471},{x:.6,r:1,g:.8980392156862745,b:.02352941176470588},{x:.8,r:1,g:.7058823529411765,b:0},{x:1,r:.9764705882352941,g:.5137254901960784,b:.1411764705882353}],range:[0,1]},organge2purple:{controlpoints:[{x:0,r:.4980392156862745,g:.2313725490196079,b:.03137254901960784},{x:.1,r:.7019607843137254,g:.3450980392156863,b:.02352941176470588},{x:.2,r:.8784313725490196,g:.5098039215686274,b:.0784313725490196},{x:.3,r:.9921568627450981,g:.7215686274509804,b:.3882352941176471},{x:.4,r:.996078431372549,g:.8784313725490196,b:.7137254901960784},{x:.5,r:.9686274509803922,g:.9686274509803922,b:.9686274509803922},{x:.6,r:.8470588235294118,g:.8549019607843137,b:.9215686274509803},{x:.7,r:.6980392156862745,g:.6705882352941176,b:.8235294117647058},{x:.8,r:.5019607843137255,g:.4509803921568628,b:.6745098039215687},{x:.9,r:.3294117647058823,g:.1529411764705882,b:.5333333333333333},{x:1,r:.1764705882352941,g:0,b:.2941176470588235}],range:[0,1]},brown2green:{controlpoints:[{x:0,r:.3294117647058823,g:.1882352941176471,b:.0196078431372549},{x:.1,r:.5490196078431373,g:.3176470588235294,b:.0392156862745098},{x:.2,r:.7490196078431373,g:.5058823529411764,b:.1764705882352941},{x:.3,r:.8745098039215686,g:.7607843137254902,b:.4901960784313725},{x:.4,r:.9647058823529412,g:.9098039215686274,b:.7647058823529411},{x:.5,r:.9607843137254902,g:.9607843137254902,b:.9607843137254902},{x:.6,r:.7803921568627451,g:.9176470588235294,b:.8980392156862745},{x:.7,r:.5019607843137255,g:.803921568627451,b:.7568627450980392},{x:.8,r:.207843137254902,g:.592156862745098,b:.5607843137254902},{x:.9,r:.00392156862745098,g:.4,b:.3686274509803922},{x:1,r:0,g:.2352941176470588,b:.1882352941176471}],range:[0,1]},blue2green:{controlpoints:[{x:0,r:.9686274509803922,g:.9882352941176471,b:.9921568627450981},{x:.125,r:.8980392156862745,g:.9607843137254902,b:.9764705882352941},{x:.25,r:.8,g:.9254901960784314,b:.9019607843137255},{x:.375,r:.6,g:.8470588235294118,b:.788235294117647},{x:.5,r:.4,g:.7607843137254902,b:.6431372549019608},{x:.625,r:.2549019607843137,g:.6823529411764706,b:.4627450980392157},{x:.75,r:.1372549019607843,g:.5450980392156862,b:.2705882352941176},{x:.875,r:0,g:.4274509803921568,b:.1725490196078431},{x:1,r:0,g:.2666666666666667,b:.1058823529411765}],range:[0,1]},yellow2brown:{controlpoints:[{x:0,r:1,g:1,b:.8980392156862745},{x:.125,r:1,g:.9686274509803922,b:.7372549019607844},{x:.25,r:.996078431372549,g:.8901960784313725,b:.5686274509803921},{x:.375,r:.996078431372549,g:.7686274509803922,b:.3098039215686275},{x:.5,r:.996078431372549,g:.6,b:.1607843137254902},{x:.625,r:.9254901960784314,g:.4392156862745098,b:.0784313725490196},{x:.75,r:.8,g:.2980392156862745,b:.00784313725490196},{x:.875,r:.6,g:.203921568627451,b:.01568627450980392},{x:1,r:.4,g:.1450980392156863,b:.02352941176470588}],range:[0,1]},blue2purple:{controlpoints:[{x:0,r:.9686274509803922,g:.9882352941176471,b:.9921568627450981},{x:.125,r:.8784313725490196,g:.9254901960784314,b:.9568627450980393},{x:.25,r:.7490196078431373,g:.8274509803921568,b:.9019607843137255},{x:.375,r:.6196078431372549,g:.7372549019607844,b:.8549019607843137},{x:.5,r:.5490196078431373,g:.5882352941176471,b:.7764705882352941},{x:.625,r:.5490196078431373,g:.4196078431372549,b:.6941176470588235},{x:.75,r:.5333333333333333,g:.2549019607843137,b:.615686274509804},{x:.875,r:.5058823529411764,g:.05882352941176471,b:.4862745098039216},{x:1,r:.3019607843137255,g:0,b:.2941176470588235}],range:[0,1]},ocean:{controlpoints:[{x:0,r:.039215,g:.090195,b:.25098},{x:.125,r:.133333,g:.364706,b:.521569},{x:.25,r:.321569,g:.760784,b:.8},{x:.375,r:.690196,g:.960784,b:.894118},{x:.5,r:.552941,g:.921569,b:.552941},{x:.625,r:.329412,g:.6,b:.239216},{x:.75,r:.211765,g:.34902,b:.078435},{x:.875,r:.011765,g:.207843,b:.023525},{x:1,r:.286275,g:.294118,b:.301961}],range:[0,1]},earth:{controlpoints:[{x:0,r:.392157,g:.392157,b:.392157},{x:.586175,r:.392157,g:.392157,b:.392157},{x:.589041,r:.141176,g:.345098,b:.478431},{x:.589042,r:.501961,g:.694118,b:.172549},{x:.617699,r:.74902,g:.560784,b:.188235},{x:.789648,r:.752941,g:.741176,b:.729412},{x:.993079,r:.796078,g:.780392,b:.772549},{x:1,r:.796078,g:.780392,b:.772549}],range:[0,1]}},swatches:{colors:[{r:255,g:255,b:255},{r:204,g:255,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:204,g:204,b:255},{r:255,g:204,b:255},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:204,b:204},{r:255,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:255,b:204},{r:204,g:204,b:204},{r:153,g:255,b:255},{r:153,g:204,b:255},{r:153,g:153,b:255},{r:153,g:153,b:255},{r:153,g:153,b:255},{r:153,g:153,b:255},{r:153,g:153,b:255},{r:153,g:153,b:255},{r:153,g:153,b:255},{r:204,g:153,b:255},{r:255,g:153,b:255},{r:255,g:153,b:204},{r:255,g:153,b:153},{r:255,g:153,b:153},{r:255,g:153,b:153},{r:255,g:153,b:153},{r:255,g:153,b:153},{r:255,g:153,b:153},{r:255,g:153,b:153},{r:255,g:204,b:153},{r:255,g:255,b:153},{r:204,g:255,b:153},{r:153,g:255,b:153},{r:153,g:255,b:153},{r:153,g:255,b:153},{r:153,g:255,b:153},{r:153,g:255,b:153},{r:153,g:255,b:153},{r:153,g:255,b:153},{r:153,g:255,b:204},{r:204,g:204,b:204},{r:102,g:255,b:255},{r:102,g:204,b:255},{r:102,g:153,b:255},{r:102,g:102,b:255},{r:102,g:102,b:255},{r:102,g:102,b:255},{r:102,g:102,b:255},{r:102,g:102,b:255},{r:153,g:102,b:255},{r:204,g:102,b:255},{r:255,g:102,b:255},{r:255,g:102,b:204},{r:255,g:102,b:153},{r:255,g:102,b:102},{r:255,g:102,b:102},{r:255,g:102,b:102},{r:255,g:102,b:102},{r:255,g:102,b:102},{r:255,g:153,b:102},{r:255,g:204,b:102},{r:255,g:255,b:102},{r:204,g:255,b:102},{r:153,g:255,b:102},{r:102,g:255,b:102},{r:102,g:255,b:102},{r:102,g:255,b:102},{r:102,g:255,b:102},{r:102,g:255,b:102},{r:102,g:255,b:153},{r:102,g:255,b:204},{r:153,g:153,b:153},{r:51,g:255,b:255},{r:51,g:204,b:255},{r:51,g:153,b:255},{r:51,g:102,b:255},{r:51,g:51,b:255},{r:51,g:51,b:255},{r:51,g:51,b:255},{r:102,g:51,b:255},{r:153,g:51,b:255},{r:204,g:51,b:255},{r:255,g:51,b:255},{r:255,g:51,b:204},{r:255,g:51,b:153},{r:255,g:51,b:102},{r:255,g:51,b:51},{r:255,g:51,b:51},{r:255,g:51,b:51},{r:255,g:102,b:51},{r:255,g:153,b:51},{r:255,g:204,b:51},{r:255,g:255,b:51},{r:204,g:255,b:51},{r:153,g:255,b:51},{r:102,g:255,b:51},{r:51,g:255,b:51},{r:51,g:255,b:51},{r:51,g:255,b:51},{r:51,g:255,b:102},{r:51,g:255,b:153},{r:51,g:255,b:204},{r:153,g:153,b:153},{r:0,g:255,b:255},{r:0,g:204,b:255},{r:0,g:153,b:255},{r:0,g:102,b:255},{r:0,g:51,b:255},{r:0,g:0,b:255},{r:51,g:0,b:255},{r:102,g:0,b:255},{r:153,g:0,b:255},{r:204,g:0,b:255},{r:255,g:0,b:255},{r:255,g:0,b:204},{r:255,g:0,b:153},{r:255,g:0,b:102},{r:255,g:0,b:51},{r:255,g:0,b:0},{r:255,g:51,b:0},{r:255,g:102,b:0},{r:255,g:153,b:0},{r:255,g:204,b:0},{r:255,g:255,b:0},{r:204,g:255,b:0},{r:153,g:255,b:0},{r:102,g:255,b:0},{r:51,g:255,b:0},{r:0,g:255,b:0},{r:0,g:255,b:51},{r:0,g:255,b:102},{r:0,g:255,b:153},{r:0,g:255,b:204},{r:102,g:102,b:102},{r:0,g:204,b:204},{r:0,g:204,b:204},{r:0,g:153,b:204},{r:0,g:102,b:204},{r:0,g:51,b:204},{r:0,g:0,b:204},{r:51,g:0,b:204},{r:102,g:0,b:204},{r:153,g:0,b:204},{r:204,g:0,b:204},{r:204,g:0,b:204},{r:204,g:0,b:204},{r:204,g:0,b:153},{r:204,g:0,b:102},{r:204,g:0,b:51},{r:204,g:0,b:0},{r:204,g:51,b:0},{r:204,g:102,b:0},{r:204,g:153,b:0},{r:204,g:204,b:0},{r:204,g:204,b:0},{r:204,g:204,b:0},{r:153,g:204,b:0},{r:102,g:204,b:0},{r:51,g:204,b:0},{r:0,g:204,b:0},{r:0,g:204,b:51},{r:0,g:204,b:102},{r:0,g:204,b:153},{r:0,g:204,b:204},{r:102,g:102,b:102},{r:0,g:153,b:153},{r:0,g:153,b:153},{r:0,g:153,b:153},{r:0,g:102,b:153},{r:0,g:51,b:153},{r:0,g:0,b:153},{r:51,g:0,b:153},{r:102,g:0,b:153},{r:153,g:0,b:153},{r:153,g:0,b:153},{r:153,g:0,b:153},{r:153,g:0,b:153},{r:153,g:0,b:153},{r:153,g:0,b:102},{r:153,g:0,b:51},{r:153,g:0,b:0},{r:153,g:51,b:0},{r:153,g:102,b:0},{r:153,g:153,b:0},{r:153,g:153,b:0},{r:153,g:153,b:0},{r:153,g:153,b:0},{r:153,g:153,b:0},{r:102,g:153,b:0},{r:51,g:153,b:0},{r:0,g:153,b:0},{r:0,g:153,b:51},{r:0,g:153,b:102},{r:0,g:153,b:153},{r:0,g:153,b:153},{r:51,g:51,b:51},{r:0,g:102,b:102},{r:0,g:102,b:102},{r:0,g:102,b:102},{r:0,g:102,b:102},{r:0,g:51,b:102},{r:0,g:0,b:102},{r:51,g:0,b:102},{r:102,g:0,b:102},{r:102,g:0,b:102},{r:102,g:0,b:102},{r:102,g:0,b:102},{r:102,g:0,b:102},{r:102,g:0,b:102},{r:102,g:0,b:102},{r:102,g:0,b:51},{r:102,g:0,b:0},{r:102,g:51,b:0},{r:102,g:102,b:0},{r:102,g:102,b:0},{r:102,g:102,b:0},{r:102,g:102,b:0},{r:102,g:102,b:0},{r:102,g:102,b:0},{r:102,g:102,b:0},{r:51,g:102,b:0},{r:0,g:102,b:0},{r:0,g:102,b:51},{r:0,g:102,b:102},{r:0,g:102,b:102},{r:0,g:102,b:102},{r:0,g:0,b:0},{r:0,g:51,b:51},{r:0,g:51,b:51},{r:0,g:51,b:51},{r:0,g:51,b:51},{r:0,g:51,b:51},{r:0,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:51},{r:51,g:0,b:0},{r:51,g:51,b:0},{r:51,g:51,b:0},{r:51,g:51,b:0},{r:51,g:51,b:0},{r:51,g:51,b:0},{r:51,g:51,b:0},{r:51,g:51,b:0},{r:51,g:51,b:0},{r:0,g:51,b:0},{r:0,g:51,b:51},{r:0,g:51,b:51},{r:0,g:51,b:51},{r:0,g:51,b:51},{r:51,g:51,b:51}],columns:31,rows:9}}},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n1)return!0;var t=c.indexOf(e[0]);return"_"!==s[2*t+1]}function r(e){if(!s||e.length>1)return l[e][0];var t=c.indexOf(e[0]),n=s[2*t+1];return"_"===n?l[e][0]:n}var a=this,i=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];o(this,e),this.originalData=t,this.visibilityState={},this.activeState={},this.editMode={},this.activeColors={},this.noTrigger=!0,this.handleOpacity=i,this.opacityMap={},this.nbLayers=0;var s=t.CompositePipeline.default_pipeline,l=t.CompositePipeline.layer_fields,u={};t.CompositePipeline.pipeline.forEach(function(e){u[e.ids.join("")]=!0,a.setLayerVisible(e.ids.join(""),n(e.ids.join("")))}),t.CompositePipeline.layers.forEach(function(e){a.activeState[e]=u[e]?!0:n(e),a.activeColors[e]=r(e),a.opacityMap[e]=100,a.nbLayers++}),this.noTrigger=!1,this.triggerChange()}return a(e,[{key:"onChange",value:function(e){return this.on(l,e)}},{key:"onOpacityChange",value:function(e){return this.on(u,e)}},{key:"TopicChange",value:function(){return l}},{key:"triggerChange",value:function(){if(!this.noTrigger){var e=this.getPipelineQuery();this.emit(l,e)}}},{key:"isLayerActive",value:function(e){return this.activeState[e]}},{key:"setLayerActive",value:function(e,t){this.activeState[e]!==t&&(this.activeState[e]=t,this.triggerChange())}},{key:"toggleLayerActive",value:function(e){this.activeState[e]=!this.activeState[e],this.triggerChange()}},{key:"isLayerVisible",value:function(e){return this.visibilityState[e]}},{key:"setLayerVisible",value:function(e,t){if(this.visibilityState[e]!==t){this.visibilityState[e]=t;for(var n=e.length;n--;)this.visibilityState[e[n]]=t;this.triggerChange()}}},{key:"toggleLayerVisible",value:function(e){this.setLayerVisible(e,!this.visibilityState[e])}},{key:"toggleEditMode",value:function(e){this.editMode[e]=!this.editMode[e],this.triggerChange()}},{key:"isLayerInEditMode",value:function(e){for(var t in this.editMode)if(this.editMode[t]&&-1!==t.indexOf(e))return!0;return!1}},{key:"getColor",value:function(e){return this.originalData.CompositePipeline.layer_fields[e[0]]}},{key:"getColorToLabel",value:function(e){return this.originalData.CompositePipeline.fields[e]}},{key:"isActiveColor",value:function(e,t){return this.activeColors[e[0]]===t}},{key:"setActiveColor",value:function(e,t){for(var n=e.length;n--;)this.activeColors[e[n]]=t;this.triggerChange()}},{key:"getPipelineQuery",value:function(){var e=this,t="";return this.originalData.CompositePipeline.layers.forEach(function(n){var r=e.isLayerActive(n)&&e.isLayerVisible(n)?e.activeColors[n]:"_";t+=n,t+=r}),t}},{key:"getPipelineDescription",value:function(){return this.originalData.CompositePipeline.pipeline}},{key:"getOpacity",value:function(e){return this.opacityMap[e]}},{key:"hasOpacity",value:function(){return this.handleOpacity}},{key:"setOpacity",value:function(e,t){if(this.opacityMap[e]!==t){this.opacityMap[e]=t;for(var n=[],r=0;r=e.values.length&&(e.direction*=-1,n=e.values.length-2),0>n&&(e.direction*=-1,n=1),n>=0&&n=e.values.length&&(n=e.values.length-1),0>n&&(n=0),e.idx!==n?(e.idx=n,!0):!1}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;nl.deltaT?0:l.deltaT)}},c=function(t,n){if(l.dataCount[n.topic]++,t.url&&"blob"===t.type&&-1!==t.data.type.indexOf("image")&&void 0===t.image&&(t.image=new Image,t.image.src=t.url),t.error)return l.emit("error",n);var r=(0,m["default"])(l.dataCount),o=(0,h["default"])(l.dataCount),a=(0,E["default"])(l.dataCount);r!==o||(1===a?0!==r:0)||e(function(){for(;l.requests.length;)u(l.requests.pop())})};for(var f in n.arguments){var d=n.arguments[f];this.args[f]={label:d.label?d.label:f,idx:d["default"]?d["default"]:0,direction:1,anime:!1,values:d.values,ui:d.ui?d.ui:"list",delta:d.loop?"reverse"===d.loop?a:"modulo"===d.loop?i:s:s}}n.data.forEach(function(e){var t=l.id+e.name;l.dataMetadata[e.name]=e.metadata||{},(e.categories||[P]).forEach(function(e){(0,p["default"])(l.categories,e)?l.categories[e].push(t):l.categories[e]=[t]}),T.registerURL(t,(e.absolute?"":r)+e.pattern,e.type,e.mimeType),T.on(t,c),l.dataCount[t]=0}),this.exploreState={order:n.arguments_order.map(function(e){return e}).reverse(),idxs:n.arguments_order.map(function(e){return 0}),sizes:n.arguments_order.map(function(e){return l.getSize(e)}).reverse(),onDataReady:!0,animate:!1},this.explorationSubscription=this.onDataChange(function(){l.exploreState.animate&&l.exploreState.onDataReady&&e(function(e){return l.nextExploration()})})}return l(t,[{key:"getDataMetaData",value:function(e){return this.dataMetadata[e]}},{key:"getQuery",value:function(){var e={};for(var t in this.args){var n=this.args[t];e[t]=n.values[n.idx]}for(var r in this.externalArgs)e[r]=this.externalArgs[r];return e}},{key:"fetchData",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?P:arguments[0],n=[],r=this.getQuery(),o={urls:[]};t.name?(o.category=t.name,t.categories.forEach(function(t){e.categories[t]&&(n=n.concat(e.categories[t]))})):this.categories[t]&&(o.category=t,n=n.concat(this.categories[t])),n.length&&this.requests.push(o),n.forEach(function(t){e.dataCount[t]--,o.urls.push({key:t.slice(e.id.length),url:T.fetch(t,r)})})}},{key:"lazyFetchData",value:function(){var e=arguments.length<=0||void 0===arguments[0]?P:arguments[0];this.lazyFetchRequest||this.requests.length>0?this.lazyFetchRequest=e:this.fetchData(e)}},{key:"first",value:function(e){var t=this.args[e];return t&&0!==t.idx?(t.idx=0,this.emit("state.change.first",{value:t.values[t.idx],idx:t.idx,name:e,instance:this}),!0):!1}},{key:"last",value:function n(e){var t=this.args[e],n=t.values.length-1;return t&&t.idx!==n?(t.idx=n,this.emit("state.change.last",{value:t.values[t.idx],idx:t.idx,name:e,instance:this}),!0):!1}},{key:"next",value:function(e){var t=this.args[e];return t&&t.delta(t,1)?(this.emit("state.change.next",{delta:1,value:t.values[t.idx],idx:t.idx,name:e,instance:this}),!0):!1}},{key:"previous",value:function(e){var t=this.args[e];return t&&t.delta(t,-1)?(this.emit("state.change.previous",{delta:-1,value:t.values[t.idx],idx:t.idx,name:e,instance:this}),!0):!1}},{key:"setValue",value:function(e,t){var n=this.args[e],r=n?n.values.indexOf(t):0;return n&&-1!==r&&r!==n.idx?(n.idx=r,this.emit("state.change.value",{value:n.values[n.idx],idx:n.idx,name:e,instance:this}),!0):void 0===n&&this.externalArgs[e]!==t?(this.externalArgs[e]=t,this.emit("state.change.value",{value:t,name:e,external:!0,instance:this}),!0):!1}},{key:"setIndex",value:function(e,t){var n=this.args[e];return n&&t>-1&&tc.step&&(c.lastCoord=Number(e[f]),l=c.orientation*p>0?t.next(c.name)||l:t.previous(c.name)||l)}}return l&&t.lazyFetchData(),u}if(this.mouseListener)return this.mouseListener;this.lastTime={},this.newMouseTimeout=250;var t=this,n={};for(var r in this.originalData.arguments){var o=this.originalData.arguments[r];if(o.bind&&o.bind.mouse)for(var a in o.bind.mouse){var i=(0,x["default"])(o.bind.mouse[a]);i.name=r,i.lastCoord=0,void 0===i.orientation&&(i.orientation=1),n[a]?n[a].push(i):n[a]=[i]}}this.mouseListener={};for(var s in n)this.mouseListener[s]=e,this.lastTime[s]=(0,b["default"])();return this.mouseListener}},{key:"onStateChange",value:function(e){return this.on("state.change.*",e)}},{key:"onDataChange",value:function(e){return this.on(P,e)}},{key:"clone",value:function(){return new t(this.originalData,this.basepath)}},{key:"destroy",value:function(){this.off(),this.explorationSubscription.unsubscribe(),this.explorationSubscription=null}},{key:"exploreQuery",value:function(){var e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],t=this,n=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];n?this.exploreState.idxs=this.exploreState.order.map(function(e){return 0}):this.exploreState.idxs=this.exploreState.order.map(function(e){return t.getIndex(e)}),this.exploreState.onDataReady=r,this.exploreState.animate=e,this.exploreState.animate&&this.nextExploration(),this.emit("state.change.exploration",{exploration:this.exploreState,instance:this})}},{key:"nextExploration",value:function(){var e=this;if(this.exploreState.animate){this.exploreState.order.forEach(function(t,n){e.setIndex(t,e.exploreState.idxs[n])});var t=this.exploreState.idxs,n=this.exploreState.sizes,r=t.length;for(t[r-1]++;r--;)if(!(t[r]0))return this.exploreState.animate=!1,this.emit("state.change.exploration",{exploration:this.exploreState,instance:this}),this.exploreState.animate;t[r]=0,t[r-1]++}this.lazyFetchData()}return this.exploreState.animate}},{key:"setCacheSize",value:function(e){T.cacheSize=e}},{key:"getCacheSize",value:function(){return T.cacheSize}},{key:"getMemoryUsage",value:function(){return T.cacheData.size}},{key:"link",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?null:arguments[1],r=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];return e.onStateChange(function(e,o){void 0!==e.name&&void 0!==e.value&&(null!==n&&-1===n.indexOf(e.name)||t.setValue(e.name,e.value)&&r&&t.lazyFetchData())})}}]),t}();t["default"]=M,_["default"].mixInto(M)}).call(t,n(66).setImmediate)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(114),a=r(o),i=n(325),s=r(i),l=n(173),u=r(l),c=n(326),f=r(c);t["default"]={DataManager:a["default"],GeometryDataModel:s["default"],ProcessLauncher:u["default"],QueryDataModel:f["default"]}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,n=e.filterQuery,r=e.mustContain,o=e.busy,a=e.encodeQueryAsString;return{listAssetStores:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=["limit","offset","sort","sortdir"],o=n(e,r);return t._.get("/assetstore",{params:o})},createAssetStore:function(e){var i=["name","type"],s=["root","db","bucket","prefix","accessKeyId","secretKey","service"],l=n(e,[].concat(i,s)),u=r.apply(void 0,[e].concat(i)),c=u.missingKeys,f=u.promise;return c?f:o(t._.post("/assetstore"+a(l)))},updateAssetStore:function(e){var r=["name","root","db","current","_id"],o=n(e,r.slice(0,r.length-1));return t._.put("/assetstore/"+e._id,{params:o})},deleteAssetStore:function(e){return t._["delete"]("/assetstore/"+e)}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,n=e.filterQuery,r=e.mustContain,o=e.busy,a=e.encodeQueryAsString;return{listCollections:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=["text","limit","offset","sort","sortdir"],o=n.apply(void 0,[e].concat(r));return t._.get("/collection",{params:o})},createCollection:function(e){var i=["name","description","public"],s=n.apply(void 0,[e].concat(i)),l=r.apply(void 0,[s].concat(i)),u=l.missingKeys,c=l.promise;return u?o(t._.post("/collection"+a(s))):c},deleteCollection:function(e){return o(t._["delete"]("/collection/"+e))},getCollection:function(e){return o(t._.get("/collection/"+e))},editCollection:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=["name","description"],s=n.apply(void 0,[e].concat(i)),l=r(e,"_id"),u=l.missingKeys,c=l.promise;return u?o(t._.put("/collection/"+e._id+a(s))):c},getCollectionAccess:function(e){return o(t._.get("/collection/"+e+"/access"))},editCollectionAccess:function(e){var i=["access","public"],s=n.apply(void 0,[e].concat(i)),l=r(e,"_id"),u=l.missingKeys,c=l.promise;return u?o(t._.put("/collection/"+e._id+"/access"+a(s))):c}}}},function(e,t){"use strict";function n(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){function t(e,t,r){var a=n,i=new FormData;return i.append("uploadId",e),i.append("offset",t),i.append("chunk",r),s(o._.post("/file/chunk",i,{transformRequest:a}))}function r(e,n){return new Promise(function(r,a){s(o._.post("/file"+l(e))).then(function(e){var o,i=10485760,s=0,l=Math.floor(n.size/i);(o=function(c){var f;u(c,n.size),c+i>=n.size?(f=n.slice(c),t(e.data._id,c,f).then(function(e){u(n.size,n.size),r(e)})["catch"](function(e){console.warn("could not upload final chunk"),console.warn(e),a(e)})):(f=n.slice(c,c+i),t(e.data._id,c,f).then(function(e){var t="";s+=1,t+="chunk "+s+" of "+l+" uploaded",o(c+i)})["catch"](function(e){console.warn("could not upload chunk"),console.warn(e),a(e)}))})(0)})["catch"](function(e){console.warn("Could not upload file"),console.warn(e),a(e)})})}var o=e.client,a=e.filterQuery,i=e.mustContain,s=e.busy,l=e.encodeQueryAsString,u=e.progress;return{uploadFileToItem:r,getUploadOffset:function(e){return s(o._.get("/file/offset",{params:{uploadId:e}}))},downloadFile:function(e){return s(o._.get("/file/"+e+"/download"))},updateFileContent:function(e,t){return s(o._.put("/file/"+e+"/contents?size="+t))},deleteFile:function(e){return s(o._["delete"]("/file/"+e))},editFile:function(e){var t=["name","mimeType"],n=a.apply(void 0,[e].concat(t)),r=i(e,"_id"),u=r.missingKeys,c=r.promise;return u?s(o._.put("/file/"+e._id+l(n))):c},newFile:function(e){var t=["parentType","parentId","name","size","mimeType","linkUrl"],n=a.apply(void 0,[e].concat(t)),r=i(e,"parentType","parentId","name"),u=r.missingKeys,c=r.promise;return u?s(o._.post("/file"+l(n))):c}}}},function(e,t){"use strict";function n(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,r=e.filterQuery,o=e.mustContain,a=e.busy,i=e.encodeQueryAsString;return{listFolders:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=["parentType","parentId","text","limit","offset","sort","sortdir"],o=r.apply(void 0,[e].concat(n));return a(t._.get("/folder",{params:o}))},createFolder:function(e){var n=["parentType","parentId","name","description","public"],s=r.apply(void 0,[e].concat(n)),l=o(e,"parentType","parentId","name"),u=l.missingKeys,c=l.promise;return u?a(t._.post("/folder"+i(s))):c},editFolderMetaData:function(e,r){return a(t._.put("/folder/"+e,r,{transformRequest:n}))},deleteFolder:function(e){return a(t._["delete"]("/folder/"+e))},getFolder:function(e){return a(t._.get("/folder/"+e))},editFolder:function(e){var n=["parentType","parentId","name","description"],s=r.apply(void 0,[e].concat(n)),l=o(e,"_id"),u=l.missingKeys,c=l.promise;return u?a(t._.put("/folder/"+e._id+i(s))):c},downloadFolder:function(e){return a(t._.get("/folder/"+e+"/download"))},getFolderAccess:function(e){return a(t._.get("/folder/"+e+"/access"))},editFolderAccess:function(e){var n=["access","public"],s=r.apply(void 0,[e].concat(n)),l=o(e,"_id"),u=l.missingKeys,c=l.promise;return u?a(t._.put("/folder/"+e._id+"/access"+i(s))):c}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,n=e.filterQuery,r=e.mustContain,o=e.busy,a=e.encodeQueryAsString;return{updateGroupModerator:function(e,n,r){var o="/group/"+e+"/moderator?userId="+n;return r?t._.post(o):t._["delete"](o)},updateGroupAdmin:function(e,n,r){var o="/group/"+e+"/admin?userId="+n;return r?t._.post(o):t._["delete"](o)},createGroup:function(e){var i=["name","description","public"],s=n.apply(void 0,[e].concat(i)),l=r(s,"name"),u=l.missingKeys,c=l.promise;return u?o(t._.post("/group"+a(s))):c},deleteGroup:function(e){return o(t._["delete"]("/group/"+e))},getGroup:function(e){return o(t._.get("/group/"+e))},editGroup:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=["name","description","public"],s=n.apply(void 0,[e].concat(i)),l=r(e,"_id"),u=l.missingKeys,c=l.promise;return u?o(t._.put("/group/"+e._id+a(s))):c},listGroupInvitations:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=["limit","offset","sort","sortdir"],i=n.apply(void 0,[r].concat(a));return o(t._.get("/group/"+e+"/invitation",{params:i}))},addGroupInvitation:function(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=["userId","level","quiet"],l=n.apply(void 0,[i].concat(s)),u=r(l,"userId"),c=u.missingKeys,f=u.promise;return c?o(t._.post("/group/"+e+"/invitation"+a(l))):f},listGroupMembers:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=["limit","offset","sort","sortdir"],i=n.apply(void 0,[r].concat(a));return o(t._.get("/group/"+e+"/member",{params:i}))},removeUserFromGroup:function(e,n){var r={userId:n};return o(t._["delete"]("/group/"+e+"/member",{params:r}))},joinGroup:function(e){return o(t._.post("/group/"+e+"/member"))},getGroupAccess:function(e){return o(t._.get("/group/"+e+"/access"))}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(328),a=r(o),i=n(329),s=r(i),l=n(330),u=r(l),c=n(331),f=r(c),p=n(332),d=r(p),h=n(334),g=r(h),m=n(335),v=r(m),_=n(336),y=r(_),b=n(337),w=r(b);t["default"]=[a["default"],s["default"],u["default"],f["default"],d["default"],g["default"],v["default"],y["default"],w["default"]]},function(e,t){"use strict";function n(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,r=e.filterQuery,o=e.mustContain,a=e.busy,i=e.encodeQueryAsString;return{downloadItem:function(e){return a(t._.get("/item/"+e+"/download"))},updateItemMetadata:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return a(t._.put("/item/"+e+"/metadata",r,{transformRequest:n}))},listItems:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=["folderId","text","limit","offset","sort","sortdir"],o=r(e,n);return a(t._.get("/item",{params:o}))},createItem:function(e,n){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2],o={folderId:e,name:n,description:r};return a(t._.post("/item"+i(o)))},listFiles:function(e,n){var o=["limit","offset","sort"],i=r(n,o);return e?a(t._.get("/item/"+e+"/files",{params:i})):new Promise(function(e,t){return t("No argument id provided")})},getItemRootPath:function(e){return a(t._.get("/item/"+e+"/rootpath"))},getItem:function(e){return a(t._.get("/item/"+e))},deleteItem:function(e){return a(t._["delete"]("/item/"+e))},editItem:function(e){var n=["folderId","name","description"],s=r.apply(void 0,[e].concat(n)),l=o(s,"_id"),u=l.missingKeys,c=l.promise;return u?a(t._.put("/item/"+e._id+i(s))):c},copyItem:function(e,n){var s=["folderId","name","description"],l=r.apply(void 0,[n].concat(s)),u=o(l,"folderId"),c=u.missingKeys,f=u.promise;return c?a(t._.post("/item/"+e+"/copy"+i(l))):f}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,n=(e.filterQuery,e.mustContain,e.busy);e.encodeQueryAsString;return{downloadResources:function(e){var r=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],o={resourceList:JSON.toString(e),withMetadata:r};return n(t._.get("/resource/download",{params:o}))},searchResources:function(e,r){var o={q:JSON.toString(e),types:JSON.toString(r)};return n(t._.get("/resource/search",{params:o}))},deleteResources:function(e){var r={resources:JSON.toString(e)};return n(t._["delete"]("/resource",{params:r}))}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,n=e.filterQuery,r=(e.mustContain,e.busy),o=e.encodeQueryAsString;return{deleteSetting:function(e){return r(t._["delete"]("/system/setting"+o({key:e})))},getSettings:function(e){var o=["key","list","default"],a=n.apply(void 0,[e].concat(o));return r(t._.get("/system/setting",{params:a}))},setSettings:function(e){var n=Object.keys(e).map(function(t){var n=e[t];return{key:t,value:n}});return r(t._.put("/system/setting"+o({list:n})))},getServerVersion:function(){return r(t._.get("/system/version"))},listUnfinishedUpload:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],o=["uploadId","userId","parentId","assetstoreId","minimumAge","includeUntracked","limit","offset","sort","sortdir"],a=n.apply(void 0,[e].concat(o));return r(t._.get("/system/uploads",{params:a}))},removeUnfinishedUpload:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],a=["uploadId","userId","parentId","assetstoreId","minimumAge","includeUntracked"],i=n.apply(void 0,[e].concat(a));return r(t._["delete"]("/system/uploads"+o(i)))},listPlugins:function(){return r(t._.get("/system/plugins"))},setActivePlugins:function(e){return r(t._.put("/system/plugins"+o({plugins:e})))}}}},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];return r.forEach(function(n){t[n]=e[n]}),t}function s(){for(var e,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=[],r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];return o.forEach(function(e){void 0===t[e]&&n.push(e)}),0===n.length?(n=void 0,e=new Promise(function(e,t){return e()})):e=new Promise(function(e,t){return t("Missing keys "+n.join(", "))}),{missingKeys:n,promise:e}}function l(){function e(t){Array.isArray(t)?t.forEach(e):!function(){var e=t(F);Object.keys(e).forEach(function(t){N[t]=e[t]})}()}var t,n,r,o=arguments.length<=0||void 0===arguments[0]?location:arguments[0],l=!1,u=null,f=0,p={},b=new v,w=function(){b.emit(h,--f)},x=function(e){return b.emit(h,++f),e.then(w,w),e},C=o.protocol,E=o.hostname,T=o.port,P=o.basepath,k=void 0===P?"/api/v1":P,M=C+"//"+E+":"+T+k,S=function W(){EventSource&&(u=new EventSource(M+"/notification/stream"),u.onmessage=function(e){var t=JSON.parse(e.data);b.emit(m,t)},u.onerror=function(e){setTimeout(function(){u&&2===u.readyState?W():u=null},1e4)})},D={extractLocalToken:function(){try{return document.cookie.split("girderToken=")[1].split(";")[0].trim()}catch(e){return}},updateGirderInstance:function(){var e=1e3,t={};n&&(t["Girder-Token"]=n),p._=c["default"].create({baseURL:M,timeout:e,headers:t})},updateAuthenticationState:function(e){l!==!!e&&(e||(t=void 0,n=void 0,p.user=t),l=!!e,A(),r=e?_():y(),b.emit(d,l),l&&null===u&&S())}},R=D.extractLocalToken,A=D.updateGirderInstance,I=D.updateAuthenticationState,O=function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1];b.emit(g,{current:e,total:t})},N={login:function(e,r){var o={username:e,password:r};return x(p._.get("/user/authentication",{auth:o}).then(function(e){n=e.data.authToken.token,t=e.data.user,p.user=t,I(!0)}))},logout:function(){return x(p._["delete"]("/user/authentication").then(function(e){I(!1),document&&document.cookie&&(document.cookie="Girder-Token=;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},function(e){console.log("loggout error",e)}))},me:function(){return x(p._.get("/user/me"))},isLoggedIn:function(){return r},getLoggedInUser:function(){return t},onAuthChange:function(e){return b.on(d,e)},onBusy:function(e){return b.on(h,e)},onProgress:function(e){return b.on(g,e)},onEvent:function(e){return b.on(m,e)},destroy:function(){b.off()}};r=new Promise(function(e,r){n=o.token||R(),A(),n?N.me().then(function(n){t=n.data,p.user=t,I(!0),e()},function(e){I(!1),r()}):r()});for(var F={client:p,filterQuery:i,mustContain:s,notification:b,busy:x,encodeQueryAsString:a,progress:O},L=arguments.length,B=Array(L>1?L-1:0),j=1;L>j;j++)B[j-1]=arguments[j];return e(B),Object.freeze(N)}Object.defineProperty(t,"__esModule",{value:!0}),t.build=l;var u=n(301),c=r(u),f=n(15),p=r(f),d="girder.auth.change",h="girder.busy",g="girder.progress",m="girder.notification",v=function b(){o(this,b)};p["default"].mixInto(v);var _=function(){return new Promise(function(e,t){e()})},y=function(){return new Promise(function(e,t){t()})};t["default"]={build:l}},function(e,t){"use strict";function n(e){return JSON.stringify(e)}function r(e){return e.user?null:new Promise(function(e,t){return t({data:{message:"Must be logged in."}})})}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){var t=e.client,a=(e.filterQuery,e.mustContain,e.busy);return{listAWSProfiles:function(){return r(t)||a(t._.get("/user/"+t.user._id+"/aws/profiles"))},createAWSProfile:function(e){return r(t)||a(t._.post("/user/"+t.user._id+"/aws/profiles",e,{headers:o,transformRequest:n}))},updateAWSProfile:function(e){return r(t)||a(t._.patch("/user/"+t.user._id+"/aws/profiles/"+e._id,e,{headers:o,transformRequest:n}))},listAWSRunningInstances:function(e){return r(t)||a(t._.get("/user/"+t.user._id+"/aws/profiles/"+e+"/runninginstances"))},getAWSMaxInstances:function(e){return r(t)||a(t._.get("/user/"+t.user._id+"/aws/profiles/"+e+"/maxinstances"))},deleteAWSProfile:function(e){return r(t)||a(t._["delete"]("/user/"+t.user._id+"/aws/profiles/"+e))}}};var o={"Content-Type":"application/json"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tthis.max&&(this.max=e.count)},r),r.max>o&&(o=r.max);if(me)for(t=0;t0&&z[e][0].hasOwnProperty("dataRange")}function p(e,t,n){var r,o=z[e],a=q[e],i=u(t,a,U[e]),s=u(n,a,U[e]),l=i,c=s;l>c&&(r=l,l=c,c=r),o[o.length-1]={dataRange:[l,c]}}function d(e,t,n,r,o,a){var i=1,s=e+(n-e)/2,l=r+(t-r)/2,u=t-r,c=n-e,f=(u-4*i)/3,p=c-2*i;A.fillStyle=re,a>=0&&(A.beginPath(),A.moveTo(r+i,s),A.lineTo(r+i+f,e+i),A.lineTo(r+i+f,e+i+p),A.closePath(),A.fill()),A.beginPath(),A.moveTo(r+f+2*i,s),o?A.lineTo(l,e+i):A.lineTo(l,n-i),A.lineTo(r+2*f+2*i,s),A.closePath(),A.fill(),0>=a&&(A.beginPath(),A.moveTo(t-i,s),A.lineTo(t-i-f,e+i+p),A.lineTo(t-i-f,e+i),A.closePath(),A.fill())}function h(){var e;for(e=0;e=m?(b=m,w=v):(b=v,w=m),y>=_?(x=_,C=y):(x=y,C=_),e.beginPath(),e.moveTo(p,b),e.lineTo(p,w),e.lineTo(d,C),e.lineTo(d,x),e.closePath(),e.fillStyle="rgba("+a[0]+","+a[1]+","+a[2]+","+g+")",e.fill()}function b(){var e,t,n,r;if(null===W||W.length<=1)return void console.error("Parallel coordinates cannot be rendered without at least two parameters selected.");if(!X||X.length!==W.length-1)return void E();for(A.globalAlpha=1,Z.width=R.width,Z.height=R.height,I.width=R.width,I.height=R.height,N.width=R.width,N.height=R.height,J.width=Z.width-(Q.left+Q.right),J.height=Z.height-(Q.top+Q.bottom),H=(J.width-K)/(W.length-1),V=[],V.push(Q.left+K/2),e=1;e0&&(u[n]=a,i=!0)}if(i===!0){for(t=0;t=t&&de>=n)for(r=0;r=s?f(r)&&(z[r]=[],T()):a<$.width/3/2?(U[r]=!U[r],b()):o>0?r0&&(S(r-1,r),P()));else fe&&T();fe=!1,pe.x=-1,pe.y=-1}else if("mousedown"===l){if(pe.x=i,pe.y=s,B&&s>Q.top&&s=a){fe=!0,ge=r,z[r].push({dataRange:[0,0]});break}}else fe&&(p(ge,pe.y,s),_())}var R=e,A=e.getContext("2d"),I=document.createElement("canvas"),O=I.getContext("2d"),N=document.createElement("canvas"),F=N.getContext("2d"),L=t,B=r,j=o,W=[],U=[],V=[],z=[],q=[],H=0,X=[],G=0,Y=null,Q={top:72,right:10,bottom:20,left:10},K=3,Z={width:R.width,height:R.height},J={width:Z.width-(Q.left+Q.right),height:Z.height-(Q.top+Q.bottom)},$={width:66,height:13},ee="rgba(128,128,128,1)",te="rgba(105, 195, 255, 1)",ne="rgba(0,0,0,1)",re="rgba(128,128,128,1)",oe=[0,0,0],ae=[70,130,180],ie=0,se=0,le=0,ue=1,ce=1,fe=!1,pe={x:-1,y:-1},de=1,he=10,ge=-1,me=!1,ve={mouseHandler:D,render:b,updateAxisList:a,clearSelection:k,updateOpacityAdjustments:M};return Object.freeze(ve)}Object.defineProperty(t,"__esModule",{value:!0}),t.createParallelCoordinates=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(360),a=r(o),i=n(361),s=r(i);t["default"]={ParallelCoordinateProvider:a["default"],ParallelCoordinates:s["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(362),a=r(o);t["default"]={Native:a["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(56),a=r(o),i=n(176),s=r(i);t["default"]={MouseHandler:a["default"],VtkWebMouseListener:s["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(364),a=r(o);t["default"]={Core:a["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(177),a=r(o);t["default"]={NativeImageRenderer:a["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(366),a=r(o);t["default"]={Renderers:a["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(279),s=r(i);t["default"]=a["default"].createClass({displayName:"FloatImageControl.LayerItem",propTypes:{item:a["default"].PropTypes.object.isRequired,model:a["default"].PropTypes.object.isRequired},getInitialState:function(){return{change:!1,dropDown:!1}},toggleMesh:function(){this.props.item.hasMesh&&(this.props.model.updateMaskLayerVisibility(this.props.item.name,!this.props.item.meshActive),this.setState({change:!this.state.change}))},toggleVisibility:function(){this.props.model.updateLayerVisibility(this.props.item.name,!this.props.item.active),this.setState({change:!this.state.change})},toggleDropDown:function(){this.props.item.arrays.length>1&&this.setState({dropDown:!this.state.dropDown})},updateColorBy:function(e){this.props.model.updateLayerColorBy(this.props.item.name,e.target.dataset.color),this.toggleDropDown()},render:function(){var e=this.props.item,t=e.active,n=e.meshActive,r=e.hasMesh,o=e.arrays.length>1;return a["default"].createElement("div",{className:s["default"].item},a["default"].createElement("div",{className:s["default"].label},e.name),a["default"].createElement("div",{className:s["default"].actions},a["default"].createElement("i",{className:r?n?s["default"].meshButtonOn:s["default"].meshButtonOff:s["default"].hidden,onClick:this.toggleMesh}),a["default"].createElement("i",{className:t?s["default"].visibleButtonOn:s["default"].visibleButtonOff,onClick:this.toggleVisibility}),a["default"].createElement("i",{className:o?s["default"].dropDownButtonOn:s["default"].dropDownButtonOff,onClick:this.toggleDropDown}),a["default"].createElement("div",{onClick:this.updateColorBy,className:this.state.dropDown?s["default"].menu:s["default"].hidden},e.arrays.map(function(t){return a["default"].createElement("div",{key:t,"data-color":t,className:t===e.array?s["default"].selectedMenuItem:s["default"].menuItem},t)}))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(115),a=r(o),i=n(178),s=r(i),l=n(179),u=r(l),c=n(116),f=r(c),p=n(180),d=r(p),h=n(181),g=r(h),m=n(117),v=r(m),_=n(182),y=r(_),b=n(183),w=r(b);t["default"]={CollapsibleControlFactory:a["default"],FloatImageControl:s["default"],LightControl:u["default"],LookupTableManagerControl:f["default"],MultiViewControl:d["default"],PixelOperatorControl:g["default"],ProbeControl:v["default"],QueryDataModelControl:y["default"],VolumeControl:w["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(112),s=r(i),l=n(171),u=r(l),c=n(65),f=r(c);t["default"]=a["default"].createClass({displayName:"InputCell",propTypes:{domain:a["default"].PropTypes.object,idx:a["default"].PropTypes.number.isRequired,label:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,type:a["default"].PropTypes.string,value:a["default"].PropTypes.any},getDefaultProps:function(){return{label:"",idx:0,value:"",type:"string"}},getInitialState:function(){return{editing:!1,valueRep:this.props.value}},valueChange:function(e){var t=e.target.value;if(this.setState({editing:!0,valueRep:t}),u["default"][this.props.type](t)){var n=s["default"][this.props.type](t);n=this.applyDomains(this.props.idx,n),this.props.onChange(this.props.idx,n)}},applyDomains:function(e,t){if(!this.props.domain)return t;if(this.props.domain.hasOwnProperty("range")){var n=this.props.domain.range[e],r=n.min,o=n.max;t=void 0!==r?Math.max(r,t):t,t=void 0!==o?Math.min(o,t):t}return t},endEditing:function(){this.setState({editing:!1})},render:function(){return a["default"].createElement("td",{className:f["default"].inputCell},a["default"].createElement("label",{className:f["default"].inputCellLabel},this.props.label),a["default"].createElement("input",{className:f["default"].inputCellInput,value:this.state.editing?this.state.valueRep:this.props.value,onChange:this.valueChange,onBlur:this.endEditing}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=arguments.length<=2||void 0===arguments[2]?"":arguments[2];if(!e)return Array(t).fill(n);for(;e.length=0?this.props.onChange(this.props.idx,e.target.checked):this.props.onChange(null,e.target.checked))},render:function(){return a["default"].createElement("div",null,a["default"].createElement("label",{className:s["default"].label},this.props.label),a["default"].createElement("input",{className:s["default"].input,type:"checkbox",checked:this.props.value,onChange:this.valueChange}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(118),s=r(i),l=n(709),u=r(l);t["default"]=a["default"].createClass({displayName:"PropertyPanel",propTypes:{className:a["default"].PropTypes.string,input:a["default"].PropTypes.array,labels:a["default"].PropTypes.object,onChange:a["default"].PropTypes.func,viewData:a["default"].PropTypes.object},getDefaultProps:function(){return{className:"",input:[]}},valueChange:function(e){this.props.onChange&&this.props.onChange(e)},render:function(){var e=this,t=this.props.viewData,n=function(n){return(0,s["default"])(n,t,e.valueChange)},r=function(e){return a["default"].createElement("div",{key:e.title},a["default"].createElement("div",{className:u["default"].propertyHeader},a["default"].createElement("strong",null,e.title)),e.contents.map(n))};return a["default"].createElement("section",{className:[this.props.className,u["default"].propertyPanel].join(" ")},this.props.input.map(r))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0?this.props.onChange(this.props.idx,e.target.value):this.props.onChange(null,e.target.value))},render:function(){var e=Object.assign({},this.props);return delete e.onChange,delete e.idx,i["default"].createElement(l["default"],o({},e,{onChange:this.valueChange}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(184),a=r(o),i=n(185),s=r(i),l=n(186),u=r(l),c=n(118),f=r(c),p=n(373),d=r(p),h=n(187),g=r(h);t["default"]={CellProperty:a["default"],CheckboxProperty:s["default"],EnumProperty:u["default"],PropertyFactory:f["default"],PropertyPanel:d["default"],SliderProperty:g["default"]}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={"2x2":function(e,t,n,r){return[[t,t,e[0]-1.5*t,e[1]-1.5*t],[e[0]+.5*t,t,n-e[0]-1.5*t,e[1]-1.5*t],[t,e[1]+.5*t,e[0]-1.5*t,r-e[1]-1.5*t],[e[0]+.5*t,e[1]+.5*t,n-e[0]-1.5*t,r-e[1]-1.5*t]]},"1x1":function(e,t,n,r){return[[t,t,n-2*t,r-2*t]]},"1x2":function(e,t,n,r){return[[t,t,n-2*t,e[1]-1.5*t],[t,e[1]+.5*t,n-2*t,r-e[1]-1.5*t]]},"2x1":function(e,t,n,r){return[[t,t,e[0]-1.5*t,r-2*t],[e[0]+.5*t,t,n-e[0]-1.5*t,r-2*t]]},"3xT":function(e,t,n,r){return[[t,t,n-2*t,e[1]-1.5*t],[t,e[1]+.5*t,e[0]-1.5*t,r-e[1]-1.5*t],[e[0]+.5*t,e[1]+.5*t,n-e[0]-1.5*t,r-e[1]-1.5*t]]},"3xL":function(e,t,n,r){return[[t,t,e[0]-1.5*t,r-2*t],[e[0]+.5*t,t,n-e[0]-1.5*t,e[1]-1.5*t],[e[0]+.5*t,e[1]+.5*t,n-e[0]-1.5*t,r-e[1]-1.5*t]]},"3xR":function(e,t,n,r){return[[t,t,e[0]-1.5*t,e[1]-1.5*t],[e[0]+.5*t,t,n-e[0]-1.5*t,r-2*t],[t,e[1]+.5*t,e[0]-1.5*t,r-e[1]-1.5*t]]},"3xB":function(e,t,n,r){return[[t,t,e[0]-1.5*t,e[1]-1.5*t],[e[0]+.5*t,t,n-e[0]-1.5*t,e[1]-1.5*t],[t,e[1]+.5*t,n-2*t,r-e[1]-1.5*t]]}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i),l=n(175),u=r(l),c=n(177),f=r(c),p=n(37),d=r(p),h=n(176),g=r(h);t["default"]=a["default"].createClass({displayName:"VtkRenderer",propTypes:{className:a["default"].PropTypes.string,client:a["default"].PropTypes.object,connection:a["default"].PropTypes.object,showFPS:a["default"].PropTypes.bool,style:a["default"].PropTypes.object},getDefaultProps:function(){return{className:"",showFPS:!1,style:{}}},componentWillMount:function(){d["default"].startListening()},componentDidMount:function(){var e=this,t=s["default"].findDOMNode(this),n=d["default"].getSize(t),r=n.clientWidth,o=n.clientHeight;this.binaryImageStream=new u["default"](this.props.connection.urls+"b",r,o),this.mouseListener=new g["default"](this.props.client),this.mouseListener.onInteraction(function(t){t?e.binaryImageStream.startInteractiveQuality():e.binaryImageStream.stopInteractiveQuality()}),this.subscription=d["default"].onSizeChange(function(){var n=d["default"].getSize(t),r=n.clientWidth,o=n.clientHeight;e.mouseListener.updateSize(r,o),e.props.client.session.call("viewport.size.update",[-1,r,o])}),this.imageRenderer=new f["default"](t,this.binaryImageStream,this.mouseListener.getListeners(),this.props.showFPS),this.binaryImageStream.connect({view_id:-1}),d["default"].triggerChange()},componentWillUnmount:function(){this.binaryImageStream&&(this.binaryImageStream.destroy(),this.binaryImageStream=null),this.mouseListener&&(this.mouseListener.destroy(),this.mouseListener=null),this.imageRenderer&&(this.imageRenderer.destroy(),this.imageRenderer=null),this.subscription&&(this.subscription.unsubscribe(),this.subscription=null)},render:function(){return a["default"].createElement("div",{className:this.props.className,style:this.props.style})}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(188),a=r(o),i=n(189),s=r(i),l=n(190),u=r(l),c=n(377),f=r(c);t["default"]={GeometryRenderer:a["default"],ImageRenderer:s["default"],MultiLayoutRenderer:u["default"],VtkRenderer:f["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(69),a=r(o),i=n(3),s=r(i);t["default"]=s["default"].createClass({displayName:"GeometryViewer",propTypes:{config:s["default"].PropTypes.object,geometryBuilder:s["default"].PropTypes.object.isRequired,menuAddOn:s["default"].PropTypes.array,queryDataModel:s["default"].PropTypes.object.isRequired},getDefaultProps:function(){return{config:{}}},render:function(){var e=this.props.queryDataModel,t=this.props.geometryBuilder,n=[];return this.props.menuAddOn&&(n=this.props.menuAddOn.concat(n)),s["default"].createElement(a["default"],{queryDataModel:e,geometryBuilder:t,renderer:"GeometryRenderer",config:this.props.config||{}},n)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(69),a=r(o),i=n(3),s=r(i),l=n(115),u=r(l);t["default"]=s["default"].createClass({displayName:"ImageBuilderViewer",propTypes:{config:s["default"].PropTypes.object,imageBuilder:s["default"].PropTypes.object.isRequired,menuAddOn:s["default"].PropTypes.array,queryDataModel:s["default"].PropTypes.object.isRequired},getDefaultProps:function(){return{config:{}}},componentWillMount:function(){this.attachListener(this.props.imageBuilder)},componentWillReceiveProps:function(e){var t=this.props.imageBuilder,n=e.imageBuilder;t!==n&&(this.detachListener(),this.props.config.MagicLens&&this.attachListener(n))},componentWillUnmount:function(){this.detachListener()},attachListener:function(e){var t=this;this.detachListener(),e&&e.onModelChange&&(this.changeSubscription=e.onModelChange(function(e,n){t.forceUpdate()}))},detachListener:function(){this.changeSubscription&&(this.changeSubscription.unsubscribe(),this.changeSubscription=null)},render:function(){var e=this.props.queryDataModel,t=this.props.config.MagicLens?this.props.imageBuilder:null,n=this.props.config.MagicLens?this.props.imageBuilder.getActiveImageBuilder():this.props.imageBuilder,r=u["default"].getWidgets(n);return this.props.menuAddOn&&(r=this.props.menuAddOn.concat(r)),s["default"].createElement(a["default"],{queryDataModel:e,magicLensController:t,imageBuilder:n,config:this.props.config||{}},r)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(69),a=r(o),i=n(180),s=r(i),l=n(3),u=r(l),c=n(115),f=r(c);t["default"]=u["default"].createClass({displayName:"MultiLayoutViewer",propTypes:{layout:u["default"].PropTypes.string,menuAddOn:u["default"].PropTypes.array,queryDataModel:u["default"].PropTypes.object.isRequired,renderers:u["default"].PropTypes.object.isRequired},getInitialState:function(){return{activeRenderer:null,renderer:null}},componentDidMount:function(){var e=this,t=this.refs.catalystWidget.getRenderer();this.setState({renderer:t}),this.activeViewportSubscription=t.onActiveViewportChange(function(t,n){e.setState({activeRenderer:e.props.renderers[t.name]})})},componentWillUpdate:function(e,t){var n=this.state.activeRenderer&&this.state.activeRenderer.builder&&this.state.activeRenderer.builder.queryDataModel?this.state.activeRenderer.builder.queryDataModel:this.props.queryDataModel,r=t.activeRenderer&&t.activeRenderer.builder&&t.activeRenderer.builder.queryDataModel?t.activeRenderer.builder.queryDataModel:e.queryDataModel;n!==r&&(this.detachListener(),this.attachListener(r))},componentWillUnmount:function(){this.detachListener(),this.activeViewportSubscription&&(this.activeViewportSubscription.unsubscribe(),this.activeViewportSubscription=null)},attachListener:function(e){var t=this;this.detachListener(),e&&(this.queryDataModelChangeSubscription=e.onStateChange(function(e,n){t.forceUpdate()}))},detachListener:function(){this.queryDataModelChangeSubscription&&(this.queryDataModelChangeSubscription.unsubscribe(),this.queryDataModelChangeSubscription=null)},render:function(){var e=this.state.activeRenderer&&this.state.activeRenderer.builder&&this.state.activeRenderer.builder.queryDataModel?this.state.activeRenderer.builder.queryDataModel:this.props.queryDataModel,t=[];return this.state.activeRenderer&&(t=f["default"].getWidgets(this.state.activeRenderer.builder||this.state.activeRenderer.painter)),this.props.menuAddOn&&(t=this.props.menuAddOn.concat(t)),u["default"].createElement(a["default"],{ref:"catalystWidget",queryDataModel:e,renderers:this.props.renderers,renderer:"MultiViewRenderer",layout:this.props.layout},u["default"].createElement(s["default"],{renderer:this.state.renderer}),t)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(22),s=r(i),l=n(69),u=r(l),c=n(191),f=r(c),p=n(116),d=r(p),h=n(117),g=r(h),m=n(25),v=r(m),_=n(121),y=r(_),b=n(713),w=r(b),x={XY:[0,1,2],ZY:[2,1,0],XZ:[0,2,1]},C=["x","y","z"];t["default"]=a["default"].createClass({displayName:"Probe3DViewer",propTypes:{imageBuilder:a["default"].PropTypes.object.isRequired,probe:a["default"].PropTypes.bool,queryDataModel:a["default"].PropTypes.object.isRequired},getDefaultProps:function(){return{probe:!0}},getInitialState:function(){return{probe:[this.props.imageBuilder.getProbe()[0],this.props.imageBuilder.getProbe()[1],this.props.imageBuilder.getProbe()[2]],chartVisible:!1,chartSize:{width:300,height:300},chartData:{xRange:[0,1],fields:[]},chartAxis:0}},componentWillMount:function(){var e=this,t=this.props.queryDataModel,n=this.props.imageBuilder;this.dragChartFlag=!1,this.queryDataModelDataSubscription=t.onDataChange(function(t,r){e.setState({chartData:n.getProbeLine(e.liveChartAxis)})}),n.setRenderMethodMutable(),this.renderMethodChangeSubscription=n.onRenderMethodChange(function(t,n){e.state.chartVisible&&e.validateChartAxis()}),n.setProbeLineNotification(!0),this.chartListenerSubscription=n.onProbeLineReady(function(t,n){var r=t[C[e.liveChartAxis]];e.setState({chartData:r})}),this.probeListenerSubscription=n.onProbeChange(function(t,n){e.setState({probe:t})})},componentDidUpdate:function(){this.state.chartVisible&&this.refs.chartViewer.updateDimensions()},componentWillUnmount:function(){this.queryDataModelDataSubscription&&(this.queryDataModelDataSubscription.unsubscribe(),this.queryDataModelDataSubscription=null),this.renderMethodChangeSubscription&&(this.renderMethodChangeSubscription.unsubscribe(),this.renderMethodChangeSubscription=null),this.chartListenerSubscription&&(this.chartListenerSubscription.unsubscribe(),this.chartListenerSubscription=null),this.probeListenerSubscription&&(this.probeListenerSubscription.unsubscribe(),this.probeListenerSubscription=null)},validateChartAxis:function(){var e=this.props.imageBuilder.getRenderMethod(),t="XYZ"[this.liveChartAxis];if(-1===e.indexOf(t)){var n=this.props.imageBuilder.getProbeLine(t);t="XYZ".indexOf(e[0]),this.liveChartAxis=t,this.setState({chartAxis:t,chartData:n})}},onChartVisibilityChange:function(e){e&&this.validateChartAxis(),this.setState({chartVisible:e})},updateChart:function(e){var t=Number(e.target.getAttribute("data-index")),n=this.props.imageBuilder,r=n.getProbeLine(t);this.liveChartAxis=t,this.setState({chartData:r,chartAxis:t})},dragOn:function(e){var t=s["default"].findDOMNode(this.refs.chartContainer),n=Number(t.style.top.replace("px","")),r=Number(t.style.left.replace("px",""));this.dragChartFlag=!0,this.dragPosition=[e.clientX-r,e.clientY-n]},dragOff:function(){this.dragChartFlag=!1},dragChart:function(e){if(this.dragChartFlag){var t=s["default"].findDOMNode(this.refs.chartContainer);t.style.left=e.clientX-this.dragPosition[0]+"px",t.style.top=e.clientY-this.dragPosition[1]+"px"}},render:function(){var e=this,t=this.props.queryDataModel,n=this.props.imageBuilder,r=n.metadata.dimensions,o=x[this.props.imageBuilder.getRenderMethod()],i=[];return[0,1,2].forEach(function(t){var n=[];o[2]===t?n.push(w["default"].hidden):e.state.chartAxis===t?n.push(w["default"].selectedButton):n.push(w["default"].button),i.push(n.join(" "))}),a["default"].createElement("div",{className:w["default"].container},a["default"].createElement(u["default"],{queryDataModel:t,imageBuilder:n,mouseListener:n.getListeners()},a["default"].createElement(d["default"],{key:"LookupTableManagerWidget",ref:"LookupTableManagerWidget",lookupTableManager:n.lookupTableManager,field:n.getField()}),a["default"].createElement(g["default"],{ref:"ProbeControl",imageBuilder:n}),a["default"].createElement(v["default"],{ref:"chartCollapsable",title:"Chart",visible:this.props.probe&&n.isCrossHairEnabled(),onChange:this.onChartVisibilityChange,open:this.state.chartVisible},a["default"].createElement("div",{ref:"chartButtons",className:w["default"].row},a["default"].createElement("button",{className:i[0],type:"button","data-index":"0",onClick:this.updateChart},"X"),a["default"].createElement("button",{className:i[1],type:"button","data-index":"1",onClick:this.updateChart},"Y"),a["default"].createElement("button",{className:i[2],type:"button","data-index":"2",onClick:this.updateChart},"Z"))),a["default"].createElement(v["default"],{ref:"queryDataModelParameters",title:"Parameters",visible:t.originalData.arguments_order.length>0},a["default"].createElement(y["default"],{model:t}))),a["default"].createElement("div",{ref:"chartContainer",className:this.state.chartVisible&&n.isCrossHairEnabled()?w["default"].chartContainer:w["default"].hidden,onMouseMove:this.dragChart,onMouseUp:this.dragOff,onMouseDown:this.dragOn},a["default"].createElement(f["default"],{ref:"chartViewer",cursor:this.state.probe[this.state.chartAxis]/r[this.state.chartAxis],data:this.state.chartData,width:this.state.chartSize.width,height:this.state.chartSize.height})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(69),a=r(o),i=n(379),s=r(i),l=n(380),u=r(l),c=n(191),f=r(c),p=n(381),d=r(p),h=n(382),g=r(h);t["default"]={AbstractViewerMenu:a["default"],GeometryViewer:s["default"],ImageBuilderViewer:u["default"],LineChartViewer:f["default"],MultiLayoutViewer:d["default"],Probe3DViewer:g["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(715),s=r(i);t["default"]=a["default"].createClass({displayName:"ButtonSelectorWidget",propTypes:{list:a["default"].PropTypes.array.isRequired,onChange:a["default"].PropTypes.func},processItem:function(e){var t=e.target.name,n=this.props.list,r=n.length;if(this.props.onChange)for(;r--;)n[r].name===t&&this.props.onChange(r,n)},render:function(){var e=this,t=[];return this.props.list.forEach(function(n){t.push(a["default"].createElement("button",{className:s["default"].button,key:n.name,name:n.name,onClick:e.processItem},n.name))}),a["default"].createElement("section",{className:s["default"].container},t)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(199),s=r(i),l=n(201),u=r(l),c=n(280),f=r(c);t["default"]=a["default"].createClass({displayName:"ColorByWidget",propTypes:{className:a["default"].PropTypes.string,max:a["default"].PropTypes.number,min:a["default"].PropTypes.number,onChange:a["default"].PropTypes.func,presets:a["default"].PropTypes.object,representation:a["default"].PropTypes.object,scalarBar:a["default"].PropTypes.string,source:a["default"].PropTypes.object,visible:a["default"].PropTypes.bool},getInitialState:function(){return{activeAdvanceView:"0"}},updatePreset:function(e){this.props.onChange&&this.props.onChange({type:"updatePreset",representation:this.props.representation.id,preset:e})},updateRange:function(e){e.proxyId=this.props.source.id,this.props.onChange&&this.props.onChange({type:"updateScalarRange",options:e})},updateActiveView:function(e){var t=e.target.dataset.idx;this.setState({activeAdvanceView:t})},render:function(){return a["default"].createElement("div",{className:this.props.visible?f["default"].advancedView:f["default"].hidden},a["default"].createElement("div",{className:f["default"].advancedViewControl},a["default"].createElement("i",{"data-idx":"0",onClick:this.updateActiveView,className:"0"===this.state.activeAdvanceView?f["default"].activePresetIcon:f["default"].presetIcon}),a["default"].createElement("i",{"data-idx":"1",onClick:this.updateActiveView,className:"1"===this.state.activeAdvanceView?f["default"].activeRangeIcon:f["default"].rangeIcon}),a["default"].createElement("i",{"data-idx":"2",onClick:this.updateActiveView,className:"2"===this.state.activeAdvanceView?f["default"].activeOpacityIcon:f["default"].opacityIcon}),a["default"].createElement("i",{"data-idx":"3",onClick:this.updateActiveView,className:"3"===this.state.activeAdvanceView?f["default"].activeColorEditIcon:f["default"].colorEditIcon})),a["default"].createElement("div",{className:f["default"].advancedViewContent},a["default"].createElement(s["default"],{visible:"0"===this.state.activeAdvanceView,onChange:this.updatePreset,presets:this.props.presets}),a["default"].createElement(u["default"],{visible:"1"===this.state.activeAdvanceView,min:this.props.min,max:this.props.max,onApply:this.updateRange})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){for(var t=Math.floor(255*e).toString(16);t.length<2;)t="0"+t;return t}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;tt}).join(d),l=!!e.representation.colorBy.scalarBar,u="#"+e.representation.colorBy.color.map(o).join(""),c=s.split(d)[1]?"array":"SOLID";this.setState({representationValues:r,representationValue:a,colorValues:i,colorValue:s,scalarBarVisible:l,solidColor:u,colorMode:c})}},toggleScalarBar:function(){var e=!this.state.scalarBarVisible;"SOLID"===this.state.colorMode&&(e=!1),this.setState({scalarBarVisible:e}),this.props.onChange&&this.props.onChange({type:"scalarBar",source:this.props.source.id,representation:this.props.representation.id,visible:e})},toggleAdvancedView:function(){var e=!this.state.advancedView;this.setState({advancedView:e})},onRepresentationChange:function(e){var t=e.target.value;this.setState({representationValue:t}),this.props.onChange&&this.props.onChange({type:"propertyChange",changeSet:[{id:this.props.representation.id,name:"Representation",value:t}]})},onColorChange:function(e){var t=this.state.scalarBarVisible,n=e.target.value,r=n.split(d),o=i(r,2),a=o[0],s=o[1],l=s?"array":"SOLID",u="Magnitude",c=0,f=!1;"SOLID"===l&&(t=!1),this.setState({colorValue:n,scalarBarVisible:t,colorMode:l}),this.props.onChange&&this.props.onChange({type:"colorBy",representation:this.props.representation.id,arrayLocation:a,arrayName:s,colorMode:l,vectorMode:u,vectorComponent:c,rescale:f})},render:function(){return this.props.source&&this.props.representation?l["default"].createElement("div",{className:[p["default"].container,this.props.className].join(" ")},l["default"].createElement("div",{className:p["default"].line},l["default"].createElement("i",{className:p["default"].representationIcon}),l["default"].createElement("select",{className:p["default"].input,value:this.state.representationValue,onChange:this.onRepresentationChange},this.state.representationValues.map(function(e,t){return l["default"].createElement("option",{key:t,value:e},e)}))),l["default"].createElement("div",{className:p["default"].line},l["default"].createElement("i",{className:p["default"].colorIcon}),l["default"].createElement("select",{className:p["default"].input,value:this.state.colorValue,onChange:this.onColorChange},this.state.colorValues.map(function(e,t){return l["default"].createElement("option",{key:t,value:e.location?[e.location,e.name].join(d):""},e.location?"("+("POINTS"===e.location?"p":"c")+e.size+") "+e.name:e.name)}))),l["default"].createElement("div",{className:p["default"].line},l["default"].createElement("i",{onClick:this.toggleAdvancedView,className:this.state.advancedView?p["default"].advanceIconOn:p["default"].advanceIconOff}),this.props.scalarBar&&this.state.colorValue&&this.state.colorValue.split(d)[1].length?l["default"].createElement("img",{onClick:this.toggleScalarBar,className:p["default"].scalarBar,src:"data:image/png;base64,"+this.props.scalarBar}):l["default"].createElement("div",{className:p["default"].scalarBar,style:{backgroundColor:this.state.solidColor}}),l["default"].createElement("i",{onClick:this.toggleScalarBar,className:this.state.scalarBarVisible?p["default"].scalarBarIconOn:p["default"].scalarBarIconOff})),l["default"].createElement(c["default"],a({visible:this.state.advancedView},this.props))):null}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(159),s=r(i);t["default"]=a["default"].createClass({displayName:"CompositePipelineWidget.ChildItem",propTypes:{item:a["default"].PropTypes.object,layer:a["default"].PropTypes.string,model:a["default"].PropTypes.object},toggleActiveLayer:function(e){this.props.model.toggleLayerActive(this.props.layer)},updateOpacity:function(e){this.props.model.setOpacity(this.props.layer,e.target.value),this.forceUpdate()},render:function(){var e=this.props.model.isLayerInEditMode(this.props.layer),t=this.props.model.isLayerActive(this.props.layer),n=!t&&!e,r=this.props.model.hasOpacity();return a["default"].createElement("div",{className:n?s["default"].hidden:s["default"].childItem},a["default"].createElement("i",{className:e?t?s["default"].activeButton:s["default"].deleteButtonOn:s["default"].deleteButtonOff,onClick:this.toggleActiveLayer}),a["default"].createElement("div",{className:s["default"].label},this.props.item.name),a["default"].createElement("input",{className:r?s["default"].opacity:s["default"].hidden,type:"range",min:"0",max:"100",value:this.props.model.getOpacity(this.props.layer),onChange:this.updateOpacity}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(387),a=r(o),i=n(3),s=r(i),l=n(159),u=r(l);t["default"]=s["default"].createClass({displayName:"CompositePipelineWidget.RootItem",propTypes:{item:s["default"].PropTypes.object,layer:s["default"].PropTypes.string,model:s["default"].PropTypes.object},getInitialState:function(){return{dropDown:!1}},toggleVisibility:function(){this.props.model.toggleLayerVisible(this.props.layer)},toggleDropDown:function(){this.props.model.getColor(this.props.layer).length>1&&this.setState({dropDown:!this.state.dropDown})},updateColorBy:function(e){this.props.model.setActiveColor(this.props.layer,e.target.dataset.color),this.toggleDropDown()},toggleEditMode:function(){this.props.model.toggleEditMode(this.props.layer)},updateOpacity:function(e){this.props.model.setOpacity(this.props.layer,e.target.value),this.forceUpdate()},render:function(){var e=this.props.model,t=this.props.layer,n=e.isLayerVisible(this.props.layer),r=this.props.item.children||[],o=this.props.model.isLayerInEditMode(this.props.layer),i=r.length>0,l=e.hasOpacity(),c=this.props.model.getColor(this.props.layer).length>1,f=i?s["default"].createElement("i",{className:o?u["default"].editButtonOn:u["default"].editButtonOff,onClick:this.toggleEditMode}):"";return s["default"].createElement("div",{className:u["default"].section},s["default"].createElement("div",{className:u["default"].item},s["default"].createElement("div",{className:u["default"].label},this.props.item.name),s["default"].createElement("div",{className:u["default"].actions},f,s["default"].createElement("i",{className:n?u["default"].visibleButtonOn:u["default"].visibleButtonOff,onClick:this.toggleVisibility}),s["default"].createElement("i",{className:c?u["default"].dropDownButtonOn:u["default"].dropDownButtonOff,onClick:this.toggleDropDown}),s["default"].createElement("div",{onClick:this.updateColorBy,className:this.state.dropDown?u["default"].menu:u["default"].hidden},e.getColor(t).map(function(n){return s["default"].createElement("div",{key:n,"data-color":n,className:e.isActiveColor(t,n)?u["default"].selectedMenuItem:u["default"].menuItem},e.getColorToLabel(n))})))),s["default"].createElement("div",{className:l&&!i?u["default"].item:u["default"].hidden},s["default"].createElement("input",{className:u["default"].opacity,type:"range",min:"0",max:"100",value:e.getOpacity(t),onChange:this.updateOpacity})),s["default"].createElement("div",{className:u["default"].children},r.map(function(t,n){return s["default"].createElement(a["default"],{key:n,item:t,layer:t.ids.join(""),model:e})})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(137),a=r(o),i=n(3),s=r(i),l=n(719),u=r(l);t["default"]=s["default"].createClass({displayName:"DoubleSliderWidget",propTypes:{max:s["default"].PropTypes.oneOfType([s["default"].PropTypes.number,s["default"].PropTypes.string]),min:s["default"].PropTypes.oneOfType([s["default"].PropTypes.number,s["default"].PropTypes.string]),name:s["default"].PropTypes.string,onChange:s["default"].PropTypes.func,size:s["default"].PropTypes.oneOfType([s["default"].PropTypes.number,s["default"].PropTypes.string]),value:s["default"].PropTypes.oneOfType([s["default"].PropTypes.number,s["default"].PropTypes.string])},getDefaultProps:function(){return{max:1,min:0,size:100,name:"DoubleValue"}},getInitialState:function(){return{txtValue:null,value:this.props.value?this.props.value:.5*(this.props.max+this.props.min),max:this.props.max,min:this.props.min}},componentWillReceiveProps:function(e){var t=this.props,n=e;(0,a["default"])(t,n)||this.setState({value:n.value?n.value:.5*(n.max+n.min)})},textInput:function(e){var t=Number(e.target.value);!Number.isNaN(t)&&e.target.value.length>0?(this.setState({value:t,txtValue:e.target.value}),this.props.onChange&&this.props.onChange(this.props.name,t)):this.setState({txtValue:e.target.value})},sliderInput:function(e){var t=Number(this.props.min),n=Number(this.props.max),r=n-t,o=r*(Number(e.target.value)/Number(this.props.size))+t;this.setState({value:o,txtValue:null}),this.props.onChange&&this.props.onChange(this.props.name,o)},render:function(){var e=this.props.min,t=this.props.max,n=this.props.size,r=this.state.value;return s["default"].createElement("div",{className:u["default"].container},s["default"].createElement("input",{type:"range",className:u["default"].rangeInput,value:Math.floor((r-e)/(t-e)*n),onChange:this.sliderInput,min:"0",max:n}),s["default"].createElement("input",{type:"text",className:u["default"].textInput,pattern:"-*[0-9]*.*[0-9]*",value:null!==this.state.txtValue?this.state.txtValue:this.state.value,onChange:this.textInput}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(192),s=r(i),l=n(722),u=r(l);t["default"]=a["default"].createClass({displayName:"FileBrowserWidget",propTypes:{directories:a["default"].PropTypes.array.isRequired,files:a["default"].PropTypes.array.isRequired,groups:a["default"].PropTypes.array.isRequired,onAction:a["default"].PropTypes.func,path:a["default"].PropTypes.array.isRequired},getInitialState:function(){return{list:[]}},componentDidMount:function(){this.processProps(this.props)},componentWillReceiveProps:function(e){this.processProps(e)},processProps:function(e){var t=[];e.directories.forEach(function(e){t.push({name:e,icon:u["default"].folderIcon,action:"directory"})}),e.groups.forEach(function(e){t.push({name:e.label,icon:u["default"].groupIcon,action:"group",data:btoa(JSON.stringify(e.files))})}),e.files.forEach(function(e){t.push({name:e,icon:u["default"].fileIcon,action:"file"})}),this.setState({list:t})},onAction:function(e,t,n){this.props.onAction&&this.props.onAction(t,e,n.length?JSON.parse(atob(n)):null)},onPathChange:function(e){for(var t=e.target;"li"!==t.localName;)t=t.parentNode; -if(this.props.onAction){for(var n=[],r=Number(t.dataset.idx);n.length<=r;)n.push(this.props.path[n.length]);this.props.onAction("path",n.join("/"),n)}},render:function(){var e=this;return a["default"].createElement("div",{className:u["default"].container},a["default"].createElement("ul",{className:u["default"].breadcrumb},this.props.path.map(function(t,n){return a["default"].createElement("li",{className:u["default"].breadcrumbItem,key:t,"data-idx":n,title:t,onClick:e.onPathChange},a["default"].createElement("i",{className:u["default"].breadcrumbFolderIcon}),a["default"].createElement("span",{className:u["default"].breadcrumbLabel},t))})),a["default"].createElement(s["default"],{list:this.state.list,onClick:this.onAction}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return Number(e.id)t.toX}),this.setState({nodes:c,branches:f,forks:p,actives:d,leaves:o})},renderNodes:function(){var e=this;return this.state.nodes.map(function(t,n){var r=e.props,o=r.activeCircleStrokeColor,a=r.deltaX,i=r.deltaY,s=r.fontSize,l=r.notVisibleCircleFillColor,u=r.offset,c=r.palette,p=r.radius,d=r.stroke,h=r.textColor,g=r.textWeight,m=e.state.actives.includes(n),_=!!t.visible,y=c[t.x%c.length],b=h[m?1:0],w=g[m?1:0],x=m?o:y||y,C=_?y:l||y,E=a*t.x+u,T=i*t.y+i/2,P=E+2*p,k=T+p-1;return f["default"].createElement("g",{key:"node-"+n,className:v["default"].cursor},f["default"].createElement("circle",{"data-id":t.y,cx:E,cy:T,r:p,stroke:x,strokeWidth:d,fill:C,onClick:e.toggleVisibility}),f["default"].createElement("text",{className:v["default"].regularText,"data-id":t.y,x:P,y:k,fill:b,fontWeight:w,fontSize:s},t.name))})},renderBranches:function(){var e=this.props,t=e.deltaX,n=e.deltaY,r=e.offset,o=e.palette,a=e.stroke;return this.state.branches.map(function(e,i){var s=t*e.x+r,l=n*e.y+n/2,u=n*e.to+n/2,c=o[e.x%o.length];return f["default"].createElement("path",{key:"branch-"+i,d:"M"+s+","+l+" L"+s+","+u,stroke:c,strokeWidth:a})})},renderForks:function(){var e=this.props,t=e.deltaX,n=e.deltaY,r=e.offset,o=e.palette,a=e.radius,i=e.stroke;return this.state.forks.map(function(e,s){var l=t*e.x+r,u=n*e.y+n/2+a,c=t*e.toX+r,p=n*e.toY+n/2+a,d=o[e.toX%o.length],h="M"+l+","+u+" "+("Q"+l+","+(u+n/3)+","+(l+c)/2+","+(u+n/3)+" ")+("T"+c+","+(u+n)+" L"+c+","+p);return f["default"].createElement("path",{key:"fork-"+s,d:h,stroke:d,strokeWidth:i,fill:"transparent"})})},renderActives:function(){var e=this,t=this.props,n=t.margin,r=t.deltaY;return this.state.actives.map(function(t,o){return f["default"].createElement("rect",{key:"active-"+o,"data-id":e.state.nodes[t].y,x:"-50",width:"1000",fill:"#999",y:t*r+n/2,height:r-n})})},renderDeleteActions:function(){var e=this;if(!this.props.enableDelete)return null;var t=this.props,n=t.deltaY,r=t.width,o=t.offset,a=t.textColor,i=t.radius;return this.state.leaves.map(function(t,s){var l=e.state.actives.includes(t.y),u=a[l?1:0];return f["default"].createElement("text",{key:"delete-"+s,className:v["default"].iconText,onClick:e.deleteNode,"data-id":t.y,x:Number(r)-o-10,y:n*t.y+n/2+i-1,fill:u},"")})},toggleActive:function(e){var t=this,n=this.state,r=n.actives,o=n.nodes;if("circle"!==e.target.nodeName&&!e.target.classList.contains(v["default"].iconText)){var a=g["default"].getSize(d["default"].findDOMNode(this)),i=this.props.deltaY,s=a.clientRect.y||a.clientRect.top,l=Math.floor((e.clientY-s)/i),u=r.indexOf(l);this.props.multiselect&&(e.metaKey||e.ctrlKey)?-1===u?r.push(l):r.splice(u,1):r=[l],this.setState({actives:r}),this.props.onChange&&!function(){var e=[],n=!0;r.forEach(function(t){var r=o[t],a=r.id,i=r.parent,s=r.name,l=r.visible;e.push({id:a,parent:i,name:s,visible:l,active:n})}),t.props.onChange({type:"active",changeSet:e})}()}},toggleVisibility:function(e){var t=parseInt(e.currentTarget.attributes["data-id"].value,10),n=this.state,r=n.actives,o=n.nodes,a=o[t];if(a.visible=!a.visible,this.setState({nodes:o}),this.props.onChange){var i=a.id,s=a.parent,l=a.name,u=a.visible,c=-1!==r.indexOf(t),f=[{id:i,parent:s,name:l,visible:u,active:c}];this.props.onChange({type:"visibility",changeSet:f})}},deleteNode:function(e){if(this.props.onChange){var t=parseInt(e.currentTarget.attributes["data-id"].value,10),n=this.state.nodes[t],r=n.id,o=n.parent,a=n.name,i=n.visible,s=[{id:r,parent:o,name:a,visible:i}];this.props.onChange({type:"delete",changeSet:s})}},render:function(){return f["default"].createElement("svg",{style:this.props.style,width:this.props.width,height:this.props.deltaY*this.state.nodes.length+"px",onClick:this.toggleActive},this.renderActives(),this.renderBranches(),this.renderForks(),this.renderNodes(),this.renderDeleteActions())}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(99),s=r(i),l=n(724),u=r(l);t["default"]=a["default"].createClass({displayName:"InlineToggleButtonWidget",propTypes:{active:a["default"].PropTypes.number,activeColor:a["default"].PropTypes.string,defaultColor:a["default"].PropTypes.string,height:a["default"].PropTypes.string,onChange:a["default"].PropTypes.func,options:a["default"].PropTypes.array.isRequired},getDefaultProps:function(){return{activeColor:"#fff",defaultColor:"#ccc",height:"1em"}},getInitialState:function(){return{activeIdx:this.props.active||0}},componentWillReceiveProps:function(e){var t=this.props,n=e;(0,s["default"])(t,n)||this.setState({activeIdx:n.active||0})},activateButton:function(e){var t=Number(e.target.dataset.idx);this.setState({activeIdx:t}),this.props.onChange&&this.props.onChange(this.props.options[t],t)},render:function(){var e=this,t=this.state.activeIdx,n=this.props.height,r=this.props.height,o=this.props.height;return a["default"].createElement("div",{className:u["default"].container},this.props.options.map(function(i,s){var l=t===s,c=l?e.props.activeColor:e.props.defaultColor,f=0===s?l?"activeFirst":"first":s===e.props.options.length-1?l?"activeLast":"last":l?"activeMiddle":"middle";return i.label?a["default"].createElement("button",{style:{lineHeight:r,fontSize:n,background:c},key:s,onClick:e.activateButton,"data-idx":s,className:u["default"][f]},i.label):i.img?a["default"].createElement("div",{style:{lineHeight:r,height:o,fontSize:n,background:c},key:s,onClick:e.activateButton,"data-idx":s,className:u["default"][f]},a["default"].createElement("img",{"data-idx":s,onClick:e.activateButton,height:"100%",src:i.img})):i.icon?a["default"].createElement("i",{key:s,style:{lineHeight:r,fontSize:n,background:c},onClick:e.activateButton,"data-idx":s,className:[u["default"][f],i.icon].join(" ")}):null}))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(200),s=r(i),l=n(729),u=r(l);t["default"]=a["default"].createClass({displayName:"ProxyEditorWidget",propTypes:{advanced:a["default"].PropTypes.bool,children:a["default"].PropTypes.oneOfType([a["default"].PropTypes.object,a["default"].PropTypes.array]),onApply:a["default"].PropTypes.func,sections:a["default"].PropTypes.array.isRequired},getDefaultProps:function(){return{advanced:!1}},getInitialState:function(){return{advanced:this.props.advanced,changeSet:{},filter:null}},toggleAdvanced:function(){var e=!this.state.advanced;this.setState({advanced:e})},updateFilter:function(e){var t=e.target.value;this.setState({filter:t})},updateChangeSet:function(e){var t=Object.assign({},this.state.changeSet,e);this.setState({changeSet:t})},applyChanges:function(){this.props.onApply&&this.props.onApply(this.state.changeSet),this.setState({changeSet:{}})},render:function(){var e=this,t=Object.keys(this.state.changeSet).length;return a["default"].createElement("div",{className:u["default"].container},a["default"].createElement("div",{className:u["default"].toolbar},a["default"].createElement("i",{className:this.state.advanced?u["default"].activeAdvancedButton:u["default"].advancedButton,onClick:this.toggleAdvanced}),a["default"].createElement("input",{type:"text",placeholder:"filter properties...",onChange:this.updateFilter,className:u["default"].filter}),a["default"].createElement("i",{className:t?u["default"].validateButtonOn:u["default"].validateButton,onClick:this.applyChanges})),a["default"].createElement("div",{className:u["default"].contentContainer},this.props.children,this.props.sections.map(function(t){return a["default"].createElement(s["default"],{key:t.name,proxy:t,filter:e.state.filter,collapsed:t.collapsed,advanced:e.state.advanced,onChange:e.updateChangeSet})})))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(85),a=r(o),i=n(86),s=r(i),l=n(3),u=r(l),c=n(22),f=r(c),p=n(160),d=r(p);t["default"]=u["default"].createClass({displayName:"Number",propTypes:{arg:u["default"].PropTypes.string,model:u["default"].PropTypes.object.isRequired},mixins:[a["default"],s["default"]],getInitialState:function(){return{advanced:!1,button:!1,slider:!1}},previous:function(){this.props.model.previous(this.props.arg)&&(this.props.model.lazyFetchData(),f["default"].findDOMNode(this.refs.slider).focus())},next:function(){this.props.model.next(this.props.arg)&&(this.props.model.lazyFetchData(),f["default"].findDOMNode(this.refs.slider).focus())},first:function(){this.props.model.first(this.props.arg)&&(this.props.model.lazyFetchData(),f["default"].findDOMNode(this.refs.slider).focus())},last:function(){this.props.model.last(this.props.arg)&&(this.props.model.lazyFetchData(),f["default"].findDOMNode(this.refs.slider).focus())},onIndexChange:function(e){this.props.model.setIndex(this.props.arg,Number(e.target.value))&&this.props.model.lazyFetchData()},updateMode:function(e){this.state.advanced!==e.altKey&&this.setState({advanced:e.altKey})},resetState:function(e){this.setState({advanced:!1})},enableButtons:function(e){this.setState({button:!0}),f["default"].findDOMNode(this.refs.slider).focus()},disableButtons:function(){this.setState({button:!1,advanced:!1})},grabFocus:function(){f["default"].findDOMNode(this.refs.slider).focus()},toggleAnimation:function(){this.props.model.toggleAnimationFlag(this.props.arg),this.setState({})},render:function(){return u["default"].createElement("div",{className:this.props.model.getAnimationFlag(this.props.arg)?d["default"].itemActive:d["default"].item,onKeyDown:this.updateMode,onKeyUp:this.resetState,onMouseLeave:this.disableButtons},u["default"].createElement("div",{className:d["default"].row},u["default"].createElement("div",{className:d["default"].label,onClick:this.toggleAnimation},this.props.model.label(this.props.arg)),u["default"].createElement("div",{className:d["default"].mobileOnly},this.props.model.getValue(this.props.arg)),u["default"].createElement("div",{className:[d["default"].itemControl,d["default"].noMobile].join(" "),onMouseEnter:this.enableButtons,onMouseLeave:this.disableButtons},u["default"].createElement("div",{className:this.state.button?d["default"].hidden:d["default"].itemControlValue},this.props.model.getValue(this.props.arg)),u["default"].createElement("i",{className:this.state.button?this.state.advanced?d["default"].firstButton:d["default"].previousButton:d["default"].hidden,onClick:this.state.advanced?this.first:this.previous}),u["default"].createElement("i",{className:this.state.button?this.state.advanced?d["default"].lastButton:d["default"].nextButton:d["default"].hidden,onClick:this.state.advanced?this.last:this.next}))),u["default"].createElement("div",{className:[d["default"].row,d["default"].mobileOnly].join(" ")},u["default"].createElement("div",{className:d["default"].itemControl},u["default"].createElement("br",null),u["default"].createElement("i",{className:d["default"].firstButton,onClick:this.first}),u["default"].createElement("i",{className:d["default"].lastButton,onClick:this.last}),u["default"].createElement("i",{className:d["default"].previousButton,onClick:this.previous}),u["default"].createElement("i",{className:d["default"].nextButton,onClick:this.next}))),u["default"].createElement("div",{className:d["default"].row},u["default"].createElement("div",{className:d["default"].slider,onMouseEnter:this.grabFocus},u["default"].createElement("input",{className:d["default"].input,ref:"slider",type:"range",min:"0",max:this.props.model.getSize(this.props.arg)-1,value:this.props.model.getIndex(this.props.arg),onChange:this.onIndexChange}))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(85),a=r(o),i=n(86),s=r(i),l=n(3),u=r(l),c=n(22),f=r(c),p=n(160),d=r(p);t["default"]=u["default"].createClass({displayName:"ParameterSet.String",propTypes:{arg:u["default"].PropTypes.string,model:u["default"].PropTypes.object.isRequired},mixins:[a["default"],s["default"]],handleChange:function(e){this.props.model.setValue(this.props.arg,e.target.value)&&this.props.model.lazyFetchData()},grabFocus:function(){f["default"].findDOMNode(this.refs.select).focus()},toggleAnimation:function(){this.props.model.toggleAnimationFlag(this.props.arg),this.setState({})},render:function(){return u["default"].createElement("div",{className:this.props.model.getAnimationFlag(this.props.arg)?d["default"].itemActive:d["default"].item},u["default"].createElement("div",{className:[d["default"].row,d["default"].label].join(" "),onClick:this.toggleAnimation},this.props.model.label(this.props.arg)),u["default"].createElement("div",{className:d["default"].row,onMouseEnter:this.grabFocus},u["default"].createElement("select",{className:d["default"].input,ref:"select",value:this.props.model.getValue(this.props.arg),onChange:this.handleChange},this.props.model.getValues(this.props.arg).map(function(e){return u["default"].createElement("option",{key:e,value:e},e)}))))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t'}})}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),a=r(o),i=n(734),s=r(i);t["default"]=a["default"].createClass({displayName:"TogglePanelWidget",propTypes:{anchor:a["default"].PropTypes.array,children:a["default"].PropTypes.oneOfType([a["default"].PropTypes.object,a["default"].PropTypes.array]),panelVisible:a["default"].PropTypes.bool,position:a["default"].PropTypes.array,size:a["default"].PropTypes.object},getDefaultProps:function(){return{anchor:["top","right"],children:[],panelVisible:!1,position:["top","left"],size:{button:["2em","2em"],panel:["400px"]}}},getInitialState:function(){return{panelVisible:this.props.panelVisible}},componentWillReceiveProps:function(e){e.value!==this.state.enabled&&this.setState({enabled:e.value}),e.panelVisible!==this.state.panelVisible&&this.setState({panelVisible:e.panelVisible})},togglePanel:function(){var e=!this.state.panelVisible;this.setState({panelVisible:e})},render:function(){var e=this.props.anchor.join(" "),t=this.props.position.join(" ");return a["default"].createElement("div",{className:s["default"].container,style:{width:this.props.size.button[0],height:this.props.size.button[1],lineHeight:this.props.size.button[1]}},a["default"].createElement("span",{className:this.state.panelVisible?s["default"].panelVisible:s["default"].panelHidden,style:{width:this.props.size.button[0],height:this.props.size.button[1],lineHeight:this.props.size.button[1]},onClick:this.togglePanel}),a["default"].createElement("div",{className:[s["default"].button,e].join(" ")},a["default"].createElement("div",{className:[s["default"].content,t].join(" "),style:{display:this.state.panelVisible?"block":"none",width:this.props.size.panel[0]}},this.props.children)))}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(192),a=r(o),i=n(384),s=r(i),l=n(25),u=r(l),c=n(386),f=r(c),p=n(193),d=r(p),h=n(194),g=r(h),m=n(195),v=r(m),_=n(196),y=r(_),b=n(389),w=r(b),x=n(197),C=r(x),E=n(119),T=r(E),P=n(390),k=r(P),M=n(391),S=r(M),D=n(392),R=r(D),A=n(198),I=r(A),O=n(83),N=r(O),F=n(120),L=r(F),B=n(84),j=r(B),W=n(199),U=r(W),V=n(393),z=r(V),q=n(200),H=r(q),X=n(121),G=r(X),Y=n(396),Q=r(Y),K=n(201),Z=r(K),J=n(397),$=r(J),ee=n(202),te=r(ee),ne=n(43),re=r(ne),oe=n(398),ae=r(oe);t["default"]={ActionListWidget:a["default"],ButtonSelectorWidget:s["default"],CollapsibleWidget:u["default"],ColorByWidget:f["default"],ColorPickerWidget:d["default"],CompositePipelineWidget:g["default"],ContentEditableWidget:v["default"],Coordinate2DWidget:y["default"],DoubleSliderWidget:w["default"],DropDownWidget:C["default"],EqualizerWidget:T["default"],FileBrowserWidget:k["default"],GitTreeWidget:S["default"],InlineToggleButtonWidget:R["default"],LayoutsWidget:I["default"],LookupTableWidget:N["default"],NumberInputWidget:L["default"],NumberSliderWidget:j["default"],PresetListWidget:U["default"],ProxyEditorWidget:z["default"],ProxyPropertyGroupWidget:H["default"],QueryDataModelWidget:G["default"],ResplendentWidget:Q["default"],ScalarRangeWidget:Z["default"],SvgIconWidget:$["default"],TextInputWidget:te["default"],ToggleIconButtonWidget:re["default"],TogglePanelWidget:ae["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(375),a=r(o),i=n(369),s=r(i),l=n(378),u=r(l),c=n(383),f=r(c),p=n(399),d=r(p);t["default"]={Properties:a["default"],CollapsibleControls:s["default"],Renderers:u["default"],Viewers:f["default"],Widgets:d["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;ns;++s){var l=r.metadata.dimensions[s];i=l>i?l:i}r.bgCanvas=new p["default"](i,i),r.registerObjectToFree(r.bgCanvas),r.fgCanvas=null,r.registerSubscription(e.onDataChange(function(e,t){r.dataFields={};for(var n in e)r.dataFields[n]=new window[r.metadata.types[n]](e[n].data);r.render()})),r.registerSubscription(r.lookupTableManager.onActiveLookupTableChange(function(e,t){r.field!==e&&(r.field=e,r.render())})),r.registerSubscription(r.lookupTableManager.onChange(function(e,t){r.update()}));var u=r;return r.mouseListener={click:function(e,t){if(!e.activeArea)return!1;var n=[u.probeXYZ[0],u.probeXYZ[1],u.probeXYZ[2]],r=v[u.renderMethod].idx,o=u.metadata.dimensions,a=e.activeArea,i=(e.relative.x-a[0])/a[2],s=(e.relative.y-a[1])/a[3];if(e.modifier)return!1;i=0>i?0:i>1?1:i,s=0>s?0:s>1?1:s,"XZ"===u.renderMethod&&(s=1-s);var l=Math.floor(i*o[r[0]]),c=Math.floor(s*o[r[1]]);return n[r[0]]=l,n[r[1]]=c,u.setProbe(n[0],n[1],n[2]),!0},drag:function(e,t){if(!e.activeArea)return!1;var n=[u.probeXYZ[0],u.probeXYZ[1],u.probeXYZ[2]],r=v[u.renderMethod].idx,o=u.metadata.dimensions,a=e.activeArea,i=(e.relative.x-a[0])/a[2],s=(e.relative.y-a[1])/a[3];if(e.modifier)return!1;i=0>i?0:i>1?1:i,s=0>s?0:s>1?1:s,"XZ"===u.renderMethod&&(s=1-s);var l=Math.floor(i*o[r[0]]),c=Math.floor(s*o[r[1]]);return n[r[0]]=l,n[r[1]]=c,u.setProbe(n[0],n[1],n[2]),!0},zoom:function(e,t){var n=[u.probeXYZ[0],u.probeXYZ[1],u.probeXYZ[2]],r=v[u.renderMethod].idx,o=r[2];return e.modifier?!1:(n[o]+=e.deltaY<0?-1:1,n[o]<0?(n[o]=0,!0):n[o]>=u.metadata.dimensions[o]?(n[o]=u.metadata.dimensions[o]-1,!0):(u.setProbe(n[0],n[1],n[2]),!0))}},r}return i(t,e),s(t,[{key:"setPushMethodAsBuffer",value:function(){this.pushMethod="pushToFrontAsBuffer"}},{key:"setPushMethodAsImage",value:function(){this.pushMethod="pushToFrontAsImage"}},{key:"setProbeLineNotification",value:function(e){this.triggerProbeLines=e}},{key:"updateProbeValue",value:function(){var e=this.probeXYZ[0],t=this.probeXYZ[1],n=this.probeXYZ[2],r=this.metadata.dimensions[0],o=this.metadata.dimensions[1],a=this.dataFields[this.field];a&&(this.probeValue=a[e+(o-t-1)*r+n*r*o])}},{key:"setProbe",value:function(e,t,n){var r=v[this.renderMethod].hasChange,o=v[this.renderMethod].idx,a=[].concat(this.probeXYZ);if(Array.isArray(e)&&(n=e[2],t=e[1],e=e[0]),r(this.probeXYZ,e,t,n))this.probeXYZ=[e,t,n],this.render();else{this.probeXYZ=[e,t,n];var i=this.metadata.dimensions,s=this.metadata.spacing;this.updateProbeValue(),"XZ"===this.renderMethod?this.pushToFront(i[o[0]],i[o[1]],s[o[0]],s[o[1]],this.probeXYZ[o[0]],i[o[1]]-this.probeXYZ[o[1]]-1):this.pushToFront(i[o[0]],i[o[1]],s[o[0]],s[o[1]],this.probeXYZ[o[0]],this.probeXYZ[o[1]])}a[0]===e&&a[1]===t&&a[2]===n||this.emit(h,[e,t,n])}},{key:"getProbe",value:function(){return this.probeXYZ}},{key:"getFieldValueAtProbeLocation",value:function(){return this.probeValue}},{key:"getProbeLine",value:function(e){var t=this,n={xRange:[0,100],fields:[]},r=this.fields,o=this.probeXYZ[0],a=this.probeXYZ[1],i=this.probeXYZ[2],s=this.metadata.dimensions[0],l=this.metadata.dimensions[1],u=this.metadata.dimensions[2],c=[];if(0===e)for(var f=(l-a-1)*s+i*s*l,p=0;s>p;p++)c.push(f+p);if(1===e){for(var f=o+i*s*l,d=0;l>d;d++)c.push(f+(l-d-1)*s);c.reverse()}if(2===e)for(var f=o+(l-a-1)*s,h=s*l,g=0;u>g;g++)c.push(f+g*h);var m=c.length;return r.forEach(function(e){for(var r=t.dataFields[e],o=[],a=t.lookupTableManager.getLookupTable(e).getScalarRange(),i=0;m>i;i++)o.push(r[c[i]]);n.fields.push({name:e,data:o,range:a})}),n}},{key:"render",value:function(){this.dataFields&&(this.updateProbeValue(),this["render"+this.renderMethod]())}},{key:"pushToFront",value:function(e,t,n,r,o,a){this[this.pushMethod](e,t,n,r,o,a),this.triggerProbeLines&&this.emit(d,{x:this.getProbeLine(0),y:this.getProbeLine(1),z:this.getProbeLine(2)})}},{key:"pushToFrontAsImage",value:function(e,t,n,r,o,a){var i=Math.floor(e*n),s=Math.floor(t*r),l=null;this.fgCanvas?this.fgCanvas.size(i,s):(this.fgCanvas=new p["default"](i,s),this.registerObjectToFree(this.fgCanvas)),l=this.fgCanvas.get2DContext(),l.drawImage(this.bgCanvas.el,0,0,e,t,0,0,i,s),l.beginPath(),l.moveTo(o*n,0),l.lineTo(o*n,s),l.moveTo(0,a*r),l.lineTo(i,a*r),l.strokeStyle="#ffffff",l.lineWidth=1,l.stroke();var u={url:this.fgCanvas.toDataURL(),type:this.renderMethod,builder:this};this.imageReady(u)}},{key:"pushToFrontAsBuffer",value:function(e,t,n,r,o,a){var i=Math.floor(e*n),s=Math.floor(t*r),l={canvas:this.bgCanvas.el,imageData:this.bgCanvas.el.getContext("2d").getImageData(0,0,e,t),area:[0,0,e,t],outputSize:[i,s],type:this.renderMethod,builder:this};this.broadcastCrossHair&&(l.crosshair=[o,a]),this.imageReady(l)}},{key:"renderXY",value:function(){for(var e=this.bgCanvas.get2DContext(),t=this.probeXYZ,n=this.metadata.dimensions,r=n[0],o=n[1],a=this.metadata.spacing,i=e.createImageData(n[0],n[1]),s=i.data,l=n[0]*n[1],u=l*t[2],c=this.lookupTableManager.getLookupTable(this.field),f=this.dataFields[this.field],p=0,d=0;o>d;d++)for(var h=0;r>h;h++){var g=c.getColor(f[u+h+r*(o-d-1)]);s[4*p]=255*g[0],s[4*p+1]=255*g[1],s[4*p+2]=255*g[2],s[4*p+3]=255,p++}e.putImageData(i,0,0),this.pushToFront(n[0],n[1],a[0],a[1],t[0],t[1])}},{key:"renderZY",value:function(){for(var e=this.bgCanvas.get2DContext(),t=this.probeXYZ,n=this.metadata.dimensions,r=t[0],o=n[0],a=n[0]*n[1],i=n[1],s=n[2],l=this.metadata.spacing,u=e.createImageData(n[2],n[1]),c=u.data,f=this.lookupTableManager.getLookupTable(this.field),p=this.dataFields[this.field],d=0,h=0;i>h;h++)for(var g=0;s>g;g++){var m=f.getColor(p[r+o*(i-h-1)+a*g]);c[4*d]=255*m[0],c[4*d+1]=255*m[1],c[4*d+2]=255*m[2],c[4*d+3]=255,d++}e.putImageData(u,0,0),this.pushToFront(n[2],n[1],l[2],l[1],t[2],t[1])}},{key:"renderXZ",value:function(){for(var e=this.bgCanvas.get2DContext(),t=this.probeXYZ,n=this.metadata.dimensions,r=n[0],o=n[2],a=r*n[1],i=r*(n[1]-t[1]-1),s=this.metadata.spacing,l=e.createImageData(r,o),u=l.data,c=this.lookupTableManager.getLookupTable(this.field),f=this.dataFields[this.field],p=0,d=0;o>d;d++)for(var h=0;r>h;h++){var g=c.getColor(f[i+h+(o-d-1)*a]);u[4*p]=255*g[0],u[4*p+1]=255*g[1],u[4*p+2]=255*g[2],u[4*p+3]=255,p++}e.putImageData(l,0,0),this.pushToFront(n[0],n[2],s[0],s[2],t[0],o-t[2]-1)}},{key:"isCrossHairEnabled",value:function(){return this.broadcastCrossHair}},{key:"setCrossHairEnable",value:function(e){this.broadcastCrossHair!==e&&(this.broadcastCrossHair=e,this.emit(g,e),this.setProbe(this.probeXYZ[0],this.probeXYZ[1],this.probeXYZ[2]))}},{key:"setField",value:function(e){this.field=e}},{key:"getField",value:function(){return this.field}},{key:"getFields",value:function(){return this.fields}},{key:"setRenderMethod",value:function(e){this.renderMethodMutable&&this.renderMethod!==e&&(this.renderMethod=e,this.render(),this.emit(m,e))}},{key:"getRenderMethod",value:function(){return this.renderMethod}},{key:"getRenderMethods",value:function(){return["XY","ZY","XZ"]}},{key:"isRenderMethodMutable",value:function(){return this.renderMethodMutable}},{key:"setRenderMethodImutable",value:function(){this.renderMethodMutable=!1}},{key:"setRenderMethodMutable",value:function(){this.renderMethodMutable=!0}},{key:"getListeners",value:function(){return this.mouseListener}},{key:"onProbeLineReady",value:function(e){return this.on(d,e)}},{key:"onProbeChange",value:function(e){return this.on(h,e)}},{key:"onRenderMethodChange",value:function(e){return this.on(m,e)}},{key:"onCrosshairVisibilityChange",value:function(e){return this.on(g,e)}},{key:"destroy",value:function(){l(Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.off(),this.bgCanvas=null,this.fgCanvas=null}},{key:"getControlWidgets", -value:function(){var e=this,t=this.getControlModels(),n=t.lookupTableManager,r=t.queryDataModel;return[{name:"LookupTableManagerWidget",lookupTableManager:n},{name:"ProbeControl",model:e},{name:"QueryDataModelWidget",queryDataModel:r}]}}]),t}(c["default"]);t["default"]=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;no;o++){var a=e[2*o+1];"_"===a?this.offsetMap[t[o]]=-1:this.offsetMap[t[o]]=this.spriteSize-r[t[o]+a]}}},{key:"_updateCompositeMap",value:function(e,t){if(null!==e&&null!==t)for(var n=t,r=this.compositeMap,o=n.length;o--;){var a=n[o];if("@"===a[0]);else if(r.hasOwnProperty(a));else{for(var i=-1,s=0,l=a.length;l>s;s++)i=this.offsetMap[a[s]],-1!==i&&(s=l);r[a]=i}}}},{key:"_pushToFrontAsImage",value:function(e,t){var n=null;this.fgCanvas?this.fgCanvas.size(e,t):(this.fgCanvas=new p["default"](e,t),this.registerObjectToFree(this.fgCanvas)),n=this.fgCanvas.get2DContext(),n.drawImage(this.bgCanvas.el,0,0,e,t,0,0,e,t);var r={url:this.fgCanvas.toDataURL(),builder:this};this.imageReady(r)}},{key:"_pushToFrontAsBuffer",value:function(e,t){var n={canvas:this.bgCanvas.el,imageData:this.bgCanvas.el.getContext("2d").getImageData(0,0,e,t),area:[0,0,e,t],outputSize:[e,t],builder:this,arguments:this.queryDataModel.getQuery()};n.arguments.pipeline=this.query,this.imageReady(n),this.queryDataModel.nextExploration()}},{key:"setPipelineQuery",value:function(e){this.query!==e&&(this.query=e,this._updateOffsetMap(e),this._updateCompositeMap(e,this.composite),this.render())}},{key:"render",value:function(){function e(e){l+=e,u+=Math.floor(l/i),l%=i}var t=this;if(!this.sprite)return void this.queryDataModel.fetchData();if(null!==this.query){var n=this.bgCanvas.get2DContext(),r=this.metadata.dimensions,o=this.composite,a=o.length,i=r[0],s=1,l=0,u=0;if(this.sprite.image.complete){this.sprite.image.onload&&(this.sprite.image.onload=null),n.clearRect(0,0,r[0],r[1]);for(var c=0;a>c;c++){var f=o[c];"@"===f[0]?e(Number(f.replace(/@/,"+"))):(s=this.compositeMap[f],-1!==s&&n.drawImage(this.sprite.image,l,u+r[1]*s,1,1,l,u,1,1),e(1))}this._pushToFrontAsBuffer(r[0],r[1])}else this.sprite.image.onload=function(){t.render()}}}},{key:"destroy",value:function(){l(Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.bgCanvas=null,this.fgCanvas=null,this.compositeMap=null,this.offsetMap=null}}]),t}(c["default"]);t["default"]=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;ns;++s){var l=r.metadata.dimensions[s];i=l>i?l:i}r.bgCanvas=new p["default"](i,i),r.registerObjectToFree(r.bgCanvas),r.fgCanvas=null,r.registerSubscription(e.onDataChange(function(e,t){r.lastImageStack=e;var n=function(){r.render()},o=!0;for(var a in e){var i=e[a].image;i.addEventListener("load",n),o=o&&i.complete}o&&r.render()})),r.registerSubscription(r.lookupTableManager.onChange(function(e,t){r.update()}));var u=r;return r.mouseListener={click:function(e,t){if(!e.activeArea)return!1;var n=[u.probeXYZ[0],u.probeXYZ[1],u.probeXYZ[2]],r=v[u.renderMethod].idx,o=u.metadata.dimensions,a=e.activeArea,i=(e.relative.x-a[0])/a[2],s=(e.relative.y-a[1])/a[3];if(e.modifier)return!1;i=0>i?0:i>1?1:i,s=0>s?0:s>1?1:s;var l=Math.floor(i*o[r[0]]),c=Math.floor(s*o[r[1]]);return n[r[0]]=l,n[r[1]]=c,u.setProbe(n[0],n[1],n[2]),!0},drag:function(e,t){if(!e.activeArea)return!1;var n=[u.probeXYZ[0],u.probeXYZ[1],u.probeXYZ[2]],r=v[u.renderMethod].idx,o=u.metadata.dimensions,a=e.activeArea,i=(e.relative.x-a[0])/a[2],s=(e.relative.y-a[1])/a[3];if(e.modifier)return!1;i=0>i?0:i>1?1:i,s=0>s?0:s>1?1:s;var l=Math.floor(i*o[r[0]]),c=Math.floor(s*o[r[1]]);return n[r[0]]=l,n[r[1]]=c,u.setProbe(n[0],n[1],n[2]),!0},zoom:function(e,t){var n=[u.probeXYZ[0],u.probeXYZ[1],u.probeXYZ[2]],r=v[u.renderMethod].idx,o=r[2];return e.modifier?!1:(n[o]+=e.deltaY<0?-1:1,n[o]<0?(n[o]=0,!0):n[o]>=u.metadata.dimensions[o]?(n[o]=u.metadata.dimensions[o]-1,!0):(u.setProbe(n[0],n[1],n[2]),!0))}},r}return i(t,e),s(t,[{key:"setProbeLineNotification",value:function(e){this.triggerProbeLines=e}},{key:"getYOffset",value:function(e){return void 0===e&&(e=this.probeXYZ[2]),this.metadata.sprite_size-e%this.metadata.sprite_size-1}},{key:"getImage",value:function(e,t){void 0===e&&(e=this.probeXYZ[2]);var n=this.metadata.slices.length-1,r=Math.floor(e/this.metadata.sprite_size);r=0>r?0:r>n?n:r;var o=this.lastImageStack[this.metadata.slices[r]],a=o.image;a?a.complete?t.call(a):a.addEventListener("load",t):(this.workImage.addEventListener("load",t),this.workImage.src=o.url)}},{key:"setProbe",value:function(e,t,n){var r=v[this.renderMethod].hasChange,o=v[this.renderMethod].idx,a=[].concat(this.probeXYZ);if(Array.isArray(e)&&(n=e[2],t=e[1],e=e[0]),r(this.probeXYZ,e,t,n))this.probeXYZ=[e,t,n],this.render();else{this.probeXYZ=[e,t,n];var i=this.metadata.dimensions,s=this.metadata.spacing;v[this.renderMethod].updateProbeValue(this,e,t,n),this.pushToFront(i[o[0]],i[o[1]],s[o[0]],s[o[1]],this.probeXYZ[o[0]],this.probeXYZ[o[1]])}a[0]===e&&a[1]===t&&a[2]===n||this.emit(h,[e,t,n])}},{key:"getProbe",value:function(){return this.probeXYZ}},{key:"getFieldValueAtProbeLocation",value:function(){return this.probeValue}},{key:"getProbeLine",value:function(e){for(var t={name:this.getField(),data:[]},n={xRange:[0,100],fields:[t]},r=-1,o=v[this.renderMethod].idx,a=0;2>a;a++)e===o[a]&&(r=a);if(-1!==r){var i=this.scalars[t.name],s=this.metadata.dimensions,l=s[o[0]],u=s[o[1]],c=0===r?1:l,f=0===r?this.probeXYZ[o[1]]*l:this.probeXYZ[o[0]],p=0===r?l:u;if(this.metadata.origin&&this.metadata.spacing&&(n.xRange[0]=this.metadata.origin[e],n.xRange[1]=this.metadata.origin[e]+this.metadata.spacing[e]*s[e]),i)for(var d=0;p>d;d++)t.data.push(i[f+d*c])}return n}},{key:"render",value:function(){this.lastImageStack&&(this["render"+this.renderMethod](),v[this.renderMethod].updateProbeValue(this,this.probeXYZ[0],this.probeXYZ[1],this.probeXYZ[2]))}},{key:"pushToFront",value:function(e,t,n,r,o,a){this[this.pushMethod](e,t,n,r,o,a),this.triggerProbeLines&&this.emit(d,{x:this.getProbeLine(0),y:this.getProbeLine(1),z:this.getProbeLine(2)})}},{key:"pushToFrontAsImage",value:function(e,t,n,r,o,a){var i=Math.floor(e*n),s=Math.floor(t*r),l=null;this.fgCanvas?this.fgCanvas.size(i,s):this.fgCanvas=new p["default"](i,s),l=this.fgCanvas.get2DContext(),l.drawImage(this.bgCanvas.el,0,0,e,t,0,0,i,s),l.beginPath(),l.moveTo(o*n,0),l.lineTo(o*n,s),l.moveTo(0,a*r),l.lineTo(i,a*r),l.strokeStyle="#ffffff",l.lineWidth=1,l.stroke();var u={url:this.fgCanvas.toDataURL(),type:this.renderMethod,builder:this};this.imageReady(u)}},{key:"pushToFrontAsBuffer",value:function(e,t,n,r,o,a){var i=Math.floor(e*n),s=Math.floor(t*r),l={canvas:this.bgCanvas.el,imageData:this.bgCanvas.el.getContext("2d").getImageData(0,0,e,t),area:[0,0,e,t],outputSize:[i,s],type:this.renderMethod,builder:this};this.broadcastCrossHair&&(l.crosshair=[o,a]),this.imageReady(l)}},{key:"renderXY",value:function(){var e=this,t=this.bgCanvas.get2DContext(),n=this.getYOffset(),r=this.probeXYZ,o=this.metadata.dimensions,a=this.metadata.spacing;this.getImage(this.probeXYZ[2],function(){var i=this;t.drawImage(i,0,o[1]*n,o[0],o[1],0,0,o[0],o[1]),e.extractNumericalValues(o[0],o[1]),e.applyLookupTable(o[0],o[1]),e.pushToFront(o[0],o[1],a[0],a[1],r[0],r[1])})}},{key:"renderZY",value:function(){function e(){var s=t.getYOffset(a),l=this;n.drawImage(l,r[0],o[1]*s,1,o[1],a,0,1,o[1]),a--?t.getImage(a,e):(t.extractNumericalValues(o[2],o[1]),t.applyLookupTable(o[2],o[1]),t.pushToFront(o[2],o[1],i[2],i[1],r[2],r[1]))}var t=this,n=this.bgCanvas.get2DContext(),r=this.probeXYZ,o=this.metadata.dimensions,a=o[2],i=this.metadata.spacing;a--&&t.getImage(a,e)}},{key:"renderXZ",value:function(){function e(){var s=t.getYOffset(i),l=this;n.drawImage(l,0,o[1]*s+r[1],o[0],1,0,i,o[0],1),i--?t.getImage(i,e):(t.extractNumericalValues(o[0],o[2]),t.applyLookupTable(o[0],o[2]),t.pushToFront(o[0],o[2],a[0],a[2],r[0],r[2]))}var t=this,n=this.bgCanvas.get2DContext(),r=this.probeXYZ,o=this.metadata.dimensions,a=this.metadata.spacing,i=o[2];i--&&t.getImage(i,e)}},{key:"isCrossHairEnabled",value:function(){return this.broadcastCrossHair}},{key:"setCrossHairEnable",value:function(e){this.broadcastCrossHair!==e&&(this.broadcastCrossHair=e,this.emit(g,e),this.setProbe(this.probeXYZ[0],this.probeXYZ[1],this.probeXYZ[2]))}},{key:"extractNumericalValues",value:function(e,t){for(var n=this.bgCanvas.get2DContext(),r=this.getField(),o=n.getImageData(0,0,e,t),a=o.data,i=a.length,s=0,l=this.metadata.ranges[r],u=l[1]-l[0],c=0,f=new Float32Array(e*t);i>s;){var p=(a[s]+256*a[s+1]+65536*a[s+2])/16777216*u+l[0];f[c++]=p,s+=4}this.scalars[r]=f}},{key:"applyLookupTable",value:function(e,t){var n=this.bgCanvas.get2DContext(),r=this.getField(),o=this.lookupTableManager.getLookupTable(r),a=n.getImageData(0,0,e,t),i=a.data,s=i.length,l=0,u=0,c=this.scalars[r];if(o){for(;s>l;){var f=o.getColor(c[u++]);i[l]=Math.floor(255*f[0]),i[l+1]=Math.floor(255*f[1]),i[l+2]=Math.floor(255*f[2]),l+=4}n.putImageData(a,0,0)}}},{key:"setField",value:function(e){this.queryDataModel.setValue("field",e)}},{key:"getField",value:function(){return this.queryDataModel.getValue("field")}},{key:"getFields",value:function(){return this.metadata.fields}},{key:"setRenderMethod",value:function(e){this.renderMethodMutable&&this.renderMethod!==e&&(this.renderMethod=e,this.render(),this.emit(m,e))}},{key:"getRenderMethod",value:function(){return this.renderMethod}},{key:"getRenderMethods",value:function(){return["XY","ZY","XZ"]}},{key:"isRenderMethodMutable",value:function(){return this.renderMethodMutable}},{key:"setRenderMethodImutable",value:function(){this.renderMethodMutable=!1}},{key:"setRenderMethodMutable",value:function(){this.renderMethodMutable=!0}},{key:"getListeners",value:function(){return this.mouseListener}},{key:"onProbeLineReady",value:function(e){return this.on(d,e)}},{key:"onProbeChange",value:function(e){return this.on(h,e)}},{key:"onRenderMethodChange",value:function(e){return this.on(m,e)}},{key:"onCrosshairVisibilityChange",value:function(e){return this.on(g,e)}},{key:"destroy",value:function(){l(Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.off(),this.bgCanvas=null,this.workImage=null}},{key:"getControlWidgets",value:function(){var e=this.getControlModels(),t=e.lookupTable,n=e.originalRange,r=e.lookupTableManager,o=e.queryDataModel,a=this;return[{name:"LookupTableManagerWidget",lookupTable:t,originalRange:n,lookupTableManager:r},{name:"ProbeControl",model:a},{name:"QueryDataModelWidget",queryDataModel:o}]}},{key:"getControlModels",value:function(){return{queryDataModel:this.queryDataModel,lookupTable:this.lookupTableManager.getLookupTable(this.getField()),originalRange:this.metadata.ranges[this.getField()],lookupTableManager:this.lookupTableManager}}}]),t}(c["default"]);t["default"]=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var n in d)if((0,i["default"])(e,n))return new d[n](t);return console.error("No compositor found for type",e),null}Object.defineProperty(t,"__esModule",{value:!0});var a=n(239),i=r(a),s=n(407),l=r(s),u=n(408),c=r(u),f=n(406),p=r(f),d={rgbd:l["default"],"sxyz-light":c["default"],"raw-rgbd":p["default"]};t["default"]={createCompositor:o}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;no;o++){var a=e[2*o+1];"_"!==a&&this.offsetList.push(this.spriteSize-r[t[o]+a])}}},{key:"render",value:function(){var e=this;if(!this.rgbdData)return null;this.pingPong.clearFbo(),this.offsetList.forEach(function(t){e.drawCompositePass(e.extractLayerData(e.rgbdData,t*e.height))}),this.drawDisplayPass();var t={canvas:this.glCanvas.el,area:[0,0,this.width,this.height],outputSize:[this.width,this.height],builder:this.imageBuilder};this.imageBuilder.imageReady(t)}},{key:"destroy",value:function(){this.glCanvas.destroy(),this.glCanvas=null,this.dataSubscription.unsubscribe(),this.dataSubscription=null,this.glResources.destroy(),this.glResources=null,this.pingPong=null}},{key:"drawDisplayPass",value:function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this.gl.useProgram(this.glResources.programs.displayProgram),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.viewport(0,0,this.width,this.height);var e=this.gl.getUniformLocation(this.glResources.programs.displayProgram,"u_image");this.gl.uniform1i(e,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture()),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish()}},{key:"drawCompositePass",value:function(e){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.pingPong.getFramebuffer()),this.gl.useProgram(this.glResources.programs.compositeProgram),this.gl.viewport(0,0,this.width,this.height);var t=this.gl.getUniformLocation(this.glResources.programs.compositeProgram,"layerSampler");this.gl.uniform1i(t,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.texture2D),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.width,this.height,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,e);var n=this.gl.getUniformLocation(this.glResources.programs.compositeProgram,"compositeSampler");this.gl.uniform1i(n,1),this.gl.activeTexture(this.gl.TEXTURE0+1),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture()),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.pingPong.swap()}}]),e}();t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;no;o++){var a=e[2*o+1];"_"!==a&&this.offsetList.push(this.spriteSize-r[t[o]+a])}}},{key:"render",value:function(){var e=this;if(!this.rgbdSprite||!this.rgbdSprite.complete)return null;this.removeLoadCallback&&(this.rgbdSprite.removeEventListener("load",this.closureRenderMethod),this.removeLoadCallback=!1),this.pingPong.clearFbo(),this.offsetList.forEach(function(t){var n=t*e.height;e.compositeCtx.clearRect(0,0,e.width,e.height),e.compositeCtx.drawImage(e.rgbdSprite,0,n,e.width,e.height,0,0,e.width,e.height),e.drawCompositePass()}),this.drawDisplayPass();var t={canvas:this.glCanvas.el,area:[0,0,this.width,this.height],outputSize:[this.width,this.height],builder:this.imageBuilder};this.imageBuilder.imageReady(t)}},{key:"destroy",value:function(){this.glCanvas.destroy(),this.glCanvas=null,this.dataSubscription.unsubscribe(),this.dataSubscription=null,this.glResources.destroy(),this.glResources=null,this.pingPong=null}},{key:"drawDisplayPass",value:function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this.gl.useProgram(this.glResources.programs.displayProgram),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.viewport(0,0,this.width,this.height);var e=this.gl.getUniformLocation(this.glResources.programs.displayProgram,"u_image");this.gl.uniform1i(e,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture()),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish()}},{key:"drawCompositePass",value:function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.pingPong.getFramebuffer()),this.gl.useProgram(this.glResources.programs.compositeProgram),this.gl.viewport(0,0,this.width,this.height);var e=this.gl.getUniformLocation(this.glResources.programs.compositeProgram,"layerSampler");this.gl.uniform1i(e,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.texture2D),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.compositeCanvas.el);var t=this.gl.getUniformLocation(this.glResources.programs.compositeProgram,"compositeSampler");this.gl.uniform1i(t,1),this.gl.activeTexture(this.gl.TEXTURE0+1),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture()),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.pingPong.swap()}}]),e}();t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){var n=parseFloat(e),r=parseFloat(t),o=(180-n)*Math.PI/180,a=(180-r)*Math.PI/180;return[Math.sin(a)*Math.cos(o),Math.sin(a)*Math.sin(o),Math.cos(a)]}function i(e,t){var n=a(e.getValue("phi"),e.getValue("theta")),r=g["default"].fromValues(n[0],n[1],n[2]),o=g["default"].fromValues(0,0,0),i=g["default"].fromValues(0,0,1),s=g["default"].create();g["default"].add(s,i,r),g["default"].normalize(s,s);var l=g["default"].create();g["default"].subtract(l,o,r);var u=g["default"].create();g["default"].subtract(u,s,r);var c=g["default"].create();g["default"].cross(c,l,u),g["default"].normalize(c,c),g["default"].subtract(l,c,r),g["default"].subtract(u,o,r);var f=g["default"].create();g["default"].cross(f,l,u),g["default"].normalize(f,f);var p=g["default"].create();g["default"].scale(p,c,t.x);var d=g["default"].create();g["default"].scale(d,f,t.y);var h=g["default"].create();g["default"].scale(h,r,.3);var m=g["default"].create();return g["default"].add(m,h,p),g["default"].add(m,m,d),g["default"].normalize(m,m),{lightDir:m,viewDir:r}}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;na;a++){var i=e[2*a+1];if("_"!==i&&o[i]){var s=o[i];if(s.normal){var l=s.normal[0],u=s.normal[1],c=s.normal[2];this.offsetList.push({fieldName:this.compositePipeline.fields[i],scalar:this.spriteSize-r[t[a]+i],nx:this.spriteSize-r[t[a]+l],ny:this.spriteSize-r[t[a]+u],nz:this.spriteSize-r[t[a]+c]})}}}}},{key:"render",value:function(){if(!this.sxyzSprite||!this.sxyzSprite.complete)return void console.log("Not enough data to render");this.removeLoadCallback&&(this.sxyzSprite.removeEventListener("load",this.closureRenderMethod),this.removeLoadCallback=!1),this.pingPong.clearFbo();var e=i(this.queryDataModel,this.lightProperties.lightPosition),t=e.lightDir,n=e.viewDir,r=this.width,o=this.height,a=0,s=0;this.compositeCtx.clearRect(0,0,r,o),this.compositeCtx.drawImage(this.sxyzSprite,0,this.spriteSize*o,r,o,0,0,r,o),this.drawBackgroundPass(this.bgColor);for(var l=0,u=this.offsetList.length;u>l;l+=1){var c=this.offsetList[l],f=c.fieldName;s=0,this.doLighting?(s=c.nx*o,this.nxCtx.clearRect(0,0,r,o),this.nxCtx.drawImage(this.sxyzSprite,a,s,r,o,0,0,r,o),s=c.ny*o,this.nyCtx.clearRect(0,0,r,o),this.nyCtx.drawImage(this.sxyzSprite,a,s,r,o,0,0,r,o),s=c.nz*o,this.nzCtx.clearRect(0,0,r,o),this.nzCtx.drawImage(this.sxyzSprite,a,s,r,o,0,0,r,o),s=c.scalar*o,this.scalarCtx.clearRect(0,0,r,o),this.scalarCtx.drawImage(this.sxyzSprite,a,s,r,o,0,0,r,o),this.drawLitCompositePass(n,t,this.lightProperties,this.lutMap[f])):(s=c.scalar*o,this.scalarCtx.clearRect(0,0,r,o),this.scalarCtx.drawImage(this.sxyzSprite,a,s,r,o,0,0,r,o),this.drawLutCompositePass(this.lutMap[f]))}this.drawDisplayPass();var p={canvas:this.glCanvas.el,area:[0,0,this.width,this.height],outputSize:[this.width,this.height],builder:this.imageBuilder};this.imageBuilder.imageReady(p)}},{key:"drawDisplayPass",value:function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this.gl.useProgram(this.glResources.programs.displayProgram),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.viewport(0,0,this.width,this.height);var e=this.gl.getUniformLocation(this.glResources.programs.displayProgram,"u_image");this.gl.uniform1i(e,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture()),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.bindTexture(this.gl.TEXTURE_2D,null)}},{key:"drawBackgroundPass",value:function(e){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.pingPong.getFramebuffer()),this.gl.useProgram(this.glResources.programs.backgroundProgram),this.gl.viewport(0,0,this.width,this.height);var t=v["default"].fromValues(e[0],e[1],e[2],1),n=this.gl.getUniformLocation(this.glResources.programs.backgroundProgram,"backgroundColor");this.gl.uniform4fv(n,t);var r=this.gl.getUniformLocation(this.glResources.programs.backgroundProgram,"backgroundSampler");this.gl.uniform1i(r,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture()),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.compositeCanvas.el),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.pingPong.swap(),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.bindTexture(this.gl.TEXTURE_2D,null)}},{key:"drawLitCompositePass",value:function(e,t,n,r){var o=n.lightTerms,a=n.lightColor;this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.pingPong.getFramebuffer()),this.gl.useProgram(this.glResources.programs.compositeLightProgram),this.gl.viewport(0,0,this.width,this.height);var i=v["default"].fromValues(e[0],e[1],e[2],0),s=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"viewDir");this.gl.uniform4fv(s,i);var l=v["default"].fromValues(t[0],t[1],t[2],0),u=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"lightDir");this.gl.uniform4fv(u,l);var c=v["default"].fromValues(o.ka,o.kd,o.ks,o.alpha),f=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"lightTerms");this.gl.uniform4fv(f,c);var p=v["default"].fromValues(a[0],a[1],a[2],1),d=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"lightColor");this.gl.uniform4fv(d,p);var h=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"scalarSampler");this.gl.uniform1i(h,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.scalars),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.scalarCanvas.el);var g=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"nxSampler");this.gl.uniform1i(g,1),this.gl.activeTexture(this.gl.TEXTURE0+1),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.nx),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.nxCanvas.el);var m=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"nySampler");this.gl.uniform1i(m,2),this.gl.activeTexture(this.gl.TEXTURE0+2),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.ny),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.nyCanvas.el);var _=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"nzSampler");this.gl.uniform1i(_,3),this.gl.activeTexture(this.gl.TEXTURE0+3),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.nz),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.nzCanvas.el);var y=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"compositeSampler");this.gl.uniform1i(y,4),this.gl.activeTexture(this.gl.TEXTURE0+4),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture());var b=this.gl.getUniformLocation(this.glResources.programs.compositeLightProgram,"lutSampler");this.gl.uniform1i(b,5),this.gl.activeTexture(this.gl.TEXTURE0+5),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.lutTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.numLutSamples,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,r),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.pingPong.swap();for(var w=0;6>w;w+=1)this.gl.activeTexture(this.gl.TEXTURE0+w),this.gl.bindTexture(this.gl.TEXTURE_2D,null)}},{key:"drawLutCompositePass",value:function(e){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.pingPong.getFramebuffer()),this.gl.useProgram(this.glResources.programs.compositeLutProgram),this.gl.viewport(0,0,this.width,this.height);var t=this.gl.getUniformLocation(this.glResources.programs.compositeLutProgram,"scalarSampler");this.gl.uniform1i(t,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.scalars),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.scalarCanvas.el);var n=this.gl.getUniformLocation(this.glResources.programs.compositeLutProgram,"compositeSampler");this.gl.uniform1i(n,1),this.gl.activeTexture(this.gl.TEXTURE0+1),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture());var r=this.gl.getUniformLocation(this.glResources.programs.compositeLutProgram,"lutSampler");this.gl.uniform1i(r,2),this.gl.activeTexture(this.gl.TEXTURE0+2),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.lutTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.numLutSamples,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.pingPong.swap();for(var o=0;3>o;o+=1)this.gl.activeTexture(this.gl.TEXTURE0+o),this.gl.bindTexture(this.gl.TEXTURE_2D,null)}},{key:"getControlWidgets",value:function(){return[{name:"LookupTableManagerWidget",lookupTableManager:this.lookupTableManager},{name:"LightPropertiesWidget",light:this},{name:"CompositeControl",pipelineModel:this.imageBuilder.pipelineModel},{name:"QueryDataModelWidget",queryDataModel:this.queryDataModel}]}},{key:"getLightingEnabled",value:function(){return this.doLighting}},{key:"setLightingEnabled",value:function(e){this.doLighting=e,this.render()}},{key:"getLightProperties",value:function(){return this.lightProperties}},{key:"setLightProperties",value:function(e){this.lightProperties=(0,d["default"])(this.lightProperties,e),this.render()}},{key:"getControlModels",value:function(){return{lookupTableManager:this.lookupTableManager,light:this,pipelineModel:this.imageBuilder.pipelineModel,queryDataModel:this.queryDataModel,dimensions:[this.width,this.height]}}},{key:"destroy",value:function(){this.dataSubscription.unsubscribe(),this.dataSubscription=null,this.glResources.destroy(),this.glResources=null,this.pingPong=null}}]),e}();t["default"]=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;ni;i++){var s=this.depthArray[i];o[4*i+0]=s,o[4*i+1]=s,o[4*i+2]=s,o[4*i+3]=255}e.putImageData(r,0,0);var l={canvas:this.bgCanvas.el,area:[0,0,t,n],outputSize:[t,n],builder:this};this.imageReady(l)}},{key:"destroy",value:function(){l(Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.bgCanvas=null,this.dataName=null,this.depthArray=null,this.dimensions=null}}]),t}(c["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;ng;g++){var v=new window[l](this.timeData.data[g][c+"_"+u].data);p.push(v[s])}else c&&u&&!this.timeData.data[0][c+"_"+u]&&this.fetchTimeData();this.emit(_,d),n&&this.timeProbe.triggerChange(),this.render()}},{key:"render",value:function(){function e(e){var t=e%r,n=Math.floor(e/r);return(o-n-1)*r+t}var t=this,n=this.bgCanvas.get2DContext(),r=this.dimensions[0],o=this.dimensions[1],a=r*o,i=n.createImageData(r,o),s=i.data;n.clearRect(0,0,r,o),this.layers.forEach(function(n){if(n.active)for(var r=t.lookupTableManager.getLookupTable(n.array),o=0;a>o;o++){var i=e(o),l=r.getColor(n.data[i]),u=n.light&&n.light[i]?n.light[i]-t.light:0;l[3]&&(s[4*o]=255*l[0]+u,s[4*o+1]=255*l[1]+u,s[4*o+2]=255*l[2]+u,s[4*o+3]=255*l[3],n.hasMesh&&n.meshActive&&n.mesh&&n.mesh[i]&&(s[4*o]=t.meshColor[0],s[4*o+1]=t.meshColor[1],s[4*o+2]=t.meshColor[2]))}}),n.putImageData(i,0,0);var l=this.queryDataModel.getQuery();if(this.timeProbe.query.time=l.time,this.timeProbe.draw=(0,m["default"])(this.timeProbe.query,l),this.timeProbe.enabled&&this.timeProbe.draw){var u=this.timeProbe.x,c=this.timeProbe.y,f=10;n.beginPath(),n.moveTo(u-f,c),n.lineTo(u+f,c),n.moveTo(u,c-f),n.lineTo(u,c+f),n.lineWidth=4,n.strokeStyle="#ffffff",n.stroke(),n.lineWidth=2,n.strokeStyle="#000000",n.stroke()}var p={canvas:this.bgCanvas.el,area:[0,0,r,o],outputSize:[r,o],builder:this,arguments:this.queryDataModel.getQuery()};this.imageReady(p)}},{key:"onTimeDataReady",value:function(e){return this.on(_,e)}},{key:"onProbeChange",value:function(e){return this.on(v,e)}},{key:"destroy",value:function(){l(Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.off(),this.bgCanvas=null,this.dimensions=null,this.layers=null,this.light=null,this.meshColor=null,this.metadata=null,this.timeData=null,this.timeDataQueryDataModel=null,this.timeProbe=null}},{key:"getControlWidgets",value:function(){var e=this,t=this.getControlModels(),n=t.lookupTableManager,r=t.queryDataModel;return[{name:"LookupTableManagerWidget",lookupTableManager:n},{name:"FloatImageControl",model:e},{name:"QueryDataModelWidget",queryDataModel:r}]}},{key:"getControlModels",value:function(){return{lookupTableManager:this.lookupTableManager,queryDataModel:this.queryDataModel}}},{key:"isMultiView",value:function(){return!(0,h["default"])(this.queryDataModel.originalData.type,"single-view")}},{key:"getLayers",value:function(){return this.layers}},{key:"setLight",value:function(e){this.light!==e&&(this.light=e,this.render())}},{key:"getLight",value:function(){return this.light}},{key:"getTimeProbe",value:function(){return this.timeProbe}},{key:"setMeshColor",value:function(e,t,n){this.meshColor[0]!==e&&this.meshColor[1]!==t&&this.meshColor[2]!==n&&(this.meshColor=[e,t,n],this.update())}},{key:"getMeshColor",value:function(){return this.meshColor}},{key:"updateLayerVisibility",value:function(e,t){for(var n=this.layers,r=n.length;r--;)if(n[r].name===e)return n[r].active=t,this.update(),void(this.timeProbe.enabled&&(this.timeProbe.forceUpdate=!0,this.getTimeChart()))}},{key:"updateMaskLayerVisibility",value:function(e,t){for(var n=this.layers,r=n.length;r--;)if(n[r].name===e)return n[r].meshActive=t,this.update()}},{key:"updateLayerColorBy",value:function(e,t){for(var n=this.layers,r=n.length;r--;)if(n[r].name===e)return n[r].array=t,this.update(),void(this.timeProbe.enabled&&this.getTimeChart())}}]),t}(c["default"]);t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;ns?0:s>1?1:s,l=0>l?0:l>1?1:l;var u=Math.floor(s*i.width),c=Math.floor(l*i.height),p=Math.pow(u-i.lensCenterX,2)+Math.pow(c-i.lensCenterY,2);r&&(i.lensZoom=!1,i.listenerZoom=!1,i.lensDrag=!1,i.listenerDrag=!1,i.lensOriginalCenterX=i.lensCenterX,i.lensOriginalCenterY=i.lensCenterY,i.lensDragDX=u-i.lensCenterX,i.lensDragDY=c-i.lensCenterY),(i.lensDrag||ps?0:s>1?1:s,l=0>l?0:l>1?1:l;var u=Math.floor(s*i.width),c=Math.floor(l*i.height),p=Math.pow(u-i.lensCenterX,2)+Math.pow(c-i.lensCenterY,2);if((i.lensZoom||pi.maxZoom&&(d=i.maxZoom),i.lensRadius!==d&&(i.lensRadius=d,i.draw()),e.isFinal&&(i.lensOriginalRadius=i.lensRadius)}var h=i.frontImageBuilder.getListeners();return!o&&h&&h.zoom&&(i.listenerZoom=!0,o=h.zoom(e,t)),i.lastZoomTime=n,o},click:function(e,t){return i.lensDrag=!1,i.listenerDrag=!1,i.lensZoom=!1,i.listenerZoom=!1,!1}}}return a(e,[{key:"draw",value:function(){if(this.frontEvent&&this.backEvent){var e=this.bgCanvas.get2DContext();e.clearRect(0,0,this.width,this.height),e.drawImage(this.backEvent.canvas,this.backEvent.area[0],this.backEvent.area[1],this.backEvent.area[2],this.backEvent.area[3],0,0,this.width,this.height),e.save(),e.beginPath(),e.arc(this.lensCenterX,this.lensCenterY,this.lensRadius,0,2*Math.PI),e.clip(),e.clearRect(0,0,this.width,this.height),e.drawImage(this.frontEvent.canvas,this.frontEvent.area[0],this.frontEvent.area[1],this.frontEvent.area[2],this.frontEvent.area[3],0,0,this.width,this.height),e.restore(),e.beginPath(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lensColor,e.arc(this.lensCenterX,this.lensCenterY,this.lensRadius,0,2*Math.PI),e.closePath(),e.stroke();var t={canvas:this.bgCanvas.el,area:[0,0,this.width,this.height],outputSize:[this.width,this.height],builder:this,arguments:this.frontEvent.arguments};this.emit(p,t)}}},{key:"update",value:function(){this.frontImageBuilder.update(),this.backImageBuilder.update()}},{key:"render",value:function(){this.frontImageBuilder.render(),this.backImageBuilder.render()}},{key:"onImageReady",value:function(e){return this.on(p,e)}},{key:"onModelChange",value:function(e){return this.on(d,e)}},{key:"getListeners",value:function(){return this.listener}},{key:"destroy",value:function(){this.off(),this.listener=null,this.frontSubscription.unsubscribe(),this.frontSubscription=null,this.backSubscription.unsubscribe(),this.backSubscription=null,this.frontImageBuilder.destroy(),this.backImageBuilder.destroy()}},{key:"getActiveImageBuilder",value:function(){return this.frontActive?this.frontImageBuilder:this.backImageBuilder}},{key:"isFront",value:function(){return this.frontActive}},{key:"toggleLens",value:function(){this.frontActive=!this.frontActive,this.emit(d)}}]),e}();t["default"]=h,u["default"].mixInto(h)},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return function(n){return e.getColor(t)}}function o(e,t,n,r){return function(o){var a=t[n][r][o];return e.getColor(a)}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0?(n[4*u]=(h[0]*p+v[0])/_,n[4*u+1]=(h[1]*p+v[1])/_,n[4*u+2]=(h[2]*p+v[2])/_,n[4*u+3]=255*_):console.log("no alpha while skip should have worked",g[3])}}}),a.putImageData(this.imageBuffer,0,0);var l={canvas:this.bgCanvas.el,area:[0,0,this.width,this.height],outputSize:[this.width,this.height],builder:this.imageBuilder,arguments:this.queryDataModel.getQuery()};this.imageBuilder.imageReady(l)},o.prototype.destroy=function(){this.bgCanvas.destroy(),this.bgCanvas=null,this.queryDataModel=null,this.imageBuilder=null},o.prototype.getLightProperties=function(){return{}},o.prototype.setLightProperties=function(e){}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r,o){if(this.queryDataModel=e,this.imageBuilder=t,this.metadata=this.queryDataModel.originalData.SortedComposite,this.colorHelper=r,this.orderData=null,this.intensityData=null,this.numLayers=this.metadata.layers,this.reverseCompositePass=o,this.defaultIntensityData=new Uint8Array([255]),this.intensitySize=[1,1],this.hasIntensity=!1,this.hasNormal=!1,this.defaultLayerBufferView=new Float32Array([0]),this.layerBufferViewSize=[1,1],this.width=this.metadata.dimensions[0],this.height=this.metadata.dimensions[1],this.lightProperties={lightTerms:{ka:.1,kd:.6,ks:.3,alpha:20},lightPosition:{x:-1,y:1},lightColor:[.8,.8,.8]},this.glCanvas=new i["default"](this.width,this.height),this.gl=this.glCanvas.get3DContext(),!this.gl)return console.error("Unable to get WebGl context"),null;this.gl.clearColor(1,1,1,0);var a=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS),s=(a-2)/2;this.shaderLayers=s=c;++c){var f=this.colorHelper.getLayerLut(c),p=this.colorHelper.getLayerColorByName(c),d=this.metadata.ranges[p];if(this.colorHelper.getLayerVisible(c)){var h=this.colorHelper.getLayerFloatData(c);h?(i.push(h),a.push([this.width,this.height])):(i.push(new Float32Array([this.findLayerConstantValue(c)])),a.push([1,1])),s.push(d[0]),s.push(d[1])}else i.push(y),a.push([1,1]),s.push(-1),s.push(-1);l.push(this.colorHelper.getLayerAlpha(c)),this.sampleLookupTable(f,p,d,u++),n.push(o),r.push(o+this.shaderLayers),o+=1}var g=this.getAndUseCurrentColorProgram(),m=this.gl.getUniformLocation(g,"layerColorSampler");this.gl.uniform1iv(m,n);for(var v=0;v=this.numLayers){this.uploadLayerTextures(0,this.numLayers-1);var t=this.getAndUseCurrentColorProgram(),n=this.gl.getUniformLocation(t,"orderOffset");this.gl.uniform1i(n,0)}this.pingPong.clearFbo(),(0,s.loop)(!this.reverseCompositePass,this.numLayers,function(t){var n=e.extractLayerData(e.orderData,t,1),r=e.extractLayerData(e.intensityData,t,1);if(e.hasNormal&&(r=e.extractLayerData(e.normalData,t,3)),e.gl.bindFramebuffer(e.gl.FRAMEBUFFER,e.glResources.framebuffers.colorFbo),e.gl.clear(e.gl.COLOR_BUFFER_BIT),e.shaderLayers>=e.numLayers)e.drawColorPass(n,r);else for(var o=0;o=e.numLayers&&(a=e.numLayers-1),e.uploadLayerTextures(o,a);var i=e.getAndUseCurrentColorProgram(),s=e.gl.getUniformLocation(i,"orderOffset");e.gl.uniform1i(s,o),e.drawColorPass(n,r)}e.drawBlendPass()}),this.drawDisplayPass();var r={canvas:this.glCanvas.el,area:[0,0,this.width,this.height],outputSize:[this.width,this.height],builder:this.imageBuilder,arguments:this.queryDataModel.getQuery()};this.imageBuilder.imageReady(r)},o.prototype.findLayerConstantValue=function(e){for(var t=this.colorHelper.getLayerColorByName(e),n=this.metadata.pipeline[e].colorBy,r=0;ra;++a){var i=o(a,0,255,n[0],n[1]),s=e.getColor(i);this.lutData[r][4*a]=255*s[0],this.lutData[r][4*a+1]=255*s[1],this.lutData[r][4*a+2]=255*s[2],this.lutData[r][4*a+3]=255*s[3]}},o.prototype.drawBlendPass=function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.pingPong.getFramebuffer()),this.gl.useProgram(this.glResources.programs.blendProgram),this.gl.viewport(0,0,this.width,this.height);var e=this.gl.getUniformLocation(this.glResources.programs.blendProgram,"underLayerSampler");this.gl.uniform1i(e,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture());var t=this.gl.getUniformLocation(this.glResources.programs.blendProgram,"overLayerSampler");this.gl.uniform1i(t,1),this.gl.activeTexture(this.gl.TEXTURE0+1),this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.colorRenderTexture),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.pingPong.swap();for(var n=0;2>n;n+=1)this.gl.activeTexture(this.gl.TEXTURE0+n),this.gl.bindTexture(this.gl.TEXTURE_2D,null)},o.prototype.drawDisplayPass=function(){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this.gl.useProgram(this.glResources.programs.displayProgram),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.gl.viewport(0,0,this.width,this.height);var e=this.gl.getUniformLocation(this.glResources.programs.displayProgram,"u_image");this.gl.uniform1i(e,0),this.gl.activeTexture(this.gl.TEXTURE0+0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.pingPong.getRenderingTexture()),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish(),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.bindTexture(this.gl.TEXTURE_2D,null)},o.prototype.drawColorPass=function(e,t){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.glResources.framebuffers.colorFbo);var n=this.glResources.programs.colorProgram;this.hasNormal&&(n=this.glResources.programs.lightColorProgram),this.gl.useProgram(n),this.gl.viewport(0,0,this.width,this.height);var r=0,o=this.gl.getUniformLocation(n,"orderSampler");if(this.gl.uniform1i(o,r),this.gl.activeTexture(this.gl.TEXTURE0+r),r+=1,this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.orderTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,this.width,this.height,0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,e),this.hasNormal){var a=this.gl.getUniformLocation(n,"normalSampler");this.gl.uniform1i(a,r),this.gl.activeTexture(this.gl.TEXTURE0+r),r+=1,this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.intensityTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGB,this.width,this.height,0,this.gl.RGB,this.gl.UNSIGNED_BYTE,t);var i=this.lightProperties,s=i.lightTerms,l=i.lightPosition,u=i.lightColor,c=f["default"].fromValues(l.x,l.y,1,0),p=this.gl.getUniformLocation(n,"lightDir");this.gl.uniform4fv(p,c);var d=f["default"].fromValues(s.ka,s.kd,s.ks,s.alpha),h=this.gl.getUniformLocation(n,"lightTerms");this.gl.uniform4fv(h,d);var g=f["default"].fromValues(u[0],u[1],u[2],1),m=this.gl.getUniformLocation(n,"lightColor");this.gl.uniform4fv(m,g)}else{var a=this.gl.getUniformLocation(n,"intensitySampler");this.gl.uniform1i(a,r),this.gl.activeTexture(this.gl.TEXTURE0+r),r+=1,this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.intensityTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,this.intensitySize[0],this.intensitySize[1],0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,t)}this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish();for(var v=0;r>v;v+=1)this.gl.activeTexture(this.gl.TEXTURE0+v),this.gl.bindTexture(this.gl.TEXTURE_2D,null)},o.prototype.destroy=function(){this.queryDataModel=null,this.imageBuilder=null,this.glResources.destroy(),this.glResources=null,this.pingPong=null,this.glCanvas.destroy(),this.glCanvas=null},o.prototype.getLightProperties=function(){return this.lightProperties},o.prototype.setLightProperties=function(e){this.lightProperties=(0,u["default"])(this.lightProperties,e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0?i.metadata.light.indexOf("intensity")<0&&i.normalsModel.setState(!0):i.controlWidgets.splice(1,1),i.registerSubscription(i.queryDataModel.onDataChange(function(){i.update()})),i.registerSubscription(e.on(y,function(e,t){i.colorHelper.updateData(e),i.compositor.updateData(e),i.render()})),i.registerSubscription(i.pipelineModel.onChange(function(e,t){i.colorHelper.updatePipeline(e),i.update()})),i.colorHelper.updatePipeline(i.pipelineModel.getPipelineQuery()),i.registerSubscription(i.lookupTableManager.onChange(function(e,t){i.render()})),i.registerSubscription(i.pipelineModel.onOpacityChange(function(e,t){i.colorHelper.updateAlphas(e),i.render()})),i.pipelineModel.resetOpacity(100),i.registerObjectToFree(i.compositors[0]),i.registerObjectToFree(i.compositors[1]),i}return i(t,e),s(t,[{key:"update",value:function(){this.normalsModel.getState()?this.dataQuery.categories=["_","normal"].concat(this.colorHelper.getCategories()):this.intensityModel.getState()?this.dataQuery.categories=["_","intensity"].concat(this.colorHelper.getCategories()):this.dataQuery.categories=["_"].concat(this.colorHelper.getCategories()),this.queryDataModel.fetchData(this.dataQuery)}},{key:"render",value:function(){this.compositor.render()}},{key:"destroy",value:function(){l(Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.compositors=null,this.compositor=null}},{key:"getLightingEnabled",value:function(){return this.normalsModel.getState()}},{key:"setLightingEnabled",value:function(e){this.normalsModel.setState(e)}},{key:"getLightProperties",value:function(){return this.compositor.getLightProperties()}},{key:"setLightProperties",value:function(e){this.compositor.setLightProperties(e),this.render()}},{key:"getControlModels",value:function(){return{lookupTableManager:this.lookupTableManager,intensity:this.intensityModel,computation:this.computationModel,normal:this.normalsModel,queryDataModel:this.queryDataModel,light:this,dimensions:this.metadata.dimensions}}}]),t}(c["default"]);t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;na;)o[a]=this.fnOperation(this.data,a),o[a+1]=this.fnOperation(this.data,a+1),o[a+2]=this.fnOperation(this.data,a+2),o[a+3]=255,a+=4;this.bgCanvas.size(this.dataSize[0],this.dataSize[1]);var i=this.bgCanvas.get2DContext(),s=i.getImageData(0,0,this.dataSize[0],this.dataSize[1]);s.data.set(o),i.putImageData(s,0,0);var l={canvas:this.bgCanvas.el,area:[0,0].concat(this.dataSize),outputSize:this.dataSize,builder:this};this.imageReady(l)}}},{key:"getListeners",value:function(){return this.listeners}},{key:"setListeners",value:function(e){this.listeners=e}},{key:"destroy",value:function(){l(Object.getPrototypeOf(t.prototype),"destroy",this).call(this),this.bgCanvas=null,this.data=null,this.dataSize=null,this.dependency=null,this.listeners=null,this.operation=null}},{key:"getControlWidgets",value:function(){return[{name:"PixelOperatorControl",model:this}]}},{key:"getControlModels",value:function(){return{dimensions:this.dataSize}}}]),t}(c["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;nn;n+=1)this.gl.activeTexture(this.gl.TEXTURE0+n),this.gl.bindTexture(this.gl.TEXTURE_2D,null)},o.prototype.drawColorPass=function(e,t,n){this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.glResources.framebuffers.colorFbo),this.gl.useProgram(this.glResources.programs.colorProgram),this.gl.viewport(0,0,this.width,this.height);var r=this.gl.getUniformLocation(this.glResources.programs.colorProgram,"numberOfLayers");this.gl.uniform1f(r,this.numLayers);var o=0,a=this.gl.getUniformLocation(this.glResources.programs.colorProgram,"orderSampler");this.gl.uniform1i(a,o),this.gl.activeTexture(this.gl.TEXTURE0+o),o+=1,this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.orderTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,this.width,this.height,0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,e);var i=this.gl.getUniformLocation(this.glResources.programs.colorProgram,"alphaSampler");this.gl.uniform1i(i,o),this.gl.activeTexture(this.gl.TEXTURE0+o),o+=1,this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.alphaTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,this.width,this.height,0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,t);var s=this.gl.getUniformLocation(this.glResources.programs.colorProgram,"intensitySampler");this.gl.uniform1i(s,o),this.gl.activeTexture(this.gl.TEXTURE0+o),o+=1,this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.intensityTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,this.intensitySize[0],this.intensitySize[1],0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,n);var l=this.gl.getUniformLocation(this.glResources.programs.colorProgram,"lutSampler");this.gl.uniform1i(l,o),this.gl.activeTexture(this.gl.TEXTURE0+o),o+=1,this.gl.bindTexture(this.gl.TEXTURE_2D,this.glResources.textures.lutTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.numLayers,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,this.lutView),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.gl.finish();for(var u=0;o>u;u+=1)this.gl.activeTexture(this.gl.TEXTURE0+u),this.gl.bindTexture(this.gl.TEXTURE_2D,null)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(26),a=r(o),i=n(401),s=r(i),l=n(402),u=r(l),c=n(403),f=r(c),p=n(405),d=r(p),h=n(409),g=r(h),m=n(410),v=r(m),_=n(411),y=r(_),b=n(415),w=r(b),x=n(416),C=r(x),E=n(417),T=r(E),P=n(418),k=r(P);t["default"]={AbstractImageBuilder:a["default"],BinaryDataProberImageBuilder:s["default"],CompositeImageBuilder:u["default"],DataProberImageBuilder:f["default"],DepthCompositeImageBuilder:d["default"],DepthImageBuilder:g["default"],FloatDataImageBuilder:v["default"],MagicLensImageBuilder:y["default"],MultiColorBySortedCompositeImageBuilder:w["default"],PixelOperatorImageBuilder:C["default"],QueryDataModelImageBuilder:T["default"],SortedCompositeImageBuilder:k["default"]}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,r){function o(e){var t=p[e];return t=t>i?s>t?t:s:i,u+f-Math.floor((t-i)*m)}var a,i=Number.MAX_VALUE,s=Number.MIN_VALUE,l=t.x,u=t.y,c=t.width,f=t.height,p=n.data,d=p.length,h=new Uint16Array(d);for(a=d;a--;){var g=p[a];i=Math.min(i,g),s=Math.max(s,g),h[a]=l+Math.floor(c*(a/(d-1)))}r&&(i=r[0],s=r[1]);var m=f/(s-i);e.beginPath(),e.lineWidth=1,e.strokeStyle=n.color,e.moveTo(h[0],o(0));for(var v=1;d>v;v++)isNaN(p[v])?d>v+1&&!isNaN(p[v+1])&&e.moveTo(h[v+1],o(v+1)):e.lineTo(h[v],o(v));e.stroke()}function i(e,t,n,r){if(!(0>n||n>1)){var o=t.y,a=o+t.height,i=t.x+Math.floor(n*t.width);e.beginPath(),e.lineWidth=1,e.strokeStyle=r,e.moveTo(i,o),e.lineTo(i,a),e.stroke()}}function s(e,t,n,r,o){var a=arguments.length<=5||void 0===arguments[5]?"#000000":arguments[5];e.fillStyle=a,e.font="20px serif",e.textBaseline="top",e.fillText(o,t.x+n,t.y+r)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var i=_.call(o,"catchLoc"),s=_.call(o,"finallyLoc");if(i&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&_.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),P}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:g(e),resultName:t,nextLoc:n},P}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),n(77))},function(e,t,n){"use strict";var r=n(46),o=n(73),a=n(28);e.exports=[].copyWithin||function(e,t){var n=r(this),i=a(n.length),s=o(e,i),l=o(t,i),u=arguments,c=u.length>2?u[2]:void 0,f=Math.min((void 0===c?i:o(c,i))-l,i-s),p=1;for(s>l&&l+f>s&&(p=-1,l+=f-1,s+=f-1);f-- >0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},function(e,t,n){"use strict";var r=n(46),o=n(73),a=n(28);e.exports=[].fill||function(e){for(var t=r(this),n=a(t.length),i=arguments,s=i.length,l=o(s>1?i[1]:void 0,n),u=s>2?i[2]:void 0,c=void 0===u?n:o(u,n);c>l;)t[l++]=e;return t}},function(e,t,n){var r=n(12),o=n(123),a=n(14)("species");e.exports=function(e,t){var n;return o(e)&&(n=e.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)||(n=void 0),r(n)&&(n=n[a],null===n&&(n=void 0))),new(void 0===n?Array:n)(t)}},function(e,t,n){var r=n(8);e.exports=function(e){var t=r.getKeys(e),n=r.getSymbols;if(n)for(var o,a=n(e),i=r.isEnum,s=0;a.length>s;)i.call(e,o=a[s++])&&t.push(o);return t}},function(e,t,n){var r=n(8),o=n(34);e.exports=function(e,t){for(var n,a=o(e),i=r.getKeys(a),s=i.length,l=0;s>l;)if(a[n=i[l++]]===t)return n}},function(e,t,n){var r,o,a,i=n(16),s=n(224).set,l=i.MutationObserver||i.WebKitMutationObserver,u=i.process,c=i.Promise,f="process"==n(44)(u),p=function(){var e,t,n;for(f&&(e=u.domain)&&(u.domain=null,e.exit());r;)t=r.domain,n=r.fn,t&&t.enter(),n(),t&&t.exit(),r=r.next;o=void 0,e&&e.enter()};if(f)a=function(){u.nextTick(p)};else if(l){var d=1,h=document.createTextNode("");new l(p).observe(h,{characterData:!0}),a=function(){h.data=d=-d}}else a=c&&c.resolve?function(){c.resolve().then(p)}:function(){s.call(i,p)};e.exports=function(e){var t={fn:e,next:void 0,domain:f&&u.domain};o&&(o.next=t),r||(r=t,a()),o=t}},function(e,t,n){var r=n(8),o=n(46),a=n(92);e.exports=n(19)(function(){var e=Object.assign,t={},n={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=o})?function(e,t){for(var n=o(e),i=arguments,s=i.length,l=1,u=r.getKeys,c=r.getSymbols,f=r.isEnum;s>l;)for(var p,d=a(i[l++]),h=c?u(d).concat(c(d)):u(d),g=h.length,m=0;g>m;)f.call(d,p=h[m++])&&(n[p]=d[p]);return n}:Object.assign},function(e,t,n){"use strict";var r=n(435),o=n(91),a=n(57);e.exports=function(){for(var e=a(this),t=arguments.length,n=Array(t),i=0,s=r._,l=!1;t>i;)(n[i]=arguments[i++])===s&&(l=!0);return function(){var r,a=this,i=arguments,u=i.length,c=0,f=0;if(!l&&!u)return o(e,n,a);if(r=n.slice(),l)for(;t>c;c++)r[c]===s&&(r[c]=i[f++]);for(;u>f;)r.push(i[f++]);return o(e,r,a)}}},function(e,t,n){e.exports=n(16)},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){var r=n(13),o=n(57),a=n(14)("species");e.exports=function(e,t){var n,i=r(e).constructor;return void 0===i||void 0==(n=r(i)[a])?t:o(n)}},function(e,t,n){var r=n(12);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r,o=n(8),a=n(2),i=n(31),s=n(51),l=n(210),u=n(207),c=n(27),f=n(44),p=n(91),d=n(19),h=n(13),g=n(57),m=n(12),v=n(46),_=n(34),y=n(74),b=n(73),w=n(28),x=n(92),C=n(59)("__proto__"),E=n(87),T=n(203)(!1),P=Object.prototype,k=Array.prototype,M=k.slice,S=k.join,D=o.setDesc,R=o.getDesc,A=o.setDescs,I={};i||(r=!d(function(){return 7!=D(u("div"),"a",{get:function(){return 7}}).a}),o.setDesc=function(e,t,n){if(r)try{return D(e,t,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(h(e)[t]=n.value),e},o.getDesc=function(e,t){if(r)try{return R(e,t)}catch(n){}return c(e,t)?s(!P.propertyIsEnumerable.call(e,t),e[t]):void 0},o.setDescs=A=function(e,t){h(e);for(var n,r=o.getKeys(t),a=r.length,i=0;a>i;)o.setDesc(e,n=r[i++],t[n]);return e}),a(a.S+a.F*!i,"Object",{getOwnPropertyDescriptor:o.getDesc,defineProperty:o.setDesc,defineProperties:A});var O="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),N=O.concat("length","prototype"),F=O.length,L=function(){var e,t=u("iframe"),n=F,r=">";for(t.style.display="none",l.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("