{ "cells": [ { "cell_type": "code", "execution_count": 72, "metadata": { "ExecuteTime": { "end_time": "2016-11-25T17:08:03.683010", "start_time": "2016-11-25T17:08:03.648890" }, "collapsed": false }, "outputs": [], "source": [ "## Get some data\n", "import copy\n", "import pandas as pd\n", "from sklearn.model_selection import train_test_split\n", "from keras.utils import np_utils\n", "from sklearn import preprocessing\n", "import numpy\n", "\n", "## And guess what.. this has already been done with keras here..\n", "## http://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/\n", "\n", "irisDf = pd.read_csv('./data/Iris.csv')\n", "X = copy.deepcopy(irisDf)\n", "#X = dataset[:,0:4].astype(float)\n", "Y = irisDf['Species']\n", "X.drop('Species', 1, inplace=True)\n", "\n", "\n", "# encode class values as integers\n", "encoder = preprocessing.LabelEncoder()\n", "encoder.fit(Y)\n", "encoded_Y = encoder.transform(Y)\n", "# convert integers to dummy variables (i.e. one hot encoded)\n", "dummy_y = np_utils.to_categorical(encoded_Y)\n", "\n", "X_train, X_test, Y_train, Y_test = train_test_split(X, dummy_y)\n", "#Y_train = enc.transform(Y_train)\n", "#Y_test = enc.transform(Y_test)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Sequential model" ] }, { "cell_type": "code", "execution_count": 56, "metadata": { "ExecuteTime": { "end_time": "2016-11-25T16:02:02.021829", "start_time": "2016-11-25T16:02:01.946222" }, "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " Loading BokehJS ...\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(global) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = \"1\";\n", "\n", " if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force !== \"\") {\n", " window._bokeh_onload_callbacks = [];\n", " window._bokeh_is_loading = undefined;\n", " }\n", "\n", "\n", " \n", " if (typeof (window._bokeh_timeout) === \"undefined\" || force !== \"\") {\n", " window._bokeh_timeout = Date.now() + 5000;\n", " window._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"
\\n\"+\n", " \"

\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"

\\n\"+\n", " \"\\n\"+\n", " \"\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"\\n\"+\n", " \"
\"}};\n", "\n", " function display_loaded() {\n", " if (window.Bokeh !== undefined) {\n", " Bokeh.$(\"#d424f8c5-4c57-44c3-b387-714853af0d91\").text(\"BokehJS successfully loaded.\");\n", " } else if (Date.now() < window._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", " function run_callbacks() {\n", " window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", " delete window._bokeh_onload_callbacks\n", " console.info(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(js_urls, callback) {\n", " window._bokeh_onload_callbacks.push(callback);\n", " if (window._bokeh_is_loading > 0) {\n", " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", " return null;\n", " }\n", " if (js_urls == null || js_urls.length === 0) {\n", " run_callbacks();\n", " return null;\n", " }\n", " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", " window._bokeh_is_loading = js_urls.length;\n", " for (var i = 0; i < js_urls.length; i++) {\n", " var url = js_urls[i];\n", " var s = document.createElement('script');\n", " s.src = url;\n", " s.async = false;\n", " s.onreadystatechange = s.onload = function() {\n", " window._bokeh_is_loading--;\n", " if (window._bokeh_is_loading === 0) {\n", " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", " run_callbacks()\n", " }\n", " };\n", " s.onerror = function() {\n", " console.warn(\"failed to load library \" + url);\n", " };\n", " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", " }\n", " };var element = document.getElementById(\"d424f8c5-4c57-44c3-b387-714853af0d91\");\n", " if (element == null) {\n", " console.log(\"Bokeh: ERROR: autoload.js configured with elementid 'd424f8c5-4c57-44c3-b387-714853af0d91' but no matching script tag was found. \")\n", " return false;\n", " }\n", "\n", " var js_urls = [];\n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " /* BEGIN bokeh.min.js */\n", " window.Bokeh=Bokeh=function(){var t=void 0;return function e(t,r,n){function o(i){if(!r[i]){if(!t[i]){var s=new Error(\"Cannot find module '\"+i+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var a=r[i]={exports:{}},l=function(e){var r=t[i][1][e];return o(r?r:e)};l.modules=o.modules,t[i][0].call(a.exports,l,a,a.exports,e,t,r,n)}return r[i].exports}o.modules=t;for(var i=null,s=0;s0&&(f.debug(\"Sending \"+n.events.length+\" changes from model construction back to server\"),i=u.create(\"PATCH-DOC\",{},n),t.send(i)),t.session=new o(t,r,t.id),f.debug(\"Created a new session from new pulled doc\"),null!=t._on_have_session_hook?(t._on_have_session_hook(t.session),t._on_have_session_hook=null):void 0)}}(this),function(t){throw t})[\"catch\"](function(t){return null!=console.trace&&console.trace(t),f.error(\"Failed to repull session \"+t)})},t.prototype._on_open=function(t,e){return f.info(\"Websocket connection \"+this._number+\" is now open\"),this._pending_ack=[t,e],this._current_handler=function(t){return function(e){return t._awaiting_ack_handler(e)}}(this)},t.prototype._on_message=function(t){var e;try{return this._on_message_unchecked(t)}catch(r){return e=r,f.error(\"Error handling message: \"+e+\", \"+t)}},t.prototype._on_message_unchecked=function(t){var e,r;if(null==this._current_handler&&f.error(\"got a message but haven't set _current_handler\"),t.data instanceof ArrayBuffer?null==this._partial||this._partial.complete()?this._close_bad_protocol(\"Got binary from websocket but we were expecting text\"):this._partial.add_buffer(t.data):null!=this._partial?this._close_bad_protocol(\"Got text from websocket but we were expecting binary\"):(this._fragments.push(t.data),3===this._fragments.length&&(this._partial=u.assemble(this._fragments[0],this._fragments[1],this._fragments[2]),this._fragments=[],r=this._partial.problem(),null!==r&&this._close_bad_protocol(r))),null!=this._partial&&this._partial.complete())return e=this._partial,this._partial=null,this._current_handler(e)},t.prototype._on_close=function(t){var e,r;for(f.info(\"Lost websocket \"+this._number+\" connection, \"+t.code+\" (\"+t.reason+\")\"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error(\"Lost websocket connection, \"+t.code+\" (\"+t.reason+\")\")),this._pending_ack=null),e=function(){var t,e,r;e=this._pending_replies;for(r in e)return t=e[r],delete this._pending_replies[r],t;return null},r=e();null!==r;)r[1](\"Disconnected\"),r=e();if(!this.closed_permanently)return this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){return f.debug(\"Websocket error on socket \"+this._number),t(new Error(\"Could not open websocket\"))},t.prototype._close_bad_protocol=function(t){if(f.error(\"Closing connection: \"+t),null!=this.socket)return this.socket.close(1002,t)},t.prototype._awaiting_ack_handler=function(t){return\"ACK\"!==t.msgtype()?this._close_bad_protocol(\"First message was not an ACK\"):(this._current_handler=function(t){return function(e){return t._steady_state_handler(e)}}(this),this._repull_session_doc(),null!=this._pending_ack?(this._pending_ack[0](this),this._pending_ack=null):void 0)},t.prototype._steady_state_handler=function(t){var e;return t.reqid()in this._pending_replies?(e=this._pending_replies[t.reqid()],delete this._pending_replies[t.reqid()],e[0](t)):t.msgtype()in m?m[t.msgtype()](this,t):f.debug(\"Doing nothing with message \"+t.msgtype())},t}(),o=function(){function t(t,e,r){this._connection=t,this.document=e,this.id=r,this._current_patch=null,this.document_listener=function(t){return function(e){return t._document_changed(e)}}(this),this.document.on_change(this.document_listener)}return t.prototype.close=function(){return this._connection.close()},t.prototype._connection_closed=function(){return this.document.remove_on_change(this.document_listener)},t.prototype.request_server_info=function(){var t,e;return t=u.create(\"SERVER-INFO-REQ\",{}),e=this._connection.send_with_reply(t),e.then(function(t){return t.content})},t.prototype.force_roundtrip=function(){return this.request_server_info().then(function(t){})},t.prototype._should_suppress_on_change=function(t,e){var r,n,o,i,s,a,u,p,f,m,g,y,v,b;if(e instanceof c){for(g=t.content.events,n=0,a=g.length;na;o=0<=a?++s:--s)u=r[o],p=n[o],ci&&(r=[i,o],o=r[0],i=r[1]),s>a&&(n=[a,s],s=n[0],a=n[1]),{minX:o,minY:s,maxX:i,maxY:a}},p=function(t){return t*t},s=function(t,e,r,n){return p(t-r)+p(e-n)},l=function(t,e,r){var n,o;return n=s(e.x,e.y,r.x,r.y),0===n?s(t.x,t.y,e.x,e.y):(o=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n,o<0?s(t.x,t.y,e.x,e.y):o>1?s(t.x,t.y,r.x,r.y):s(t.x,t.y,e.x+o*(r.x-e.x),e.y+o*(r.y-e.y)))},a=function(t,e,r){return Math.sqrt(l(t,e,r))},o=function(t,e,r,n,o,i,s,a){var l,u,c,p,h,_,d;return c=(a-i)*(r-t)-(s-o)*(n-e),0===c?{hit:!1,x:null,y:null}:(l=e-i,u=t-o,p=(s-o)*l-(a-i)*u,h=(r-t)*l-(n-e)*u,l=p/c,u=h/c,_=t+l*(r-t),d=e+l*(n-e),{hit:l>0&&l<1&&u>0&&u<1,x:_,y:d})},e.exports={point_in_poly:c,HitTestResult:n,create_hit_test_result:i,dist_2_pts:s,dist_to_segment:a,check_2_segments_intersect:o,validate_bbox_coords:h}},{}],\"core/layout/layout_canvas\":[function(t,e,r){var n,o,i,s,a,l,u,c,p,h=function(t,e){function r(){this.constructor=t}for(var n in e)_.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},_={}.hasOwnProperty;u=t(\"underscore\"),p=t(\"./solver\"),l=p.Variable,n=p.EQ,o=p.GE,a=p.Strength,s=t(\"../../model\"),c=t(\"../properties\"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type=\"LayoutCanvas\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._top=new l(\"top \"+this.id),this._left=new l(\"left \"+this.id),this._width=new l(\"width \"+this.id),this._height=new l(\"height \"+this.id),this._right=new l(\"right \"+this.id),this._bottom=new l(\"bottom \"+this.id)},e.getters({height:function(){return this._height.value()},width:function(){return this._width.value()},right:function(){return this._right.value()},left:function(){return this._left.value()},top:function(){return this._top.value()},bottom:function(){return this._bottom.value()}}),e.internal({layout_location:[c.Any]}),e.prototype.get_edit_variables=function(){var t;return t=[],t.push({edit_variable:this._top,strength:a.strong}),t.push({edit_variable:this._left,strength:a.strong}),t.push({edit_variable:this._width,strength:a.strong}),t.push({edit_variable:this._height,strength:a.strong}),t},e.prototype.get_constraints=function(){return[]},e}(s),e.exports={Model:i}},{\"../../model\":\"model\",\"../properties\":\"core/properties\",\"./solver\":\"core/layout/solver\",underscore:\"underscore\"}],\"core/layout/side_panel\":[function(t,e,r){var n,o,i,s,a,l,u,c,p,h,_,d,f,m,g,y,v,b,x,w,k,M,T,S=function(t,e){function r(){this.constructor=t}for(var n in e)z.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},z={}.hasOwnProperty;f=t(\"underscore\"),M=t(\"./solver\"),s=M.EQ,a=M.GE,c=t(\"./layout_canvas\"),w=t(\"../../core/properties\"),x=t(\"../../core/logging\").logger,k=Math.PI/2,n=\"alphabetic\",d=\"top\",o=\"bottom\",p=\"middle\",l=\"hanging\",u=\"left\",h=\"right\",i=\"center\",v={above:{parallel:0,normal:-k,horizontal:0,vertical:-k},below:{parallel:0,normal:k,horizontal:0,vertical:k},left:{parallel:-k,normal:0,horizontal:0,vertical:-k},right:{parallel:k,normal:0,horizontal:0,vertical:k}},b={above:{justified:d,parallel:n,normal:p,horizontal:n,vertical:p},below:{justified:o,parallel:l,normal:p,horizontal:l,vertical:p},left:{justified:d,parallel:n,normal:p,horizontal:p,vertical:n},right:{justified:d,parallel:n,normal:p,horizontal:p,vertical:n}},m={above:{justified:i,parallel:i,normal:u,horizontal:i,vertical:u},below:{justified:i,parallel:i,normal:u,horizontal:i,vertical:h},left:{justified:i,parallel:i,normal:h,horizontal:h,vertical:i},right:{justified:i,parallel:i,normal:u,horizontal:u,vertical:i}},g={above:h,below:u,left:h,right:u},y={above:u,below:h,left:h,right:u},T=function(t){var e,r,n,o;if(o=t,(null==o.model.props.visible||o.model.visible!==!1)&&(n=o._get_size(),null==o._last_size&&(o._last_size=-1),n!==o._last_size))return e=o.model.document.solver(),o._last_size=n,null!=o._size_constraint&&e.remove_constraint(o._size_constraint),o._size_constraint=a(o.model.panel._size,-n),e.add_constraint(o._size_constraint),null==o._full_set&&(o._full_set=!1),o._full_set?void 0:(r=o.model.panel.side,\"above\"!==r&&\"below\"!==r||e.add_constraint(s(o.model.panel._width,[-1,o.plot_model.canvas._width])),\"left\"!==r&&\"right\"!==r||e.add_constraint(s(o.model.panel._height,[-1,o.plot_model.canvas._height])),o._full_set=!0)},_=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return S(e,t),e.internal({side:[w.String],plot:[w.Instance]}),e.prototype.initialize=function(t,r){switch(e.__super__.initialize.call(this,t,r),this.side){case\"above\":return this._dim=0,this._normals=[0,-1],this._size=this._height,this._anchor=this._bottom;case\"below\":return this._dim=0,this._normals=[0,1],this._size=this._height,this._anchor=this._top;case\"left\":return this._dim=1,this._normals=[-1,0],this._size=this._width,this._anchor=this._right;case\"right\":return this._dim=1,this._normals=[1,0],this._size=this._width,this._anchor=this._left;default:return x.error(\"unrecognized side: '\"+this.side+\"'\")}},e.prototype.get_constraints=function(){var t;return t=[],t.push(a(this._top)),t.push(a(this._bottom)),t.push(a(this._left)),t.push(a(this._right)),t.push(a(this._width)),t.push(a(this._height)),t.push(s(this._left,this._width,[-1,this._right])),t.push(s(this._bottom,this._height,[-1,this._top])),t},e.prototype.apply_label_text_heuristics=function(t,e){var r,n,o;return o=this.side,f.isString(e)?(n=b[o][e],r=m[o][e]):0===e?(n=b[o][e],r=m[o][e]):e<0?(n=\"middle\",r=g[o]):e>0&&(n=\"middle\",r=y[o]),t.textBaseline=n,t.textAlign=r,t},e.prototype.get_label_angle_heuristic=function(t){var e;return e=this.side,v[e][t]},e}(c.Model),e.exports={Model:_,update_constraints:T}},{\"../../core/logging\":\"core/logging\",\"../../core/properties\":\"core/properties\",\"./layout_canvas\":\"core/layout/layout_canvas\",\"./solver\":\"core/layout/solver\",underscore:\"underscore\"}],\"core/layout/solver\":[function(t,e,r){var n,o,i,s,a,l,u,c,p,h,_;c=t(\"underscore\"),_=t(\"kiwi\"),o=t(\"../events\").Events,u=_.Variable,i=_.Expression,n=_.Constraint,s=_.Operator,l=_.Strength,p=function(t){return function(e){return function(){var e;return e=Object.create(i.prototype),i.apply(e,arguments),new n(e,t)}}(this)},h=function(t){return function(){var e,r,o,s;for(r=[null],o=0,s=arguments.length;o0)return n=s[e],null==n&&(n=s[e]=new t(e,r)),n;throw new TypeError(\"Logger.get() expects a string name and an optional log-level\")},Object.defineProperty(t.prototype,\"level\",{get:function(){return this.get_level()}}),t.prototype.get_level=function(){return this._log_level},t.prototype.set_level=function(e){var r,o,s,l,c;if(e instanceof n)this._log_level=e;else{if(!i.isString(e)||null==t.log_levels[e])throw new Error(\"Logger.set_level() expects a log-level object or a string name of a log-level\");this._log_level=t.log_levels[e]}o=\"[\"+this._name+\"]\",l=t.log_levels,c=[];for(r in l){if(e=l[r],e===t.OFF)break;s=e.name,e.levele;r=0<=e?++t:--t)o.push(i);return o}();return null!=this.spec.transform&&(o=this.spec.transform.v_compute(o)),o},t.prototype._init=function(t){var e,r,n,o;if(null==t&&(t=!0),o=this.obj,null==o)throw new Error(\"missing property object\");if(null==o.properties)throw new Error(\"property object must be a HasProps\");if(e=this.attr,null==e)throw new Error(\"missing property attr\");if(r=o.getv(e),V.isUndefined(r)&&(n=this.default_value,r=function(){switch(!1){case!V.isUndefined(n):return null;case!V.isArray(n):return V.clone(n);case!V.isFunction(n):return n(o);default:return n}}(),o.setv(e,r,{silent:!0,defaults:!0})),V.isArray(r)?this.spec={value:r}:V.isObject(r)&&1===V.size(V.pick.apply(null,[r].concat(this.specifiers)))?this.spec=r:this.spec={value:r},null!=this.spec.field&&!V.isString(this.spec.field))throw new Error(\"field value for property '\"+e+\"' is not a string\");if(null!=this.spec.value&&this.validate(this.spec.value),this.init(),t)return this.trigger(\"change\")},t}(),Y=function(t,e){var r;return r=function(r){function n(){return n.__super__.constructor.apply(this,arguments)}return W(n,r),n.prototype.toString=function(){return t+\"(obj: \"+this.obj.id+\", spec: \"+JSON.stringify(this.spec)+\")\"},n.prototype.validate=function(r){if(!e(r))throw new Error(t+\" property '\"+this.attr+\"' given invalid value: \"+r)},n}(P)},a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"Any\",function(t){return!0})),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"Array\",function(t){return V.isArray(t)||t instanceof Float64Array})),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"Bool\",V.isBoolean)),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"Color\",function(t){return null!=H[t.toLowerCase()]||\"#\"===t.substring(0,1)||$(t)})),k=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"Instance\",function(t){return null!=t.properties})),E=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"Number\",function(t){return V.isNumber(t)||V.isBoolean(t)})),j=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"Number\",function(t){return(V.isNumber(t)||V.isBoolean(t))&&0<=t&&t<=1})),q=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(Y(\"String\",V.isString)),b=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(q),G=function(t,e){var r;return r=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return W(r,e),r.prototype.toString=function(){return t+\"(obj: \"+this.obj.id+\", spec: \"+JSON.stringify(this.spec)+\")\"},r}(Y(t,function(t){return K.call(e,t)>=0}))},n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"Anchor\",U.LegendLocation)),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"AngleUnits\",U.AngleUnits)),d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e.prototype.transform=function(t){var e,r,n,o;for(o=new Uint8Array(t.length),e=r=0,n=t.length;0<=n?rn;e=0<=n?++r:--r)switch(t[e]){case\"clock\":o[e]=!1;break;case\"anticlock\":o[e]=!0}return o},e}(G(\"Direction\",U.Direction)),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"Dimension\",U.Dimension)),_=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"Dimensions\",U.Dimensions)),w=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"FontStyle\",U.FontStyle)),T=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"LineCap\",U.LineCap)),S=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"LineJoin\",U.LineJoin)),M=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"LegendLocation\",U.LegendLocation)),z=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"Location\",U.Location)),C=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"Orientation\",U.Orientation)),R=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"TextAlign\",U.TextAlign)),L=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"TextBaseline\",U.TextBaseline)),N=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"RenderLevel\",U.RenderLevel)),O=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"RenderMode\",U.RenderMode)),D=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"SizingMode\",U.SizingMode)),F=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"SpatialUnits\",U.SpatialUnits)),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"Distribution\",U.DistributionTypes)),B=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e}(G(\"TransformStepMode\",U.TransformStepModes)),X=function(t,e,r){var n;return n=function(n){function o(){return o.__super__.constructor.apply(this,arguments)}return W(o,n),o.prototype.toString=function(){return t+\"(obj: \"+this.obj.id+\", spec: \"+JSON.stringify(this.spec)+\")\"},o.prototype.init=function(){var n;if(null==this.spec.units&&(this.spec.units=r),this.units=this.spec.units,n=this.spec.units,K.call(e,n)<0)throw new Error(t+\" units must be one of \"+e+\", given invalid value: \"+n)},o}(E)},o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return W(e,t),e.prototype.transform=function(t){var r;return\"deg\"===this.spec.units&&(t=function(){var e,n,o;for(o=[],e=0,n=t.length;e0)&&\"pinch\"===e?(l.debug(\"Registering scroll on touch screen\"),t.listenTo(this,\"scroll:\"+r,t._scroll)):void 0)},t.prototype._trigger=function(t,e){var r,n,o;if(n=t.split(\":\")[0],(\"ontouchstart\"in window||navigator.maxTouchPoints>0)&&\"scroll\"===t&&(n=\"pinch\"),o=this.toolbar.gestures,r=o[n].active,null!=r)return this._trigger_event(t,r,e)},t.prototype._trigger_event=function(t,e,r){if(e.active===!0)return\"scroll\"===t&&(r.preventDefault(),r.stopPropagation()),this.trigger(t+\":\"+e.id,r)},t.prototype._bokify_hammer=function(t){var e,r,o,i,s,a,l;return\"mouse\"===t.pointerType?(a=t.srcEvent.pageX,l=t.srcEvent.pageY):(a=t.pointers[0].pageX,l=t.pointers[0].pageY),r=n(t.target).offset(),e=null!=(o=r.left)?o:0,s=null!=(i=r.top)?i:0,t.bokeh={sx:a-e,sy:l-s}},t.prototype._bokify_jq=function(t){var e,r,o,i,s;return r=n(t.currentTarget).offset(),e=null!=(o=r.left)?o:0,s=null!=(i=r.top)?i:0,t.bokeh={sx:t.pageX-e,sy:t.pageY-s}},t.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger(\"tap\",t)},t.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger(\"doubletap\",t)},t.prototype._press=function(t){return this._bokify_hammer(t),this._trigger(\"press\",t)},t.prototype._pan_start=function(t){return this._bokify_hammer(t),t.bokeh.sx-=t.deltaX,t.bokeh.sy-=t.deltaY,this._trigger(\"pan:start\",t)},t.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger(\"pan\",t)},t.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger(\"pan:end\",t)},t.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger(\"pinch:start\",t)},t.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger(\"pinch\",t)},t.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger(\"pinch:end\",t)},t.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger(\"rotate:start\",t)},t.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger(\"rotate\",t)},t.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger(\"rotate:end\",t)},t.prototype._mouse_enter=function(t){return this._bokify_jq(t),this.trigger(\"move:enter\",t)},t.prototype._mouse_move=function(t){return this._bokify_jq(t),this.trigger(\"move\",t)},t.prototype._mouse_exit=function(t){return this._bokify_jq(t),this.trigger(\"move:exit\",t)},t.prototype._mouse_wheel=function(t,e){return this._bokify_jq(t),t.bokeh.delta=e,this._trigger(\"scroll\",t)},t.prototype._key_down=function(t){return this.trigger(\"keydown\",t)},t.prototype._key_up=function(t){return this.trigger(\"keyup\",t)},t}(),e.exports={UIEvents:s}},{\"./events\":\"core/events\",\"./logging\":\"core/logging\",hammerjs:\"hammerjs\",jquery:\"jquery\",\"jquery-mousewheel\":\"jquery-mousewheel\",underscore:\"underscore\"}],\"core/util/bbox\":[function(t,e,r){var n,o;n=function(){return{minX:Infinity,minY:Infinity,maxX:-Infinity,maxY:-Infinity}},o=function(t,e){var r;return r={},r.minX=Math.min(t.minX,e.minX),r.maxX=Math.max(t.maxX,e.maxX),r.minY=Math.min(t.minY,e.minY),r.maxY=Math.max(t.maxY,e.maxY),r},e.exports={empty:n,union:o}},{}],\"core/util/canvas\":[function(t,e,r){var n,o,i,s,a,l;i=function(t){if(t.setLineDash||(t.setLineDash=function(e){return t.mozDash=e,t.webkitLineDash=e}),!t.getLineDash)return t.getLineDash=function(){return t.mozDash}},s=function(t){return t.setLineDashOffset=function(e){return t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}},o=function(t){return t.setImageSmoothingEnabled=function(e){return t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e;return null==(e=t.imageSmoothingEnabled)||e}},a=function(t){if(t.measureText&&null==t.html5MeasureText)return t.html5MeasureText=t.measureText,t.measureText=function(e){var r;return r=t.html5MeasureText(e),r.ascent=1.6*t.html5MeasureText(\"m\").width,r}},l=function(t,e){var r,n;return e?(n=window.devicePixelRatio||1,r=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,n/r):1},n=function(t){var e;if(e=function(e,r,n,o,i,s,a,l){var u,c,p;null==l&&(l=!1),u=.551784,t.translate(e,r),t.rotate(i),c=n,p=o,l&&(c=-n,p=-o),t.moveTo(-c,0),t.bezierCurveTo(-c,p*u,-c*u,p,0,p),t.bezierCurveTo(c*u,p,c,p*u,c,0),t.bezierCurveTo(c,-p*u,c*u,-p,0,-p),t.bezierCurveTo(-c*u,-p,-c,-p*u,-c,0),t.rotate(-i),t.translate(-e,-r)},!t.ellipse)return t.ellipse=e},e.exports={fixup_image_smoothing:o,fixup_line_dash:i,fixup_line_dash_offset:s,fixup_measure_text:a,get_scale_ratio:l,fixup_ellipse:n}},{}],\"core/util/color\":[function(t,e,r){var n,o,i,s,a,l=[].indexOf||function(t){for(var e=0,r=this.length;e=0)throw new Error(\"color expects rgb to have value between 0 and 255\");return!0},e.exports={color2hex:o,color2rgba:i,valid_rgb:a}},{\"./svg_colors\":\"core/util/svg_colors\"}],\"core/util/data_structures\":[function(t,e,r){var n,o,i;i=t(\"underscore\"),n=function(){function t(){this._dict={}}return t.prototype._existing=function(t){return t in this._dict?this._dict[t]:null},t.prototype.add_value=function(t,e){var r;if(null===e)throw new Error(\"Can't put null in this dict\");if(i.isArray(e))throw new Error(\"Can't put arrays in this dict\");return r=this._existing(t),null===r?this._dict[t]=e:i.isArray(r)?r.push(e):this._dict[t]=[r,e]},t.prototype.remove_value=function(t,e){var r,n;return r=this._existing(t),i.isArray(r)?(n=i.without(r,e),n.length>0?this._dict[t]=n:delete this._dict[t]):i.isEqual(r,e)?delete this._dict[t]:void 0},t.prototype.get_one=function(t,e){var r;if(r=this._existing(t),i.isArray(r)){if(1===r.length)return r[0];throw new Error(e)}return r},t}(),o=function(){function t(e){if(e){if(e.constructor===t)return new t(e.values);e.constructor===Array?this.values=t.compact(e):this.values=[e]}else this.values=[]}return t.compact=function(t){var e,r,n,o;for(o=[],r=0,n=t.length;rr&&(r=n);return r},i=function(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t},o=function(t,e){return Math.abs(i(t-e))},n=function(t,e,r,n){var s;return t=i(t),s=o(e,r),\"anticlock\"===n?o(e,t)<=s&&o(t,r)<=s:!(o(e,t)<=s&&o(t,r)<=s)},u=function(){return Math.random()},l=function(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])},c=function(t,e){var r,n,o;for(r=null,n=null;;)if(r=u(),n=u(),n=(2*n-1)*Math.sqrt(2*(1/Math.E)),-4*r*r*Math.log(r)>=n*n)break;return o=n/r,o=t+e*o},e.exports={array_min:a,array_max:s,angle_norm:i,angle_dist:o,angle_between:n,atan2:l,rnorm:c,random:u}},{}],\"core/util/proj4\":[function(t,e,r){var n;e.exports=n=t(\"proj4/lib/core\"),n.defaultDatum=\"WGS84\",n.Proj=t(\"proj4/lib/Proj\"),n.WGS84=new n.Proj(\"WGS84\"),n.toPoint=t(\"proj4/lib/common/toPoint\"),n.defs=t(\"proj4/lib/defs\"),n.transform=t(\"proj4/lib/transform\")},{\"proj4/lib/Proj\":\"proj4/lib/Proj\",\"proj4/lib/common/toPoint\":\"proj4/lib/common/toPoint\",\"proj4/lib/core\":\"proj4/lib/core\",\"proj4/lib/defs\":\"proj4/lib/defs\",\"proj4/lib/transform\":\"proj4/lib/transform\"}],\"core/util/projections\":[function(t,e,r){var n,o,i,s;n=t(\"./proj4\"),s=n.defs(\"GOOGLE\"),i=function(t,e){var r,o,i,a,l,u,c,p;for(a=[],u=[],r=o=0,c=t.length;0<=c?oc;r=0<=c?++o:--o)p=n(s,[t[r],e[r]]),i=p[0],l=p[1],a[r]=i,u[r]=l;return[a,u]},o=function(t,e){var r,n,o,s,a,l,u,c;for(s=[],l=[],r=n=0,u=t.length;0<=u?nu;r=0<=u?++n:--n)c=i(t[r],e[r]),o=c[0],a=c[1],s[r]=o,l[r]=a;return[s,l]},e.exports={project_xy:i,project_xsys:o}},{\"./proj4\":\"core/util/proj4\"}],\"core/util/refs\":[function(t,e,r){var n,o,i,s,a;o=t(\"underscore\"),n=t(\"../has_props\"),s=function(t){var e;if(!(t instanceof n.constructor))throw new Error(\"can only create refs for HasProps subclasses\");return e={type:t.type,id:t.id},null!=t._subtype&&(e.subtype=t._subtype),e},a=function(t){var e;if(o.isObject(t)){if(e=o.keys(t).sort(),2===e.length)return\"id\"===e[0]&&\"type\"===e[1];if(3===e.length)return\"id\"===e[0]&&\"subtype\"===e[1]&&\"type\"===e[2]}return!1},i=function(t){return o.isArray(t)?o.map(t,i):t instanceof n.constructor?t.ref():void 0},e.exports={convert_to_ref:i,create_ref:s,is_ref:a}},{\"../has_props\":\"core/has_props\",underscore:\"underscore\"}],\"core/util/selection\":[function(t,e,r){var n;n=function(t){var e;return e=t.selected,e[\"0d\"].glyph?e[\"0d\"].indices:e[\"1d\"].indices.length>0?e[\"1d\"].indices:e[\"2d\"].indices.length>0?e[\"2d\"].indices:[]},e.exports={get_indices:n}},{}],\"core/util/svg_colors\":[function(t,e,r){e.exports={indianred:\"#CD5C5C\",lightcoral:\"#F08080\",salmon:\"#FA8072\",darksalmon:\"#E9967A\",lightsalmon:\"#FFA07A\",crimson:\"#DC143C\",red:\"#FF0000\",firebrick:\"#B22222\",darkred:\"#8B0000\",pink:\"#FFC0CB\",lightpink:\"#FFB6C1\",hotpink:\"#FF69B4\",deeppink:\"#FF1493\",mediumvioletred:\"#C71585\",palevioletred:\"#DB7093\",coral:\"#FF7F50\",tomato:\"#FF6347\",orangered:\"#FF4500\",darkorange:\"#FF8C00\",orange:\"#FFA500\",gold:\"#FFD700\",yellow:\"#FFFF00\",lightyellow:\"#FFFFE0\",lemonchiffon:\"#FFFACD\",lightgoldenrodyellow:\"#FAFAD2\",papayawhip:\"#FFEFD5\",moccasin:\"#FFE4B5\",peachpuff:\"#FFDAB9\",palegoldenrod:\"#EEE8AA\",khaki:\"#F0E68C\",darkkhaki:\"#BDB76B\",lavender:\"#E6E6FA\",thistle:\"#D8BFD8\",plum:\"#DDA0DD\",violet:\"#EE82EE\",orchid:\"#DA70D6\",fuchsia:\"#FF00FF\",magenta:\"#FF00FF\",mediumorchid:\"#BA55D3\",mediumpurple:\"#9370DB\",blueviolet:\"#8A2BE2\",darkviolet:\"#9400D3\",darkorchid:\"#9932CC\",darkmagenta:\"#8B008B\",purple:\"#800080\",indigo:\"#4B0082\",slateblue:\"#6A5ACD\",darkslateblue:\"#483D8B\",mediumslateblue:\"#7B68EE\",greenyellow:\"#ADFF2F\",chartreuse:\"#7FFF00\",lawngreen:\"#7CFC00\",lime:\"#00FF00\",limegreen:\"#32CD32\",palegreen:\"#98FB98\",lightgreen:\"#90EE90\",mediumspringgreen:\"#00FA9A\",springgreen:\"#00FF7F\",mediumseagreen:\"#3CB371\",seagreen:\"#2E8B57\",forestgreen:\"#228B22\",green:\"#008000\",darkgreen:\"#006400\",yellowgreen:\"#9ACD32\",olivedrab:\"#6B8E23\",olive:\"#808000\",darkolivegreen:\"#556B2F\",mediumaquamarine:\"#66CDAA\",darkseagreen:\"#8FBC8F\",lightseagreen:\"#20B2AA\",darkcyan:\"#008B8B\",teal:\"#008080\",aqua:\"#00FFFF\",cyan:\"#00FFFF\",lightcyan:\"#E0FFFF\",paleturquoise:\"#AFEEEE\",aquamarine:\"#7FFFD4\",turquoise:\"#40E0D0\",mediumturquoise:\"#48D1CC\",darkturquoise:\"#00CED1\",cadetblue:\"#5F9EA0\",steelblue:\"#4682B4\",lightsteelblue:\"#B0C4DE\",powderblue:\"#B0E0E6\",lightblue:\"#ADD8E6\",skyblue:\"#87CEEB\",lightskyblue:\"#87CEFA\",deepskyblue:\"#00BFFF\",dodgerblue:\"#1E90FF\",cornflowerblue:\"#6495ED\",royalblue:\"#4169E1\",blue:\"#0000FF\",mediumblue:\"#0000CD\",darkblue:\"#00008B\",navy:\"#000080\",midnightblue:\"#191970\",cornsilk:\"#FFF8DC\",blanchedalmond:\"#FFEBCD\",bisque:\"#FFE4C4\",navajowhite:\"#FFDEAD\",wheat:\"#F5DEB3\",burlywood:\"#DEB887\",tan:\"#D2B48C\",rosybrown:\"#BC8F8F\",sandybrown:\"#F4A460\",goldenrod:\"#DAA520\",darkgoldenrod:\"#B8860B\",peru:\"#CD853F\",chocolate:\"#D2691E\",saddlebrown:\"#8B4513\",sienna:\"#A0522D\",brown:\"#A52A2A\",maroon:\"#800000\",white:\"#FFFFFF\",snow:\"#FFFAFA\",honeydew:\"#F0FFF0\",mintcream:\"#F5FFFA\",azure:\"#F0FFFF\",aliceblue:\"#F0F8FF\",ghostwhite:\"#F8F8FF\",whitesmoke:\"#F5F5F5\",seashell:\"#FFF5EE\",beige:\"#F5F5DC\",oldlace:\"#FDF5E6\",floralwhite:\"#FFFAF0\",ivory:\"#FFFFF0\",antiquewhite:\"#FAEBD7\",linen:\"#FAF0E6\",lavenderblush:\"#FFF0F5\",mistyrose:\"#FFE4E1\",gainsboro:\"#DCDCDC\",lightgray:\"#D3D3D3\",lightgrey:\"#D3D3D3\",silver:\"#C0C0C0\",darkgray:\"#A9A9A9\",darkgrey:\"#A9A9A9\",gray:\"#808080\",grey:\"#808080\",dimgray:\"#696969\",dimgrey:\"#696969\",lightslategray:\"#778899\",lightslategrey:\"#778899\",slategray:\"#708090\",slategrey:\"#708090\",darkslategray:\"#2F4F4F\",darkslategrey:\"#2F4F4F\",black:\"#000000\"}},{}],\"core/util/templating\":[function(t,e,r){var n,o,i,s,a;i=t(\"underscore\"),o=t(\"sprintf\"),n=t(\"numbro\"),s=function(t){var e;return i.isNumber(t)?(e=function(){switch(!1){case Math.floor(t)!==t:return\"%d\";case!(Math.abs(t)>.1&&Math.abs(t)<1e3):return\"%0.3f\";default:return\"%0.3e\"}}(),o.sprintf(e,t)):\"\"+t},a=function(t,e,r,o){return null==o&&(o={}),t=t.replace(/(^|[^\\$])\\$(\\w+)/g,function(t){return function(t,e,r){return e+\"@$\"+r}}(this)),t=t.replace(/(^|[^@])@(?:(\\$?\\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t){return function(t,a,l,u,c){var p,h,_;return l=null!=u?u:l,_=\"$\"===l[0]?o[l.substring(1)]:null!=(p=e.get_column(l))?p[r]:void 0,h=null==_?\"???\":null!=c?n.format(_,c):s(_),\"\"+a+i.escape(h)}}(this))},e.exports={replace_placeholders:a}},{numbro:\"numbro\",sprintf:\"sprintf\",underscore:\"underscore\"}],\"core/util/text\":[function(t,e,r){var n,o,i;n=t(\"jquery\"),o={},i=function(t){var e,r,i,s,a;if(null!=o[t])return o[t];a=n(\"Hg\").css({font:t}),e=n('
'),i=n(\"
\"),i.append(a,e),r=n(\"body\"),r.append(i);try{s={},e.css({verticalAlign:\"baseline\"}),s.ascent=e.offset().top-a.offset().top,e.css({verticalAlign:\"bottom\"}),s.height=e.offset().top-a.offset().top,s.descent=s.height-s.ascent}finally{i.remove()}return o[t]=s,s},e.exports={get_text_height:i}},{jquery:\"jquery\"}],\"core/util/throttle\":[function(t,e,r){var n,o,i;n=function(t){return t()},o=(\"undefined\"!=typeof window&&null!==window?window.requestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.mozRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.webkitRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.msRequestAnimationFrame:void 0)||n,i=function(t,e){var r,n,i,s,a,l,u,c;return l=[null,null,null,null],n=l[0],r=l[1],c=l[2],u=l[3],a=0,s=!1,i=function(){return a=new Date,c=null,s=!1,u=t.apply(n,r)},function(){var t,l;return t=new Date,l=e-(t-a),n=this,r=arguments,l<=0&&!s?(clearTimeout(c),s=!0,o(i)):c||s||(c=setTimeout(function(){return o(i)},l)),u}},e.exports={throttle:i}},{}],\"core/util/underscore\":[function(t,e,r){var n,o;n=t(\"underscore\"),o=function(){return n.uniqueId=function(t){var e,r,n,o,i;for(o=[],e=\"0123456789ABCDEF\",r=n=0;n<=31;r=++n)o[r]=e.substr(Math.floor(16*Math.random()),1);return o[12]=\"4\",o[16]=e.substr(3&o[16]|8,1),i=o.join(\"\"),t?t+\"-\"+i:i}},n.isNullOrUndefined=function(t){return n.isNull(t)||n.isUndefined(t)},n.setdefault=function(t,e,r){return n.has(t,e)?t[e]:(t[e]=r,r)},e.exports={patch:o}},{underscore:\"underscore\"}],\"core/util/zoom\":[function(t,e,r){var n;n=function(t,e,r,n,o){var i,s,a,l,u,c,p,h,_,d,f,m,g,y,v,b,x,w,k,M,T,S,z,E,A;null==r&&(r=!0),null==n&&(n=!0),null==o&&(o=null),s=t.h_range,b=t.v_range,e>.9?e=.9:e<-.9&&(e=-.9),u=[s.start,s.end],k=u[0],w=u[1],c=[b.start,b.end],S=c[0],T=c[1],x=null!=o?o.x:(w+k)/2,M=null!=o?o.y:(T+S)/2,r?(m=k-(k-x)*e,g=w-(w-x)*e):(m=k,g=w),n?(y=S-(S-M)*e,v=T-(T-M)*e):(y=S,v=T),z={},p=t.x_mappers;for(l in p)a=p[l],h=a.v_map_from_target([m,g]),f=h[0],i=h[1],z[l]={start:f,end:i};E={},_=t.y_mappers;for(l in _)a=_[l],d=a.v_map_from_target([y,v]),f=d[0],i=d[1],E[l]={start:f,end:i};return A={xrs:z,yrs:E,factor:e}},e.exports={scale_range:n}},{}],\"core/visuals\":[function(t,e,r){var n,o,i,s,a,l,u,c,p=function(t,e){function r(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=t(\"underscore\"),c=t(\"./property_mixins\"),u=t(\"./util/color\").color2rgba,n=function(){function t(t,e){var r,n,o,i,s;for(null==e&&(e=\"\"),this.obj=t,this.prefix=e,this.cache={},n=t.properties[e+this.do_attr].spec,this.doit=!l.isNull(n.value),s=this.attrs,o=0,i=s.length;o0;)t.push(this.remove_root(this._roots[0]));return t}finally{this._pop_all_models_freeze()}},t.prototype._destructively_move=function(t){var e,r,n,o,i,s;if(t===this)throw new Error(\"Attempted to overwrite a document with itself\");t.clear(),s=[],this._push_all_models_freeze();try{for(;this._roots.length>0;)this.remove_root(this._roots[0]),s.push(i)}finally{this._pop_all_models_freeze()}for(e=0,n=s.length;e=0)){this._push_all_models_freeze();try{this._roots.push(t),t._is_root=!0}finally{this._pop_all_models_freeze()}return this._init_solver(),this._trigger_on_change(new _(this,t))}},t.prototype.remove_root=function(t){var e;if(e=this._roots.indexOf(t),!(e<0)){this._push_all_models_freeze();try{this._roots.splice(e,1),t._is_root=!1}finally{this._pop_all_models_freeze()}return this._init_solver(),this._trigger_on_change(new d(this,t))}},t.prototype.title=function(){return this._title},t.prototype.set_title=function(t){if(t!==this._title)return this._title=t,this._trigger_on_change(new g(this,t))},t.prototype.get_model_by_id=function(t){return t in this._all_models?this._all_models[t]:null},t.prototype.get_model_by_name=function(t){return this._all_models_by_name.get_one(t,\"Multiple models are named '\"+t+\"'\")},t.prototype.on_change=function(t){if(!(z.call(this._callbacks,t)>=0))return this._callbacks.push(t)},t.prototype.remove_on_change=function(t){var e;if(e=this._callbacks.indexOf(t),e>=0)return this._callbacks.splice(e,1)},t.prototype._trigger_on_change=function(t){var e,r,n,o,i;for(o=this._callbacks,i=[],r=0,n=o.length;r0||v.difference(w,i).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");T={},n=[],g=r._all_models;for(a in g)_=g[a],a in o&&(M=t._events_to_sync_objects(o[a],x[a],r,T),n=n.concat(M));return{events:n,references:t._references_json(v.values(T),l=!1)}},t.prototype.to_json_string=function(t){return null==t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){var r,n,o,i,s,a;for(null==e&&(e=!0),s=[],i=this._roots,r=0,n=i.length;r\"),n(\"body\").append(e)},z=function(t){var e;return e=n(\"\").appendTo(s)),r.opacity&&(this.helper.css(\"opacity\")&&(this._storedOpacity=this.helper.css(\"opacity\")),this.helper.css(\"opacity\",r.opacity)),r.zIndex&&(this.helper.css(\"zIndex\")&&(this._storedZIndex=this.helper.css(\"zIndex\")),this.helper.css(\"zIndex\",r.zIndex)),this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger(\"start\",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger(\"activate\",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass(\"ui-sortable-helper\"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,o,s,r=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo(\"absolute\"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--)if(n=this.items[i],o=n.item[0],s=this._intersectsWithPointer(n),s&&n.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===s?\"next\":\"prev\"]()[0]===o||e.contains(this.placeholder[0],o)||\"semi-dynamic\"===this.options.type&&e.contains(this.element[0],o))){if(this.direction=1===s?\"down\":\"up\",\"pointer\"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger(\"change\",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger(\"sort\",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,o=this.placeholder.offset(),s=this.options.axis,r={};s&&\"x\"!==s||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),s&&\"y\"!==s||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),\"original\"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger(\"deactivate\",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger(\"out\",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),\"original\"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||\"id\")||\"\").match(t.expression||/(.+)[\\-=_](.+)/);i&&n.push((t.key||i[1]+\"[]\")+\"=\"+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+\"=\"),n.join(\"&\")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||\"id\")||\"\")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=e.left,r=s+e.width,a=e.top,l=a+e.height,u=this.offset.click.top,c=this.offset.click.left,h=\"x\"===this.options.axis||n+u>a&&n+us&&t+ce[this.floating?\"width\":\"height\"]?p:s0?\"down\":\"up\")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?\"right\":\"left\")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){a.push(this)}var n,o,s,r,a=[],l=[],u=this._connectWith();if(u&&t)for(n=u.length-1;n>=0;n--)for(s=e(u[n]),o=s.length-1;o>=0;o--)r=e.data(s[o],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([e.isFunction(r.options.items)?r.options.items.call(r.element):e(r.options.items,r.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),r]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(\":data(\"+this.widgetName+\"-item)\");this.items=e.grep(this.items,function(e){for(var i=0;i=0;i--)for(o=e(d[i]),n=o.length-1;n>=0;n--)s=e.data(o[n],this.widgetFullName),s&&s!==this&&!s.options.disabled&&(h.push([e.isFunction(s.options.items)?s.options.items.call(s.element[0],t,{item:this.currentItem}):e(s.options.items,s.element),s]),this.containers.push(s));for(i=h.length-1;i>=0;i--)for(r=h[i][1],a=h[i][0],n=0,u=a.length;n=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=o.outerWidth(),n.height=o.outerHeight()),s=o.offset(),n.left=s.left,n.top=s.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)s=this.containers[i].element.offset(),this.containers[i].containerCache.left=s.left,this.containers[i].containerCache.top=s.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,n=t.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),o=e(\"<\"+n+\">\",t.document[0]).addClass(i||t.currentItem[0].className+\" ui-sortable-placeholder\").removeClass(\"ui-sortable-helper\");return\"tr\"===n?t.currentItem.children().each(function(){e(\" \",t.document[0]).attr(\"colspan\",e(this).attr(\"colspan\")||1).appendTo(o)}):\"img\"===n&&o.attr(\"src\",t.currentItem.attr(\"src\")),i||o.css(\"visibility\",\"hidden\"),o},update:function(e,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css(\"paddingTop\")||0,10)-parseInt(t.currentItem.css(\"paddingBottom\")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css(\"paddingLeft\")||0,10)-parseInt(t.currentItem.css(\"paddingRight\")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var o,s,r,a,l,u,c,h,d,p,f=null,m=null;for(o=this.containers.length-1;o>=0;o--)if(!e.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&e.contains(this.containers[o].element[0],f.element[0]))continue;f=this.containers[o],m=o}else this.containers[o].containerCache.over&&(this.containers[o]._trigger(\"out\",t,this._uiHash(this)),this.containers[o].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger(\"over\",t,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(r=1e4,a=null,p=f.floating||n(this.currentItem),l=p?\"left\":\"top\",u=p?\"width\":\"height\",c=this.positionAbs[l]+this.offset.click[l],s=this.items.length-1;s>=0;s--)e.contains(this.containers[m].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(p&&!i(this.positionAbs.top+this.offset.click.top,this.items[s].top,this.items[s].height)||(h=this.items[s].item.offset()[l],d=!1,Math.abs(h-c)>Math.abs(h+this.items[s][u]-c)&&(d=!0,h+=this.items[s][u]),Math.abs(h-c)this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((s-this.originalPageX)/o.grid[0])*o.grid[0],s=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],\"down\"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){function i(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}this.reverting=!1;var n,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)\"auto\"!==this._storedCSS[n]&&\"static\"!==this._storedCSS[n]||(this._storedCSS[n]=\"\");this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\")}else this.currentItem.show();for(this.fromOutside&&!t&&o.push(function(e){this._trigger(\"receive\",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(\".ui-sortable-helper\")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||o.push(function(e){this._trigger(\"update\",e,this._uiHash())}),this!==this.currentContainer&&(t||(o.push(function(e){this._trigger(\"remove\",e,this._uiHash())}),o.push(function(e){return function(t){e._trigger(\"receive\",t,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(e){return function(t){e._trigger(\"update\",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||o.push(i(\"deactivate\",this,this.containers[n])),this.containers[n].containerCache.over&&(o.push(i(\"out\",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find(\"body\").css(\"cursor\",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css(\"opacity\",this._storedOpacity),this._storedZIndex&&this.helper.css(\"zIndex\",\"auto\"===this._storedZIndex?\"\":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger(\"beforeStop\",e,this._uiHash()),n=0;n\",widgetEventPrefix:\"spin\",options:{culture:null,icons:{down:\"ui-icon-triangle-1-s\",up:\"ui-icon-triangle-1-n\"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption(\"max\",this.options.max),this._setOption(\"min\",this.options.min),this._setOption(\"step\",this.options.step),\"\"!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each([\"min\",\"max\",\"step\"],function(e,n){var o=i.attr(n);void 0!==o&&o.length&&(t[n]=o)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:\"_stop\",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger(\"change\",e)))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},\"mousedown .ui-spinner-button\":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,t)},\"mouseup .ui-spinner-button\":\"_stop\",\"mouseenter .ui-spinner-button\":function(t){if(e(t.currentTarget).hasClass(\"ui-state-active\"))return this._start(t)!==!1&&void this._repeat(null,e(t.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,t)},\"mouseleave .ui-spinner-button\":\"_stop\"},_draw:function(){var e=this.uiSpinner=this.element.addClass(\"ui-spinner-input\").attr(\"autocomplete\",\"off\").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr(\"role\",\"spinbutton\"),this.buttons=e.find(\".ui-spinner-button\").attr(\"tabIndex\",-1).button().removeClass(\"ui-corner-all\"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return\"\"},_buttonHtml:function(){return\"\"},_start:function(e){return!(!this.spinning&&this._trigger(\"start\",e)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger(\"spin\",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(\".\");return i===-1?0:t.length-i-1},_adjustValue:function(e){var t,i,n=this.options;return t=null!==n.min?n.min:0,i=e-t,i=Math.round(i/n.step)*n.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e\",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var o,s,r,a=i;if(0===arguments.length)return e.widget.extend({},this.options);if(\"string\"==typeof i)if(a={},o=i.split(\".\"),i=o.shift(),o.length){for(s=a[i]=e.widget.extend({},this.options[i]),r=0;r').appendTo(document.body),this.$element.on(\"click.dismiss.bk-bs.modal\",n.proxy(function(e){e.target===e.currentTarget&&(\"static\"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass(\"bk-bs-in\"),!e)return;i?this.$backdrop.one(n.support.transition.end,e).emulateTransitionEnd(150):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass(\"bk-bs-in\"),n.support.transition&&this.$element.hasClass(\"bk-bs-fade\")?this.$backdrop.one(n.support.transition.end,e).emulateTransitionEnd(150):e()):e&&e()};var s=n.fn.modal;n.fn.modal=function(e,t){return this.each(function(){var i=n(this),s=i.data(\"bk-bs.modal\"),r=n.extend({},o.DEFAULTS,i.data(),\"object\"==typeof e&&e);s||i.data(\"bk-bs.modal\",s=new o(this,r)),\"string\"==typeof e?s[e](t):r.show&&s.show(t)})},n.fn.modal.Constructor=o,n.fn.modal.noConflict=function(){return n.fn.modal=s,this},n(document).on(\"click.bk-bs.modal.data-api\",'[data-bk-bs-toggle=\"modal\"]',function(e){var t=n(this),i=t.attr(\"href\"),o=n(t.attr(\"data-bk-bs-target\")||i&&i.replace(/.*(?=#[^\\s]+$)/,\"\")),s=o.data(\"bk-bs.modal\")?\"toggle\":n.extend({remote:!/#/.test(i)&&i},o.data(),t.data());t.is(\"a\")&&e.preventDefault(),o.modal(s,this).one(\"hide\",function(){t.is(\":visible\")&&t.focus()})}),n(document).on(\"show.bk-bs.modal\",\".bk-bs-modal\",function(){n(document.body).addClass(\"bk-bs-modal-open\")}).on(\"hidden.bk-bs.modal\",\".bk-bs-modal\",function(){n(document.body).removeClass(\"bk-bs-modal-open\")})},{jquery:\"jquery\"}],\"bootstrap/tab\":[function(e,t,i){var n=e(\"jquery\"),o=function(e){this.element=n(e)};o.prototype.show=function(){var e=this.element,t=e.closest(\"ul:not(.bk-bs-dropdown-menu)\"),i=e.data(\"bk-bs-target\");if(i||(i=e.attr(\"href\"),i=i&&i.replace(/.*(?=#[^\\s]*$)/,\"\")),!e.parent(\"li\").hasClass(\"bk-bs-active\")){var o=t.find(\".bk-bs-active:last a\")[0],s=n.Event(\"show.bk-bs.tab\",{relatedTarget:o});if(e.trigger(s),!s.isDefaultPrevented()){var r=n(i);this.activate(e.parent(\"li\"),t),this.activate(r,r.parent(),function(){e.trigger({type:\"shown.bk-bs.tab\",relatedTarget:o})})}}},o.prototype.activate=function(e,t,i){function o(){s.removeClass(\"bk-bs-active\").find(\"> .bk-bs-dropdown-menu > .bk-bs-active\").removeClass(\"bk-bs-active\"),e.addClass(\"bk-bs-active\"),r?(e[0].offsetWidth,e.addClass(\"bk-bs-in\")):e.removeClass(\"bk-bs-fade\"),e.parent(\".bk-bs-dropdown-menu\")&&e.closest(\"li.bk-bs-dropdown\").addClass(\"bk-bs-active\"),i&&i()}var s=t.find(\"> .bk-bs-active\"),r=i&&n.support.transition&&s.hasClass(\"bk-bs-fade\");r?s.one(n.support.transition.end,o).emulateTransitionEnd(150):o(),s.removeClass(\"bk-bs-in\")};var s=n.fn.tab;n.fn.tab=function(e){return this.each(function(){var t=n(this),i=t.data(\"bk-bs.tab\");i||t.data(\"bk-bs.tab\",i=new o(this)),\"string\"==typeof e&&i[e]()})},n.fn.tab.Constructor=o,n.fn.tab.noConflict=function(){return n.fn.tab=s,this},n(document).on(\"click.bk-bs.tab.data-api\",'[data-bk-bs-toggle=\"tab\"], [data-bk-bs-toggle=\"pill\"]',function(e){e.preventDefault(),n(this).tab(\"show\")})},{jquery:\"jquery\"}],\"jqrangeslider/jQDateRangeSlider\":[function(e,t,i){/**\n", " * jQRangeSlider\n", " * A javascript slider selector that supports dates\n", " *\n", " * Copyright (C) Guillaume Gautreau 2012\n", " * Dual licensed under the MIT or GPL Version 2 licenses.\n", " *\n", " */\n", " var n=e(\"jquery\");e(\"./jQRangeSlider\"),t.exports=n.widget(\"ui.dateRangeSlider\",n.ui.rangeSlider,{options:{bounds:{min:new Date(2010,0,1).valueOf(),max:new Date(2012,0,1).valueOf()},defaultValues:{min:new Date(2010,1,11).valueOf(),max:new Date(2011,1,11).valueOf()}},_create:function(){n.ui.rangeSlider.prototype._create.apply(this),this.element.addClass(\"bk-ui-dateRangeSlider\")},destroy:function(){this.element.removeClass(\"bk-ui-dateRangeSlider\"),n.ui.rangeSlider.prototype.destroy.apply(this)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min.valueOf(),max:this.options.defaultValues.max.valueOf()}},_setRulerParameters:function(){this.ruler.ruler({min:new Date(this.options.bounds.min),max:new Date(this.options.bounds.max),scales:this.options.scales})},_setOption:function(e,t){(\"defaultValues\"===e||\"bounds\"===e)&&\"undefined\"!=typeof t&&null!==t&&this._isValidDate(t.min)&&this._isValidDate(t.max)?n.ui.rangeSlider.prototype._setOption.apply(this,[e,{min:t.min.valueOf(),max:t.max.valueOf()}]):n.ui.rangeSlider.prototype._setOption.apply(this,this._toArray(arguments))},_handleType:function(){return\"dateRangeSliderHandle\"},option:function(e){if(\"bounds\"===e||\"defaultValues\"===e){var t=n.ui.rangeSlider.prototype.option.apply(this,arguments);return{min:new Date(t.min),max:new Date(t.max)}}return n.ui.rangeSlider.prototype.option.apply(this,this._toArray(arguments))},_defaultFormatter:function(e){var t=e.getMonth()+1,i=e.getDate();return\"\"+e.getFullYear()+\"-\"+(t<10?\"0\"+t:t)+\"-\"+(i<10?\"0\"+i:i)},_getFormatter:function(){var e=this.options.formatter;return this.options.formatter!==!1&&null!==this.options.formatter||(e=this._defaultFormatter),function(e){return function(t){return e(new Date(t))}}(e)},values:function(e,t){var i=null;return i=this._isValidDate(e)&&this._isValidDate(t)?n.ui.rangeSlider.prototype.values.apply(this,[e.valueOf(),t.valueOf()]):n.ui.rangeSlider.prototype.values.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},min:function(e){return this._isValidDate(e)?new Date(n.ui.rangeSlider.prototype.min.apply(this,[e.valueOf()])):new Date(n.ui.rangeSlider.prototype.min.apply(this))},max:function(e){return this._isValidDate(e)?new Date(n.ui.rangeSlider.prototype.max.apply(this,[e.valueOf()])):new Date(n.ui.rangeSlider.prototype.max.apply(this))},bounds:function(e,t){var i;return i=this._isValidDate(e)&&this._isValidDate(t)?n.ui.rangeSlider.prototype.bounds.apply(this,[e.valueOf(),t.valueOf()]):n.ui.rangeSlider.prototype.bounds.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},_isValidDate:function(e){return\"undefined\"!=typeof e&&e instanceof Date},_toArray:function(e){return Array.prototype.slice.call(e)}})},{\"./jQRangeSlider\":\"jqrangeslider/jQRangeSlider\",jquery:\"jquery\"}],\"jqrangeslider/jQRangeSlider\":[function(e,t,i){/**\n", " * jQRangeSlider\n", " * A javascript slider selector that supports dates\n", " *\n", " * Copyright (C) Guillaume Gautreau 2012\n", " * Dual licensed under the MIT or GPL Version 2 licenses.\n", " *\n", " */\n", " var n=e(\"jquery\");e(\"jquery-ui/core\"),e(\"jquery-ui/widget\"),e(\"jquery-ui/mouse\"),e(\"jquery-mousewheel\"),t.exports=n.widget(\"ui.rangeSlider\",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:\"show\",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(n.proxy(this.resize,this),1),setTimeout(n.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var e=this;this._resizeProxy=function(t){e.resize(t)},n(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css(\"width\",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css(\"width\",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(e,t){this._setWheelOption(e,t),this._setArrowsOption(e,t),this._setLabelsOption(e,t),this._setLabelsDurations(e,t),this._setFormatterOption(e,t),this._setBoundsOption(e,t),this._setRangeOption(e,t),this._setStepOption(e,t),this._setScalesOption(e,t),this._setEnabledOption(e,t),this._setPositionningOption(e,t)},_validProperty:function(e,t,i){return null===e||\"undefined\"==typeof e[t]?i:e[t]},_setStepOption:function(e,t){\"step\"===e&&(this.options.step=t,this._leftHandle(\"option\",\"step\",t),this._rightHandle(\"option\",\"step\",t),this._changed(!0))},_setScalesOption:function(e,t){\"scales\"===e&&(t===!1||null===t?(this.options.scales=!1,this._destroyRuler()):t instanceof Array&&(this.options.scales=t,this._updateRuler()))},_setRangeOption:function(e,t){\"range\"===e&&(this._bar(\"option\",\"range\",t),this.options.range=this._bar(\"option\",\"range\"),this._changed(!0))},_setBoundsOption:function(e,t){\"bounds\"===e&&\"undefined\"!=typeof t.min&&\"undefined\"!=typeof t.max&&this.bounds(t.min,t.max)},_setWheelOption:function(e,t){\"wheelMode\"!==e&&\"wheelSpeed\"!==e||(this._bar(\"option\",e,t),this.options[e]=this._bar(\"option\",e))},_setLabelsOption:function(e,t){if(\"valueLabels\"===e){if(\"hide\"!==t&&\"show\"!==t&&\"change\"!==t)return;this.options.valueLabels=t,\"hide\"!==t?(this._createLabels(),this._leftLabel(\"update\"),this._rightLabel(\"update\")):this._destroyLabels()}},_setFormatterOption:function(e,t){\"formatter\"===e&&null!==t&&\"function\"==typeof t&&\"hide\"!==this.options.valueLabels&&(this._leftLabel(\"option\",\"formatter\",t),this.options.formatter=this._rightLabel(\"option\",\"formatter\",t))},_setArrowsOption:function(e,t){\"arrows\"!==e||t!==!0&&t!==!1||t===this.options.arrows||(t===!0?(this.element.removeClass(\"bk-ui-rangeSlider-noArrow\").addClass(\"bk-ui-rangeSlider-withArrows\"),this.arrows.left.css(\"display\",\"block\"),this.arrows.right.css(\"display\",\"block\"),this.options.arrows=!0):t===!1&&(this.element.addClass(\"bk-ui-rangeSlider-noArrow\").removeClass(\"bk-ui-rangeSlider-withArrows\"),this.arrows.left.css(\"display\",\"none\"),this.arrows.right.css(\"display\",\"none\"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(e,t){if(\"durationIn\"===e||\"durationOut\"===e||\"delayOut\"===e){if(parseInt(t,10)!==t)return;null!==this.labels.left&&this._leftLabel(\"option\",e,t),null!==this.labels.right&&this._rightLabel(\"option\",e,t),this.options[e]=t}},_setEnabledOption:function(e,t){\"enabled\"===e&&this.toggle(t)},_setPositionningOption:function(e,t){\"symmetricPositionning\"===e&&(this._rightHandle(\"option\",e,t),this.options[e]=this._leftHandle(\"option\",e,t))},_createElements:function(){\"absolute\"!==this.element.css(\"position\")&&this.element.css(\"position\",\"relative\"),this.element.addClass(\"bk-ui-rangeSlider\"),this.container=n(\"
\").css(\"position\",\"absolute\").appendTo(this.element),this.innerBar=n(\"
\").css(\"position\",\"absolute\").css(\"top\",0).css(\"left\",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),\"hide\"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(e){return n(\"
\")[this._handleType()](e).bind(\"sliderDrag\",n.proxy(this._changing,this)).bind(\"stop\",n.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=n(\"
\").prependTo(this.container).bind(\"sliderDrag scroll zoom\",n.proxy(this._changing,this)).bind(\"stop\",n.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar(\"option\",\"range\"),this.options.wheelMode=this._bar(\"option\",\"wheelMode\"),this.options.wheelSpeed=this._bar(\"option\",\"wheelSpeed\")},_createArrows:function(){this.arrows.left=this._createArrow(\"left\"),this.arrows.right=this._createArrow(\"right\"),this.options.arrows?this.element.addClass(\"bk-ui-rangeSlider-withArrows\"):(this.arrows.left.css(\"display\",\"none\"),this.arrows.right.css(\"display\",\"none\"),this.element.addClass(\"bk-ui-rangeSlider-noArrow\"))},_createArrow:function(e){var t,i=n(\"
\").append(\"
\").addClass(\"bk-ui-rangeSlider-\"+e+\"Arrow\").css(\"position\",\"absolute\").css(e,0).appendTo(this.element);return t=\"right\"===e?n.proxy(this._scrollRightClick,this):n.proxy(this._scrollLeftClick,this),i.bind(\"mousedown touchstart\",t),i},_proxy:function(e,t,i){var n=Array.prototype.slice.call(i);return e&&e[t]?e[t].apply(e,n):null},_handleType:function(){return\"rangeSliderHandle\"},_barType:function(){return\"rangeSliderBar\"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return\"rangeSliderLabel\"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(e,t){return t===this.rightHandle&&(e-=t.outerWidth()),e*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-t.outerWidth(!0))+this.options.bounds.min},_trigger:function(e){var t=this;setTimeout(function(){t.element.trigger(e,{label:t.element,values:t.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger(\"valuesChanging\"),this._valuesChanged=!0)},_deactivateLabels:function(){\"change\"===this.options.valueLabels&&(this._leftLabel(\"option\",\"show\",\"hide\"),this._rightLabel(\"option\",\"show\",\"hide\"))},_reactivateLabels:function(){\"change\"===this.options.valueLabels&&(this._leftLabel(\"option\",\"show\",\"change\"),this._rightLabel(\"option\",\"show\",\"change\"))},_changed:function(e){e===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger(\"valuesChanged\"),e!==!0&&this._trigger(\"userValuesChanged\"),this._valuesChanged=!1),e===!0&&this._reactivateLabels()},_updateValues:function(){var e=this._leftHandle(\"value\"),t=this._rightHandle(\"value\"),i=this._min(e,t),n=this._max(e,t),o=i!==this._values.min||n!==this._values.max;return this._values.min=this._min(e,t),this._values.max=this._max(e,t),o},_min:function(e,t){return Math.min(e,t)},_max:function(e,t){return Math.max(e,t)},_createLabel:function(e,t){var i;return null===e?(i=this._getLabelConstructorParameters(e,t),e=n(\"
\").appendTo(this.element)[this._labelType()](i)):(i=this._getLabelRefreshParameters(e,t),e[this._labelType()](i)),e},_getLabelConstructorParameters:function(e,t){return{handle:t,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter:this.options.formatter},_defaultFormatter:function(e){return Math.round(e)},_destroyLabel:function(e){return null!==e&&(e[this._labelType()](\"destroy\"),e.remove(),e=null),e},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel(\"pair\",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle(\"stepRatio\")},_scrollRightClick:function(e){return!!this.options.enabled&&(e.preventDefault(),this._bar(\"startScroll\"),this._bindStopScroll(),void this._continueScrolling(\"scrollRight\",4*this._stepRatio(),1))},_continueScrolling:function(e,t,i,n){if(!this.options.enabled)return!1;this._bar(e,i),n=n||5,n--;var o=this,s=16,r=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===n&&(t>s?t=Math.max(s,t/1.5):i=Math.min(r,2*i),n=5),o._continueScrolling(e,t,i,n)},t)},_scrollLeftClick:function(e){return!!this.options.enabled&&(e.preventDefault(),this._bar(\"startScroll\"),this._bindStopScroll(),void this._continueScrolling(\"scrollLeft\",4*this._stepRatio(),1))},_bindStopScroll:function(){var e=this;this._stopScrollHandle=function(t){t.preventDefault(),e._stopScroll()},n(document).bind(\"mouseup touchend\",this._stopScrollHandle)},_stopScroll:function(){n(document).unbind(\"mouseup touchend\",this._stopScrollHandle),this._stopScrollHandle=null,this._bar(\"stopScroll\"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=n(\"
\").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&n.fn.ruler&&(this.ruler.ruler(\"destroy\"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&n.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(e,t){var i;if(\"undefined\"!=typeof e&&\"undefined\"!=typeof t){if(!this._initialized)return this._values.min=e,this._values.max=t,this._values;this._deactivateLabels(),i=this._bar(\"values\",e,t),this._changed(!0),this._reactivateLabels()}else i=this._bar(\"values\",e,t);return i},min:function(e){return this._values.min=this.values(e,this._values.max).min,this._values.min},max:function(e){return this._values.max=this.values(this._values.min,e).max,this._values.max},bounds:function(e,t){return this._isValidValue(e)&&this._isValidValue(t)&&e0&&e.which!=i.which)&&!n(e.target).is(i.not)&&(!i.handle||n(e.target).closest(i.handle,e.currentTarget).length)&&(r.touched=\"touchstart\"==e.type?this:null,i.propagates=1,i.mousedown=this,i.interactions=[r.interaction(this,i)],i.target=e.target,i.pageX=e.pageX,i.pageY=e.pageY,i.dragging=null,t=r.hijack(e,\"draginit\",i),i.propagates))return t=r.flatten(t),t&&t.length&&(i.interactions=[],n.each(t,function(){i.interactions.push(r.interaction(this,i))})),i.propagates=i.interactions.length,i.drop!==!1&&s.drop&&s.drop.handler(e,i),r.textselect(!1),r.touched?o.add(r.touched,\"touchmove touchend\",r.handler,i):o.add(document,\"mousemove mouseup\",r.handler,i),!(!r.touched||i.live)&&void 0}},interaction:function(e,t){var i=n(e)[t.relative?\"position\":\"offset\"]()||{top:0,left:0};return{drag:e,callback:new r.callback,droppable:[],offset:i}},handler:function(e){var t=e.data;switch(e.type){case!t.dragging&&\"touchmove\":e.preventDefault();case!t.dragging&&\"mousemove\":if(Math.pow(e.pageX-t.pageX,2)+Math.pow(e.pageY-t.pageY,2)0?void n.removeData(this,\"suppress.\"+e.type):a.apply(this,arguments)};var l=o.fixHooks.touchstart=o.fixHooks.touchmove=o.fixHooks.touchend=o.fixHooks.touchcancel={props:\"clientX clientY pageX pageY screenX screenY\".split(\" \"),filter:function(e,t){if(t){var i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||null;i&&n.each(l.props,function(t,n){e[n]=i[n]})}return e}};s.draginit=s.dragstart=s.dragend=r},{jquery:\"jquery\"}],jquery_event_drop:[function(e,t,i){/*!\n", " * jquery.event.drop - v 2.2\n", " * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com\n", " * Open Source MIT License - http://threedubmedia.com/code/license\n", " */\n", " var n=e(\"jquery\");e(\"jquery_event_drag\");n.fn.drop=function(e,t,i){var o=\"string\"==typeof e?e:\"\",s=n.isFunction(e)?e:n.isFunction(t)?t:null;return 0!==o.indexOf(\"drop\")&&(o=\"drop\"+o),i=(e==s?t:i)||{},s?this.bind(o,i,s):this.trigger(o)},n.drop=function(e){e=e||{},r.multi=e.multi===!0?1/0:e.multi===!1?1:isNaN(e.multi)?r.multi:e.multi,r.delay=e.delay||r.delay,r.tolerance=n.isFunction(e.tolerance)?e.tolerance:null===e.tolerance?null:r.tolerance,r.mode=e.mode||r.mode||\"intersect\"};var o=n.event,s=o.special,r=n.event.special.drop={multi:1,delay:20,mode:\"overlap\",targets:[],datakey:\"dropdata\",noBubble:!0,add:function(e){var t=n.data(this,r.datakey);t.related+=1},remove:function(){n.data(this,r.datakey).related-=1},setup:function(){if(!n.data(this,r.datakey)){var e={related:0,active:[],anyactive:0,winner:0,location:{}};n.data(this,r.datakey,e),r.targets.push(this)}},teardown:function(){var e=n.data(this,r.datakey)||{};if(!e.related){n.removeData(this,r.datakey);var t=this;r.targets=n.grep(r.targets,function(e){return e!==t})}},handler:function(e,t){var i;if(t)switch(e.type){case\"mousedown\":case\"touchstart\":i=n(r.targets),\"string\"==typeof t.drop&&(i=i.filter(t.drop)),i.each(function(){var e=n.data(this,r.datakey);e.active=[],e.anyactive=0,e.winner=0}),t.droppable=i,s.drag.hijack(e,\"dropinit\",t);break;case\"mousemove\":case\"touchmove\":r.event=e,r.timer||r.tolerate(t);break;case\"mouseup\":case\"touchend\":r.timer=clearTimeout(r.timer),t.propagates&&(s.drag.hijack(e,\"drop\",t),s.drag.hijack(e,\"dropend\",t))}},locate:function(e,t){var i=n.data(e,r.datakey),o=n(e),s=o.offset()||{},a=o.outerHeight(),l=o.outerWidth(),u={elem:e,width:l,height:a,top:s.top,left:s.left,right:s.left+l,bottom:s.top+a};return i&&(i.location=u,i.index=t,i.elem=e),u},contains:function(e,t){return(t[0]||t.left)>=e.left&&(t[0]||t.right)<=e.right&&(t[1]||t.top)>=e.top&&(t[1]||t.bottom)<=e.bottom},modes:{intersect:function(e,t,i){return this.contains(i,[e.pageX,e.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(e,t,i){return Math.max(0,Math.min(i.bottom,t.bottom)-Math.max(i.top,t.top))*Math.max(0,Math.min(i.right,t.right)-Math.max(i.left,t.left))},fit:function(e,t,i){return this.contains(i,t)?1:0},middle:function(e,t,i){return this.contains(i,[t.left+.5*t.width,t.top+.5*t.height])?1:0}},sort:function(e,t){return t.winner-e.winner||e.index-t.index},tolerate:function(e){var t,i,o,a,l,u,c,h,d=0,p=e.interactions.length,f=[r.event.pageX,r.event.pageY],m=r.tolerance||r.modes[r.mode];do if(h=e.interactions[d]){if(!h)return;h.drop=[],l=[],u=h.droppable.length,m&&(o=r.locate(h.proxy)),t=0;do if(c=h.droppable[t]){if(a=n.data(c,r.datakey),i=a.location,!i)continue;a.winner=m?m.call(r,r.event,o,i):r.contains(i,f)?1:0,l.push(a)}while(++t\",g.toolTip):d.updateColumnHeader(g.columnId,\"\",g.toolTip)}function r(e,t){32==e.which&&d.getColumns()[t.cell].id===g.columnId&&(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit()||l(t.row),e.preventDefault(),e.stopImmediatePropagation())}function a(e,t){if(d.getColumns()[t.cell].id===g.columnId&&o(e.target).is(\":checkbox\")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();l(t.row),e.stopPropagation(),e.stopImmediatePropagation()}}function l(e){f[e]?d.setSelectedRows(o.grep(d.getSelectedRows(),function(t){return t!=e})):d.setSelectedRows(d.getSelectedRows().concat(e))}function u(e,t){if(t.column.id==g.columnId&&o(e.target).is(\":checkbox\")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return e.preventDefault(),void e.stopImmediatePropagation();if(o(e.target).is(\":checked\")){for(var i=[],n=0;n\",toolTip:g.toolTip,field:\"sel\",width:g.width,resizable:!1,sortable:!1,cssClass:g.cssClass,formatter:h}}function h(e,t,i,n,o){return o?f[e]?\"\":\"\":null}var d,p=new s.EventHandler,f={},m={columnId:\"_checkbox_selector\",cssClass:null,toolTip:\"Select/Deselect All\",width:30},g=o.extend(!0,{},m,e);o.extend(this,{init:t,destroy:i,getColumnDefinition:c})}var o=e(\"jquery\"),s=e(\"../slick.core\");t.exports=n},{\"../slick.core\":\"slick_grid/slick.core\",jquery:\"jquery\"}],\"slick_grid/plugins/slick.rowselectionmodel\":[function(e,t,i){function n(e){function t(t){_=o.extend(!0,{},k,e),g=t,w.subscribe(g.onActiveCellChanged,n(p)),w.subscribe(g.onKeyDown,n(f)),w.subscribe(g.onClick,n(m))}function i(){w.unsubscribeAll()}function n(e){return function(){v||(v=!0,e.apply(this,arguments),v=!1)}}function r(e){for(var t=[],i=0;i=0&&n=0;i--)e[i]===t&&e.splice(i,1)},this.notify=function(t,i,o){i=i||new n,o=o||this;for(var s,r=0;r=this.fromRow&&e<=this.toRow&&t>=this.fromCell&&t<=this.toCell},this.toString=function(){return this.isSingleCell()?\"(\"+this.fromRow+\":\"+this.fromCell+\")\":\"(\"+this.fromRow+\":\"+this.fromCell+\" - \"+this.toRow+\":\"+this.toCell+\")\"}}function a(){this.__nonDataRow=!0}function l(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}function u(){this.__groupTotals=!0,this.group=null,this.initialized=!1}function c(){var e=null;this.isActive=function(t){return t?e===t:null!==e},this.activate=function(t){if(t!==e){if(null!==e)throw\"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController\";if(!t.commitCurrentEdit)throw\"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()\";if(!t.cancelCurrentEdit)throw\"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()\";e=t}},this.deactivate=function(t){if(e!==t)throw\"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one\";e=null},this.commitCurrentEdit=function(){return!e||e.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!e||e.cancelCurrentEdit()}}var h=(e(\"jquery\"),{Event:o,EventData:n,EventHandler:s,Range:r,NonDataRow:a,Group:l,GroupTotals:u,EditorLock:c,GlobalEditorLock:new c});l.prototype=new a,l.prototype.equals=function(e){return this.value===e.value&&this.count===e.count&&this.collapsed===e.collapsed&&this.title===e.title},u.prototype=new a,t.exports=h},{jquery:\"jquery\"}],\"slick_grid/slick.grid\":[function(require,module,exports){function SlickGrid(container,data,columns,options){function init(){if($container=$(container),$container.length<1)throw new Error(\"SlickGrid requires a valid container, \"+container+\" does not exist in the DOM.\");maxSupportedCssHeight=maxSupportedCssHeight||getMaxSupportedCssHeight(),scrollbarDimensions=scrollbarDimensions||measureScrollbar(),options=$.extend({},defaults,options),validateAndEnforceOptions(),columnDefaults.width=options.defaultColumnWidth,columnsById={};for(var e=0;et.maxWidth&&(t.width=t.maxWidth)}if(options.enableColumnReorder&&!$.fn.sortable)throw new Error(\"SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded\");editController={commitCurrentEdit:commitCurrentEdit,cancelCurrentEdit:cancelCurrentEdit},$container.empty().css(\"overflow\",\"hidden\").css(\"outline\",0).addClass(uid).addClass(\"bk-ui-widget\"),/relative|absolute|fixed/.test($container.css(\"position\"))||$container.css(\"position\",\"relative\"),$focusSink=$(\"
\").appendTo($container),$headerScroller=$(\"
\").appendTo($container),$headers=$(\"
\").appendTo($headerScroller),$headers.width(getHeadersWidth()),$headerRowScroller=$(\"
\").appendTo($container),$headerRow=$(\"
\").appendTo($headerRowScroller),$headerRowSpacer=$(\"
\").css(\"width\",getCanvasWidth()+scrollbarDimensions.width+\"px\").appendTo($headerRowScroller),$topPanelScroller=$(\"
\").appendTo($container),$topPanel=$(\"
\").appendTo($topPanelScroller),options.showTopPanel||$topPanelScroller.hide(),options.showHeaderRow||$headerRowScroller.hide(),$viewport=$(\"
\").appendTo($container),$viewport.css(\"overflow-y\",options.autoHeight?\"hidden\":\"auto\"),$canvas=$(\"
\").appendTo($viewport),$focusSink2=$focusSink.clone().appendTo($container),options.explicitInitialization||finishInitialization()}function finishInitialization(){initialized||(initialized=!0,viewportW=parseFloat($.css($container[0],\"width\",!0)),measureCellPaddingAndBorder(),disableSelection($headers),options.enableTextSelectionOnCells||$viewport.bind(\"selectstart.ui\",function(e){return $(e.target).is(\"input,textarea\")}),updateColumnCaches(),createColumnHeaders(),setupColumnSort(),createCssRules(),resizeCanvas(),bindAncestorScrollEvents(),$container.bind(\"resize.bk-slickgrid\",resizeCanvas),$viewport.bind(\"scroll\",handleScroll),$headerScroller.bind(\"contextmenu\",handleHeaderContextMenu).bind(\"click\",handleHeaderClick).delegate(\".bk-slick-header-column\",\"mouseenter\",handleHeaderMouseEnter).delegate(\".bk-slick-header-column\",\"mouseleave\",handleHeaderMouseLeave),$headerRowScroller.bind(\"scroll\",handleHeaderRowScroll),$focusSink.add($focusSink2).bind(\"keydown\",handleKeyDown),$canvas.bind(\"keydown\",handleKeyDown).bind(\"click\",handleClick).bind(\"dblclick\",handleDblClick).bind(\"contextmenu\",handleContextMenu).bind(\"draginit\",handleDragInit).bind(\"dragstart\",{distance:3},handleDragStart).bind(\"drag\",handleDrag).bind(\"dragend\",handleDragEnd).delegate(\".bk-slick-cell\",\"mouseenter\",handleMouseEnter).delegate(\".bk-slick-cell\",\"mouseleave\",handleMouseLeave),navigator.userAgent.toLowerCase().match(/webkit/)&&navigator.userAgent.toLowerCase().match(/macintosh/)&&$canvas.bind(\"mousewheel\",handleMouseWheel))}function registerPlugin(e){plugins.unshift(e),e.init(self)}function unregisterPlugin(e){for(var t=plugins.length;t>=0;t--)if(plugins[t]===e){plugins[t].destroy&&plugins[t].destroy(),plugins.splice(t,1);break}}function setSelectionModel(e){selectionModel&&(selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged),selectionModel.destroy&&selectionModel.destroy()),selectionModel=e,selectionModel&&(selectionModel.init(self),selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged))}function getSelectionModel(){return selectionModel}function getCanvasNode(){return $canvas[0]}function measureScrollbar(){var e=$(\"
\").appendTo(\"body\"),t={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),t}function getHeadersWidth(){for(var e=0,t=0,i=columns.length;tviewportW-scrollbarDimensions.width),$headerRowSpacer.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),(canvasWidth!=t||e)&&applyColumnWidths()}function disableSelection(e){e&&e.jquery&&e.attr(\"unselectable\",\"on\").css(\"MozUserSelect\",\"none\").bind(\"selectstart.ui\",function(){return!1})}function getMaxSupportedCssHeight(){for(var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=$(\"
\").appendTo(document.body);;){var n=2*e;if(i.css(\"height\",n),n>t||i.height()!==n)break;e=n}return i.remove(),e}function bindAncestorScrollEvents(){for(var e=$canvas[0];(e=e.parentNode)!=document.body&&null!=e;)if(e==$viewport[0]||e.scrollWidth!=e.clientWidth||e.scrollHeight!=e.clientHeight){var t=$(e);$boundAncestors=$boundAncestors?$boundAncestors.add(t):t,t.bind(\"scroll.\"+uid,handleActiveCellPositionChange)}}function unbindAncestorScrollEvents(){$boundAncestors&&($boundAncestors.unbind(\"scroll.\"+uid),$boundAncestors=null)}function updateColumnHeader(e,t,i){if(initialized){var n=getColumnIndex(e);if(null!=n){var o=columns[n],s=$headers.children().eq(n);s&&(void 0!==t&&(columns[n].name=t),void 0!==i&&(columns[n].toolTip=i),trigger(self.onBeforeHeaderCellDestroy,{node:s[0],column:o}),s.attr(\"title\",i||\"\").children().eq(0).html(t),trigger(self.onHeaderCellRendered,{node:s[0],column:o}))}}}function getHeaderRow(){return $headerRow[0]}function getHeaderRowColumn(e){var t=getColumnIndex(e),i=$headerRow.children().eq(t);return i&&i[0]}function createColumnHeaders(){function e(){$(this).addClass(\"bk-ui-state-hover\")}function t(){$(this).removeClass(\"bk-ui-state-hover\")}$headers.find(\".bk-slick-header-column\").each(function(){var e=$(this).data(\"column\");e&&trigger(self.onBeforeHeaderCellDestroy,{node:this,column:e})}),$headers.empty(),$headers.width(getHeadersWidth()),$headerRow.find(\".bk-slick-headerrow-column\").each(function(){var e=$(this).data(\"column\");e&&trigger(self.onBeforeHeaderRowCellDestroy,{node:this,column:e})}),$headerRow.empty();for(var i=0;i\").html(\"\"+n.name+\"\").width(n.width-headerColumnWidthDiff).attr(\"id\",\"\"+uid+n.id).attr(\"title\",n.toolTip||\"\").data(\"column\",n).addClass(n.headerCssClass||\"\").appendTo($headers);if((options.enableColumnReorder||n.sortable)&&o.on(\"mouseenter\",e).on(\"mouseleave\",t),n.sortable&&(o.addClass(\"bk-slick-header-sortable\"),o.append(\"\")),trigger(self.onHeaderCellRendered,{node:o[0],column:n}),options.showHeaderRow){var s=$(\"
\").data(\"column\",n).appendTo($headerRow);trigger(self.onHeaderRowCellRendered,{node:s[0],column:n})}}setSortColumns(sortColumns),setupColumnResize(),options.enableColumnReorder&&setupColumnReorder()}function setupColumnSort(){$headers.click(function(e){if(e.metaKey=e.metaKey||e.ctrlKey,!$(e.target).hasClass(\"bk-slick-resizable-handle\")){var t=$(e.target).closest(\".bk-slick-header-column\");if(t.length){var i=t.data(\"column\");if(i.sortable){if(!getEditorLock().commitCurrentEdit())return;for(var n=null,o=0;o=l||(e=$(c),$(\"
\").appendTo(c).bind(\"dragstart\",function(e,a){if(!getEditorLock().commitCurrentEdit())return!1;n=e.pageX,$(this).parent().addClass(\"bk-slick-header-column-active\");var l=null,c=null;if(o.each(function(e,t){columns[e].previousWidth=$(t).outerWidth()}),options.forceFitColumns)for(l=0,c=0,t=u+1;t=0;t--)i=columns[t],i.resizable&&(l=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c=0;t--)i=columns[t],i.resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth
\").appendTo($headers),headerColumnWidthDiff=headerColumnHeightDiff=0,\"border-box\"!=e.css(\"box-sizing\")&&\"border-box\"!=e.css(\"-moz-box-sizing\")&&\"border-box\"!=e.css(\"-webkit-box-sizing\")&&($.each(t,function(t,i){headerColumnWidthDiff+=parseFloat(e.css(i))||0}),$.each(i,function(t,i){headerColumnHeightDiff+=parseFloat(e.css(i))||0})),e.remove();var n=$(\"
\").appendTo($canvas);e=$(\"\").appendTo(n),cellWidthDiff=cellHeightDiff=0,\"border-box\"!=e.css(\"box-sizing\")&&\"border-box\"!=e.css(\"-moz-box-sizing\")&&\"border-box\"!=e.css(\"-webkit-box-sizing\")&&($.each(t,function(t,i){cellWidthDiff+=parseFloat(e.css(i))||0}),$.each(i,function(t,i){cellHeightDiff+=parseFloat(e.css(i))||0})),n.remove(),absoluteColumnMinWidth=Math.max(headerColumnWidthDiff,cellWidthDiff)}function createCssRules(){$style=$(\"