{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", " \n", " \n", "

Bokeh Tutorial

\n", "
\n", "\n", "

13. HoloViews and Bokeh

" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Bokeh is designed to make it possible to construct rich, deeply interactive browser-based visualizations from Python source code. It has a syntax more compact and natural than older libraries like Matplotlib, particularly when using the Charts API, but it still requires a good bit of code to do relatively common data-science tasks like complex multi-figure layouts, animations, and widgets for parameter space exploration.\n", "\n", "To make it feasible to generate complex interactive visualizations \"on the fly\" in Jupyter notebooks while exploring data, we have created the new [HoloViews](http://holoviews.org) library built on top of Bokeh. \n", "\n", "HoloViews allows you to annotate your data with a small amount of metadata that makes it instantly visualizable, usually without writing any plotting code. HoloViews makes it practical to explore datasets and visualize them from every angle interactively, wrapping up Bokeh code for common tasks into a set of configurable and composable components. HoloViews installs separately from Bokeh, e.g. using `conda install holoviews`, and also works with matplotlib." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
\n", "\n", "\n", "HoloViewsJS, BokehJS successfully loaded in this cell.\n", "
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(global) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " if (typeof (window._bokeh_onload_callbacks) === \"undefined\") {\n", " window._bokeh_onload_callbacks = [];\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", " };\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;s=.6},d=function(t,e){var r,n,o,s,l,d,g,y,v,b,x,w,M,k,T,j,S,z,P,A,E,C,O,N,q,R,I,D,F,B,L,G,V,U,H,$,Y,W,X,Q,J,K,Z,tt,et;for(null==e&&(e={}),S=[],Z=[],k=j=0,N=Math.min(t.labels.length,t.values.length);0<=N?jN;k=0<=N?++j:--j)t.values[k]>0&&(S.push(t.labels[k]),Z.push(t.values[k]));return V=null!=(q=e.start_angle)?q:0,d=null!=(R=e.end_angle)?R:V+2*Math.PI,r=Math.abs(d-V),Q=function(t){return r*t},K=m(Z),z=Z.map(function(t){return t/K}),o=a(z),g=o.map(function(t){return V+Q(t)}),U=[V].concat(g.slice(0,-1)),x=i.zip(U,g).map(function(t){return function(t){var e,r;return r=t[0],e=t[1],(r+e)/2}}(this)),null==e.center?(s=0,l=0):i.isArray(e.center)?(s=e.center[0],l=e.center[1]):(s=e.center.x,l=e.center.y),T=null!=(I=e.inner_radius)?I:0,P=null!=(D=e.outer_radius)?D:1,A=i.isArray(e.palette)?e.palette:_[null!=(F=e.palette)?F:\"Spectral11\"].map(p),n=function(){var t,e,r;for(r=[],k=t=0,e=z.length;0<=e?te;k=0<=e?++t:--t)r.push(A[k%A.length]);return r}(),$=n.map(function(t){return c(u(t))?\"white\":\"black\"}),X=function(t,e){return[t*Math.cos(e),t*Math.sin(e)]},w=(T+P)/2,B=i.unzip(x.map(function(t){return function(t){return X(w,t)}}(this))),Y=B[0],W=B[1],Y=Y.map(function(t){return t+s}),W=W.map(function(t){return t+l}),H=x.map(function(t){return t>=Math.PI/2&&t<=3*Math.PI/2?t+Math.PI:t}),G=new Bokeh.ColumnDataSource({data:{labels:S,values:Z,percentages:z.map(function(t){return function(t){return f(\"%.2f%%\",100*t)}}(this)),start_angles:U,end_angles:g,text_angles:H,colors:n,text_colors:$,text_cx:Y,text_cy:W}}),y=new h.AnnularWedge({x:s,y:l,inner_radius:T,outer_radius:P,start_angle:{field:\"start_angles\"},end_angle:{field:\"end_angles\"},line_color:null,line_width:1,fill_color:{field:\"colors\"}}),b=new h.AnnularWedge({x:s,y:l,inner_radius:T,outer_radius:P,start_angle:{field:\"start_angles\"},end_angle:{field:\"end_angles\"},line_color:null,line_width:1,fill_color:{field:\"colors\"},fill_alpha:.8}),C=new h.GlyphRenderer({data_source:G,glyph:y,hover_glyph:b}),v=new h.Text({x:{field:\"text_cx\"},y:{field:\"text_cy\"},text:{field:null!=(L=e.slice_labels)?L:\"labels\"},angle:{field:\"text_angles\"},text_align:\"center\",text_baseline:\"middle\",text_color:{field:\"text_colors\"},text_font_size:\"9pt\"}),O=new h.GlyphRenderer({data_source:G,glyph:v}),tt=new h.DataRange1d({renderers:[C],range_padding:.2}),et=new h.DataRange1d({renderers:[C],range_padding:.2}),E=new h.Plot({x_range:tt,y_range:et}),null!=e.width&&(E.plot_width=e.width),null!=e.height&&(E.plot_height=e.height),E.add_renderers(C,O),J=\"
@labels
@values (@percentages)
\",M=new h.HoverTool({renderers:[C],tooltips:J}),E.add_tools(M),E},s=function(t,e){var r,n,o,s,a,l,u,c,d,f,m,g,y,v,b,x,w,M,k,T,j,S,z,P,A,E,C,O,N,q,R,I,D,F,B,L,G,V,U,H,$,Y,W,X,Q,J,K,Z,tt,et,rt,nt,ot,it;for(null==e&&(e={}),s=t[0],W=t.slice(1),a=function(){var t,e,r;for(r=[],t=0,e=s.length;tF;d=0<=F?++j:--j){for(o=[],Z=[],f=z=0,w=y.length;zB;d=0<=B?++A:--A){for(v=[],$=[],o=[],Z=[],f=O=0,M=y.length;O@labels
@columns: @values
\",\"horizontal\"===P?(r=\"right_center\",n=\"horizontal\"):(r=\"top_center\",n=\"vertical\"),c=new h.HoverTool({renderers:H,tooltips:K,point_policy:\"snap_to_data\",anchor:r,attachment:n}),C.add_tools(c),C},e.exports={pie:d,bar:s}},{\"../document\":\"document\",\"../embed\":\"embed\",\"../palettes/palettes\":\"palettes/palettes\",\"./models\":\"api/models\",jquery:\"jquery\",sprintf:\"sprintf\",underscore:\"underscore\"}],\"api/linalg\":[function(t,e,r){\"use strict\";function n(t){for(var e=t.length,r=t[0].length,n=[],o=0;o 1\");return e}return null==e?0:\"auto\"===e?t===f.LogAxis?10:5:void 0},e.prototype._process_tools=function(t){var e,r;return s.isString(t)&&(t=t.split(/\\s*,\\s*/)),e=function(){var e,n,o;for(o=[],e=0,n=t.length;e\"),n(null!=e?e:\"body\").append(i),h=p.add_document_standalone(a,i),c?h:h[t.id]},h=function(t,e,r){return g(\"#%02x%02x%02x\",t,e,r)},d=function(t,e){var r,n,o,i,a,l,u,c,h,p,_,d,m,g,y,v,b,x,w;for(null==e&&(e={}),b=s.isUndefined(e.toolbar_location)?\"above\":e.toolbar_location,y=s.isUndefined(e.sizing_mode)?\"fixed\":e.sizing_mode,x=\"fixed\"===e.sizing_mode?\"scale_width\":y,w=[],g=[],o=0,u=t.length;o0&&(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,r;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,h,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],h=n[o],ci&&(r=[i,o],o=r[0],i=r[1]),s>a&&(n=[a,s],s=n[0],a=n[1]),[o,s,i,a]},h=function(t){return t*t},s=function(t,e,r,n){return h(t-r)+h(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,h,p,_,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,h=(s-o)*l-(a-i)*u,p=(r-t)*l-(n-e)*u,l=h/c,u=p/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:p}},{}],\"common/models\":[function(t,e,r){e.exports={SelectionManager:t(\"./selection_manager\"),Selector:t(\"./selector\"),ToolEvents:t(\"./tool_events\"),Arrow:t(\"../models/annotations/arrow\"),BoxAnnotation:t(\"../models/annotations/box_annotation\"),Label:t(\"../models/annotations/label\"),LabelSet:t(\"../models/annotations/label_set\"),Legend:t(\"../models/annotations/legend\"),PolyAnnotation:t(\"../models/annotations/poly_annotation\"),Span:t(\"../models/annotations/span\"),Title:t(\"../models/annotations/title\"),Tooltip:t(\"../models/annotations/tooltip\"),OpenHead:t(\"../models/annotations/arrow_head\").OpenHead,NormalHead:t(\"../models/annotations/arrow_head\").NormalHead,VeeHead:t(\"../models/annotations/arrow_head\").VeeHead,CategoricalAxis:t(\"../models/axes/categorical_axis\"),DatetimeAxis:t(\"../models/axes/datetime_axis\"),LinearAxis:t(\"../models/axes/linear_axis\"),LogAxis:t(\"../models/axes/log_axis\"),CustomJS:t(\"../models/callbacks/customjs\"),OpenURL:t(\"../models/callbacks/open_url\"),Canvas:t(\"../models/canvas/canvas\"),CartesianFrame:t(\"../models/canvas/cartesian_frame\"),BasicTickFormatter:t(\"../models/formatters/basic_tick_formatter\"),CategoricalTickFormatter:t(\"../models/formatters/categorical_tick_formatter\"),DatetimeTickFormatter:t(\"../models/formatters/datetime_tick_formatter\"),LogTickFormatter:t(\"../models/formatters/log_tick_formatter\"),FuncTickFormatter:t(\"../models/formatters/func_tick_formatter\"),NumeralTickFormatter:t(\"../models/formatters/numeral_tick_formatter\"),PrintfTickFormatter:t(\"../models/formatters/printf_tick_formatter\"),AnnularWedge:t(\"../models/glyphs/annular_wedge\"),Annulus:t(\"../models/glyphs/annulus\"),Arc:t(\"../models/glyphs/arc\"),Bezier:t(\"../models/glyphs/bezier\"),Circle:t(\"../models/glyphs/circle\"),Ellipse:t(\"../models/glyphs/ellipse\"),Gear:t(\"../models/glyphs/gear\"),Image:t(\"../models/glyphs/image\"),ImageRGBA:t(\"../models/glyphs/image_rgba\"),ImageURL:t(\"../models/glyphs/image_url\"),Line:t(\"../models/glyphs/line\"),MultiLine:t(\"../models/glyphs/multi_line\"),Oval:t(\"../models/glyphs/oval\"),Patch:t(\"../models/glyphs/patch\"),Patches:t(\"../models/glyphs/patches\"),Quad:t(\"../models/glyphs/quad\"),Quadratic:t(\"../models/glyphs/quadratic\"),Ray:t(\"../models/glyphs/ray\"),Rect:t(\"../models/glyphs/rect\"),Segment:t(\"../models/glyphs/segment\"),Text:t(\"../models/glyphs/text\"),Wedge:t(\"../models/glyphs/wedge\"),Grid:t(\"../models/grids/grid\"),Column:t(\"../models/layouts/column\"),Row:t(\"../models/layouts/row\"),Spacer:t(\"../models/layouts/spacer\"),WidgetBox:t(\"../models/layouts/widget_box\"),CategoricalMapper:t(\"../models/mappers/categorical_mapper\"),GridMapper:t(\"../models/mappers/grid_mapper\"),LinearColorMapper:t(\"../models/mappers/linear_color_mapper\"),LinearMapper:t(\"../models/mappers/linear_mapper\"),LogColorMapper:t(\"../models/mappers/log_color_mapper\"),LogMapper:t(\"../models/mappers/log_mapper\"),Transform:t(\"../models/transforms/transform\"),Jitter:t(\"../models/transforms/jitter\"),Interpolator:t(\"../models/transforms/interpolator\"),LinearInterpolator:t(\"../models/transforms/linear_interpolator\"),StepInterpolator:t(\"../models/transforms/step_interpolator\"),Asterisk:t(\"../models/markers/asterisk\"),CircleCross:t(\"../models/markers/circle_cross\"),CircleX:t(\"../models/markers/circle_x\"),Cross:t(\"../models/markers/cross\"),Diamond:t(\"../models/markers/diamond\"),DiamondCross:t(\"../models/markers/diamond_cross\"),InvertedTriangle:t(\"../models/markers/inverted_triangle\"),Square:t(\"../models/markers/square\"),SquareCross:t(\"../models/markers/square_cross\"),SquareX:t(\"../models/markers/square_x\"),Triangle:t(\"../models/markers/triangle\"),X:t(\"../models/markers/x\"),Plot:t(\"../models/plots/plot\"),GMapPlot:t(\"../models/plots/gmap_plot\"),DataRange1d:t(\"../models/ranges/data_range1d\"),FactorRange:t(\"../models/ranges/factor_range\"),Range1d:t(\"../models/ranges/range1d\"),GlyphRenderer:t(\"../models/renderers/glyph_renderer\"),AjaxDataSource:t(\"../models/sources/ajax_data_source\"),ColumnDataSource:t(\"../models/sources/column_data_source\"),GeoJSONDataSource:t(\"../models/sources/geojson_data_source\"),AdaptiveTicker:t(\"../models/tickers/adaptive_ticker\"),BasicTicker:t(\"../models/tickers/basic_ticker\"),CategoricalTicker:t(\"../models/tickers/categorical_ticker\"),CompositeTicker:t(\"../models/tickers/composite_ticker\"),ContinuousTicker:t(\"../models/tickers/continuous_ticker\"),DatetimeTicker:t(\"../models/tickers/datetime_ticker\"),DaysTicker:t(\"../models/tickers/days_ticker\"),FixedTicker:t(\"../models/tickers/fixed_ticker\"),LogTicker:t(\"../models/tickers/log_ticker\"),MonthsTicker:t(\"../models/tickers/months_ticker\"),SingleIntervalTicker:t(\"../models/tickers/single_interval_ticker\"),YearsTicker:t(\"../models/tickers/years_ticker\"),TileRenderer:t(\"../models/tiles/tile_renderer\"),TileSource:t(\"../models/tiles/tile_source\"),TMSTileSource:t(\"../models/tiles/tms_tile_source\"),WMTSTileSource:t(\"../models/tiles/wmts_tile_source\"),QUADKEYTileSource:t(\"../models/tiles/quadkey_tile_source\"),BBoxTileSource:t(\"../models/tiles/bbox_tile_source\"),DynamicImageRenderer:t(\"../models/tiles/dynamic_image_renderer\"),ImageSource:t(\"../models/tiles/image_source\"),Toolbar:t(\"../models/tools/toolbar\"),ToolbarBox:t(\"../models/tools/toolbar_box\"),ButtonTool:t(\"../models/tools/button_tool\"),ActionTool:t(\"../models/tools/actions/action_tool\"),SaveTool:t(\"../models/tools/actions/save_tool\"),UndoTool:t(\"../models/tools/actions/undo_tool\"),RedoTool:t(\"../models/tools/actions/redo_tool\"),ResetTool:t(\"../models/tools/actions/reset_tool\"),HelpTool:t(\"../models/tools/actions/help_tool\"),BoxSelectTool:t(\"../models/tools/gestures/box_select_tool\"),BoxZoomTool:t(\"../models/tools/gestures/box_zoom_tool\"),GestureTool:t(\"../models/tools/gestures/gesture_tool\"),LassoSelectTool:t(\"../models/tools/gestures/lasso_select_tool\"),PanTool:t(\"../models/tools/gestures/pan_tool\"),PolySelectTool:t(\"../models/tools/gestures/poly_select_tool\"),SelectTool:t(\"../models/tools/gestures/select_tool\"),ResizeTool:t(\"../models/tools/gestures/resize_tool\"),TapTool:t(\"../models/tools/gestures/tap_tool\"),WheelZoomTool:t(\"../models/tools/gestures/wheel_zoom_tool\"),CrosshairTool:t(\"../models/tools/inspectors/crosshair_tool\"),HoverTool:t(\"../models/tools/inspectors/hover_tool\"),InspectTool:t(\"../models/tools/inspectors/inspect_tool\")}},{\"../models/annotations/arrow\":\"models/annotations/arrow\",\"../models/annotations/arrow_head\":\"models/annotations/arrow_head\",\"../models/annotations/box_annotation\":\"models/annotations/box_annotation\",\"../models/annotations/label\":\"models/annotations/label\",\"../models/annotations/label_set\":\"models/annotations/label_set\",\"../models/annotations/legend\":\"models/annotations/legend\",\"../models/annotations/poly_annotation\":\"models/annotations/poly_annotation\",\"../models/annotations/span\":\"models/annotations/span\",\"../models/annotations/title\":\"models/annotations/title\",\"../models/annotations/tooltip\":\"models/annotations/tooltip\",\"../models/axes/categorical_axis\":\"models/axes/categorical_axis\",\"../models/axes/datetime_axis\":\"models/axes/datetime_axis\",\"../models/axes/linear_axis\":\"models/axes/linear_axis\",\"../models/axes/log_axis\":\"models/axes/log_axis\",\"../models/callbacks/customjs\":\"models/callbacks/customjs\",\"../models/callbacks/open_url\":\"models/callbacks/open_url\",\"../models/canvas/canvas\":\"models/canvas/canvas\",\"../models/canvas/cartesian_frame\":\"models/canvas/cartesian_frame\",\"../models/formatters/basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"../models/formatters/categorical_tick_formatter\":\"models/formatters/categorical_tick_formatter\",\"../models/formatters/datetime_tick_formatter\":\"models/formatters/datetime_tick_formatter\",\"../models/formatters/func_tick_formatter\":\"models/formatters/func_tick_formatter\",\"../models/formatters/log_tick_formatter\":\"models/formatters/log_tick_formatter\",\"../models/formatters/numeral_tick_formatter\":\"models/formatters/numeral_tick_formatter\",\"../models/formatters/printf_tick_formatter\":\"models/formatters/printf_tick_formatter\",\"../models/glyphs/annular_wedge\":\"models/glyphs/annular_wedge\",\"../models/glyphs/annulus\":\"models/glyphs/annulus\",\"../models/glyphs/arc\":\"models/glyphs/arc\",\"../models/glyphs/bezier\":\"models/glyphs/bezier\",\"../models/glyphs/circle\":\"models/glyphs/circle\",\"../models/glyphs/ellipse\":\"models/glyphs/ellipse\",\"../models/glyphs/gear\":\"models/glyphs/gear\",\"../models/glyphs/image\":\"models/glyphs/image\",\"../models/glyphs/image_rgba\":\"models/glyphs/image_rgba\",\"../models/glyphs/image_url\":\"models/glyphs/image_url\",\"../models/glyphs/line\":\"models/glyphs/line\",\"../models/glyphs/multi_line\":\"models/glyphs/multi_line\",\"../models/glyphs/oval\":\"models/glyphs/oval\",\"../models/glyphs/patch\":\"models/glyphs/patch\",\"../models/glyphs/patches\":\"models/glyphs/patches\",\"../models/glyphs/quad\":\"models/glyphs/quad\",\"../models/glyphs/quadratic\":\"models/glyphs/quadratic\",\"../models/glyphs/ray\":\"models/glyphs/ray\",\"../models/glyphs/rect\":\"models/glyphs/rect\",\"../models/glyphs/segment\":\"models/glyphs/segment\",\"../models/glyphs/text\":\"models/glyphs/text\",\"../models/glyphs/wedge\":\"models/glyphs/wedge\",\"../models/grids/grid\":\"models/grids/grid\",\"../models/layouts/column\":\"models/layouts/column\",\"../models/layouts/row\":\"models/layouts/row\",\"../models/layouts/spacer\":\"models/layouts/spacer\",\"../models/layouts/widget_box\":\"models/layouts/widget_box\",\"../models/mappers/categorical_mapper\":\"models/mappers/categorical_mapper\",\"../models/mappers/grid_mapper\":\"models/mappers/grid_mapper\",\"../models/mappers/linear_color_mapper\":\"models/mappers/linear_color_mapper\",\"../models/mappers/linear_mapper\":\"models/mappers/linear_mapper\",\"../models/mappers/log_color_mapper\":\"models/mappers/log_color_mapper\",\"../models/mappers/log_mapper\":\"models/mappers/log_mapper\",\"../models/markers/asterisk\":\"models/markers/asterisk\",\"../models/markers/circle_cross\":\"models/markers/circle_cross\",\"../models/markers/circle_x\":\"models/markers/circle_x\",\"../models/markers/cross\":\"models/markers/cross\",\"../models/markers/diamond\":\"models/markers/diamond\",\"../models/markers/diamond_cross\":\"models/markers/diamond_cross\",\"../models/markers/inverted_triangle\":\"models/markers/inverted_triangle\",\"../models/markers/square\":\"models/markers/square\",\"../models/markers/square_cross\":\"models/markers/square_cross\",\"../models/markers/square_x\":\"models/markers/square_x\",\"../models/markers/triangle\":\"models/markers/triangle\",\"../models/markers/x\":\"models/markers/x\",\"../models/plots/gmap_plot\":\"models/plots/gmap_plot\",\"../models/plots/plot\":\"models/plots/plot\",\"../models/ranges/data_range1d\":\"models/ranges/data_range1d\",\"../models/ranges/factor_range\":\"models/ranges/factor_range\",\"../models/ranges/range1d\":\"models/ranges/range1d\",\"../models/renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"../models/sources/ajax_data_source\":\"models/sources/ajax_data_source\",\"../models/sources/column_data_source\":\"models/sources/column_data_source\",\"../models/sources/geojson_data_source\":\"models/sources/geojson_data_source\",\"../models/tickers/adaptive_ticker\":\"models/tickers/adaptive_ticker\",\"../models/tickers/basic_ticker\":\"models/tickers/basic_ticker\",\"../models/tickers/categorical_ticker\":\"models/tickers/categorical_ticker\",\"../models/tickers/composite_ticker\":\"models/tickers/composite_ticker\",\"../models/tickers/continuous_ticker\":\"models/tickers/continuous_ticker\",\"../models/tickers/datetime_ticker\":\"models/tickers/datetime_ticker\",\"../models/tickers/days_ticker\":\"models/tickers/days_ticker\",\"../models/tickers/fixed_ticker\":\"models/tickers/fixed_ticker\",\"../models/tickers/log_ticker\":\"models/tickers/log_ticker\",\"../models/tickers/months_ticker\":\"models/tickers/months_ticker\",\"../models/tickers/single_interval_ticker\":\"models/tickers/single_interval_ticker\",\"../models/tickers/years_ticker\":\"models/tickers/years_ticker\",\"../models/tiles/bbox_tile_source\":\"models/tiles/bbox_tile_source\",\"../models/tiles/dynamic_image_renderer\":\"models/tiles/dynamic_image_renderer\",\"../models/tiles/image_source\":\"models/tiles/image_source\",\"../models/tiles/quadkey_tile_source\":\"models/tiles/quadkey_tile_source\",\"../models/tiles/tile_renderer\":\"models/tiles/tile_renderer\",\"../models/tiles/tile_source\":\"models/tiles/tile_source\",\"../models/tiles/tms_tile_source\":\"models/tiles/tms_tile_source\",\"../models/tiles/wmts_tile_source\":\"models/tiles/wmts_tile_source\",\"../models/tools/actions/action_tool\":\"models/tools/actions/action_tool\",\"../models/tools/actions/help_tool\":\"models/tools/actions/help_tool\",\"../models/tools/actions/redo_tool\":\"models/tools/actions/redo_tool\",\"../models/tools/actions/reset_tool\":\"models/tools/actions/reset_tool\",\"../models/tools/actions/save_tool\":\"models/tools/actions/save_tool\",\"../models/tools/actions/undo_tool\":\"models/tools/actions/undo_tool\",\"../models/tools/button_tool\":\"models/tools/button_tool\",\"../models/tools/gestures/box_select_tool\":\"models/tools/gestures/box_select_tool\",\"../models/tools/gestures/box_zoom_tool\":\"models/tools/gestures/box_zoom_tool\",\"../models/tools/gestures/gesture_tool\":\"models/tools/gestures/gesture_tool\",\"../models/tools/gestures/lasso_select_tool\":\"models/tools/gestures/lasso_select_tool\",\"../models/tools/gestures/pan_tool\":\"models/tools/gestures/pan_tool\",\"../models/tools/gestures/poly_select_tool\":\"models/tools/gestures/poly_select_tool\",\"../models/tools/gestures/resize_tool\":\"models/tools/gestures/resize_tool\",\"../models/tools/gestures/select_tool\":\"models/tools/gestures/select_tool\",\"../models/tools/gestures/tap_tool\":\"models/tools/gestures/tap_tool\",\"../models/tools/gestures/wheel_zoom_tool\":\"models/tools/gestures/wheel_zoom_tool\",\"../models/tools/inspectors/crosshair_tool\":\"models/tools/inspectors/crosshair_tool\",\"../models/tools/inspectors/hover_tool\":\"models/tools/inspectors/hover_tool\",\n", " \"../models/tools/inspectors/inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"../models/tools/toolbar\":\"models/tools/toolbar\",\"../models/tools/toolbar_box\":\"models/tools/toolbar_box\",\"../models/transforms/interpolator\":\"models/transforms/interpolator\",\"../models/transforms/jitter\":\"models/transforms/jitter\",\"../models/transforms/linear_interpolator\":\"models/transforms/linear_interpolator\",\"../models/transforms/step_interpolator\":\"models/transforms/step_interpolator\",\"../models/transforms/transform\":\"models/transforms/transform\",\"./selection_manager\":\"common/selection_manager\",\"./selector\":\"common/selector\",\"./tool_events\":\"common/tool_events\"}],\"common/selection_manager\":[function(t,e,r){var n,o,i,s,a,l,u,c=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;s=t(\"underscore\"),n=t(\"../core/has_props\"),l=t(\"../core/logging\").logger,i=t(\"./selector\"),a=t(\"./hittest\"),u=t(\"../core/properties\"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type=\"SelectionManager\",e.internal({source:[u.Any]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.selectors={},this.inspectors={},this.last_inspection_was_empty={}},e.prototype.select=function(t,e,r,n,o){var i,s,a;return null==o&&(o=!1),a=this.get(\"source\"),a!==e.mget(\"data_source\")&&l.warn(\"select called with mis-matched data sources\"),i=e.hit_test(r),null!=i&&(s=this._get_selector(e),s.update(i,n,o),this.get(\"source\").set({selected:s.get(\"indices\")}),a.trigger(\"select\"),a.trigger(\"select-\"+e.mget(\"id\")),!i.is_empty())},e.prototype.inspect=function(t,e,r,n){var o,i,s,a;if(a=this.get(\"source\"),a!==e.mget(\"data_source\")&&l.warn(\"inspect called with mis-matched data sources\"),o=e.hit_test(r),null!=o){if(s=e.model.id,o.is_empty()){if(null==this.last_inspection_was_empty[s]&&(this.last_inspection_was_empty[s]=!1),this.last_inspection_was_empty[s])return;this.last_inspection_was_empty[s]=!0}else this.last_inspection_was_empty[s]=!1;return i=this._get_inspector(e),i.update(o,!0,!1,!0),this.get(\"source\").set({inspected:i.get(\"indices\")},{silent:!0}),a.trigger(\"inspect\",o,t,e,a,n),a.trigger(\"inspect\"+e.mget(\"id\"),o,t,e,a,n),!o.is_empty()}return!1},e.prototype.clear=function(t){var e,r,n,o;if(null!=t)o=this._get_selector(t),o.clear();else{r=this.selectors;for(e in r)n=r[e],n.clear()}return this.get(\"source\").set({selected:a.create_hit_test_result()})},e.prototype._get_selector=function(t){return s.setdefault(this.selectors,t.model.id,new i),this.selectors[t.model.id]},e.prototype._get_inspector=function(t){return s.setdefault(this.inspectors,t.model.id,new i),this.inspectors[t.model.id]},e}(n),e.exports=o},{\"../core/has_props\":\"core/has_props\",\"../core/logging\":\"core/logging\",\"../core/properties\":\"core/properties\",\"./hittest\":\"common/hittest\",\"./selector\":\"common/selector\",underscore:\"underscore\"}],\"common/selector\":[function(t,e,r){var n,o,i,s,a,l,u=function(t,e){function r(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},c={}.hasOwnProperty;i=t(\"underscore\"),n=t(\"../core/has_props\"),s=t(\"./hittest\"),a=t(\"../core/logging\").logger,l=t(\"../core/properties\"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type=\"Selector\",e.prototype.update=function(t,e,r,n){return null==n&&(n=!1),this.set(\"timestamp\",new Date,{silent:n}),this.set(\"final\",e,{silent:n}),r&&(t[\"0d\"].indices=i.union(this.get(\"indices\")[\"0d\"].indices,t[\"0d\"].indices),t[\"0d\"].glyph=this.get(\"indices\")[\"0d\"].glyph||t[\"0d\"].glyph,t[\"1d\"].indices=i.union(this.get(\"indices\")[\"1d\"].indices,t[\"1d\"].indices),t[\"2d\"].indices=i.union(this.get(\"indices\")[\"2d\"].indices,t[\"2d\"].indices)),this.set(\"indices\",t,{silent:n})},e.prototype.clear=function(){return this.set(\"timestamp\",new Date),this.set(\"final\",!0),this.set(\"indices\",s.create_hit_test_result())},e.internal({indices:[l.Any,function(){return s.create_hit_test_result()}],\"final\":[l.Boolean],timestamp:[l.Any]}),e}(n),e.exports=o},{\"../core/has_props\":\"core/has_props\",\"../core/logging\":\"core/logging\",\"../core/properties\":\"core/properties\",\"./hittest\":\"common/hittest\",underscore:\"underscore\"}],\"common/tool_events\":[function(t,e,r){var n,o,i,s,a,l=function(t,e){function r(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},u={}.hasOwnProperty;i=t(\"underscore\"),n=t(\"../model\"),s=t(\"../core/logging\").logger,a=t(\"../core/properties\"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"ToolEvents\",e.define({geometries:[a.Array,[]]}),e}(n),e.exports={Model:o}},{\"../core/logging\":\"core/logging\",\"../core/properties\":\"core/properties\",\"../model\":\"model\",underscore:\"underscore\"}],\"common/ui_events\":[function(t,e,r){var n,o,i,s,a,l,u=function(t,e){function r(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},c={}.hasOwnProperty;n=t(\"jquery\"),o=t(\"backbone\"),i=t(\"hammerjs\"),l=t(\"jquery-mousewheel\")(n),a=t(\"../core/logging\").logger,s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._hammer_element()},e.prototype._hammer_element=function(){var t;return t=this.get(\"hit_area\"),this.hammer=new i(t[0]),this.hammer.get(\"doubletap\").recognizeWith(\"tap\"),this.hammer.get(\"tap\").requireFailure(\"doubletap\"),this.hammer.get(\"doubletap\").dropRequireFailure(\"tap\"),this.hammer.on(\"doubletap\",function(t){return function(e){return t._doubletap(e)}}(this)),this.hammer.on(\"tap\",function(t){return function(e){return t._tap(e)}}(this)),this.hammer.on(\"press\",function(t){return function(e){return t._press(e)}}(this)),this.hammer.get(\"pan\").set({direction:i.DIRECTION_ALL}),this.hammer.on(\"panstart\",function(t){return function(e){return t._pan_start(e)}}(this)),this.hammer.on(\"pan\",function(t){return function(e){return t._pan(e)}}(this)),this.hammer.on(\"panend\",function(t){return function(e){return t._pan_end(e)}}(this)),this.hammer.get(\"pinch\").set({enable:!0}),this.hammer.on(\"pinchstart\",function(t){return function(e){return t._pinch_start(e)}}(this)),this.hammer.on(\"pinch\",function(t){return function(e){return t._pinch(e)}}(this)),this.hammer.on(\"pinchend\",function(t){return function(e){return t._pinch_end(e)}}(this)),this.hammer.get(\"rotate\").set({enable:!0}),this.hammer.on(\"rotatestart\",function(t){return function(e){return t._rotate_start(e)}}(this)),this.hammer.on(\"rotate\",function(t){return function(e){return t._rotate(e)}}(this)),this.hammer.on(\"rotateend\",function(t){return function(e){return t._rotate_end(e)}}(this)),t.mousemove(function(t){return function(e){return t._mouse_move(e)}}(this)),t.mouseenter(function(t){return function(e){return t._mouse_enter(e)}}(this)),t.mouseleave(function(t){return function(e){return t._mouse_exit(e)}}(this)),t.mousewheel(function(t){return function(e,r){return t._mouse_wheel(e,r)}}(this)),n(document).keydown(function(t){return function(e){return t._key_down(e)}}(this)),n(document).keyup(function(t){return function(e){return t._key_up(e)}}(this))},e.prototype.register_tool=function(t){var e,r,n;return e=t.model.event_type,r=t.model.id,n=t.model.type,null==e?void a.debug(\"Button tool: \"+n):(\"pan\"===e||\"pinch\"===e||\"rotate\"===e?(a.debug(\"Registering tool: \"+n+\" for event '\"+e+\"'\"),null!=t[\"_\"+e+\"_start\"]&&t.listenTo(this,e+\":start:\"+r,t[\"_\"+e+\"_start\"]),t[\"_\"+e]&&t.listenTo(this,e+\":\"+r,t[\"_\"+e]),t[\"_\"+e+\"_end\"]&&t.listenTo(this,e+\":end:\"+r,t[\"_\"+e+\"_end\"])):\"move\"===e?(a.debug(\"Registering tool: \"+n+\" for event '\"+e+\"'\"),null!=t._move_enter&&t.listenTo(this,\"move:enter\",t._move_enter),t.listenTo(this,\"move\",t._move),null!=t._move_exit&&t.listenTo(this,\"move:exit\",t._move_exit)):(a.debug(\"Registering tool: \"+n+\" for event '\"+e+\"'\"),t.listenTo(this,e+\":\"+r,t[\"_\"+e])),null!=t._keydown&&(a.debug(\"Registering tool: \"+n+\" for event 'keydown'\"),t.listenTo(this,\"keydown\",t._keydown)),null!=t._keyup&&(a.debug(\"Registering tool: \"+n+\" for event 'keyup'\"),t.listenTo(this,\"keyup\",t._keyup)),null!=t._doubletap?(a.debug(\"Registering tool: \"+n+\" for event 'doubletap'\"),t.listenTo(this,\"doubletap\",t._doubletap)):void 0)},e.prototype._trigger=function(t,e){var r,n,o,i;if(i=this.get(\"toolbar\"),n=t.split(\":\")[0],o=i.get(\"gestures\"),r=o[n].active,null!=r)return this._trigger_event(t,r,e)},e.prototype._trigger_event=function(t,e,r){if(e.get(\"active\")===!0)return\"scroll\"===t&&(r.preventDefault(),r.stopPropagation()),this.trigger(t+\":\"+e.id,r)},e.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}},e.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}},e.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger(\"tap\",t)},e.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger(\"doubletap\",t)},e.prototype._press=function(t){return this._bokify_hammer(t),this._trigger(\"press\",t)},e.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)},e.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger(\"pan\",t)},e.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger(\"pan:end\",t)},e.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger(\"pinch:start\",t)},e.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger(\"pinch\",t)},e.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger(\"pinch:end\",t)},e.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger(\"rotate:start\",t)},e.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger(\"rotate\",t)},e.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger(\"rotate:end\",t)},e.prototype._mouse_enter=function(t){return this._bokify_jq(t),this.trigger(\"move:enter\",t)},e.prototype._mouse_move=function(t){return this._bokify_jq(t),this.trigger(\"move\",t)},e.prototype._mouse_exit=function(t){return this._bokify_jq(t),this.trigger(\"move:exit\",t)},e.prototype._mouse_wheel=function(t,e){return this._bokify_jq(t),t.bokeh.delta=e,this._trigger(\"scroll\",t)},e.prototype._key_down=function(t){return this.trigger(\"keydown\",t)},e.prototype._key_up=function(t){return this.trigger(\"keyup\",t)},e}(o.Model),e.exports=s},{\"../core/logging\":\"core/logging\",backbone:\"backbone\",hammerjs:\"hammerjs/hammer\",jquery:\"jquery\",\"jquery-mousewheel\":\"jquery-mousewheel\"}],\"core/bokeh_view\":[function(t,e,r){var n,o,i,s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t(\"underscore\"),n=t(\"backbone\"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){if(!i.has(t,\"id\"))return this.id=i.uniqueId(\"BokehView\")},e.prototype.bind_bokeh_events=function(){},e.prototype.remove=function(){var t,r,n;if(i.has(this,\"eventers\")){t=this.eventers;for(r in t)a.call(t,r)&&(n=t[r],n.off(null,null,this))}return this.trigger(\"remove\",this),e.__super__.remove.call(this)},e.prototype.mget=function(){return this.model.get.apply(this.model,arguments)},e.prototype.mset=function(){return this.model.set.apply(this.model,arguments)},e}(n.View),e.exports=o},{backbone:\"backbone\",underscore:\"underscore\"}],\"core/enums\":[function(t,e,r){e.exports={AngleUnits:[\"deg\",\"rad\"],Dimension:[\"width\",\"height\"],Direction:[\"clock\",\"anticlock\"],FontStyle:[\"normal\",\"italic\",\"bold\"],LineCap:[\"butt\",\"round\",\"square\"],LineJoin:[\"miter\",\"round\",\"bevel\"],Location:[\"above\",\"below\",\"left\",\"right\"],LegendLocation:[\"top_left\",\"top_center\",\"top_right\",\"left_center\",\"center\",\"right_center\",\"bottom_left\",\"bottom_center\",\"bottom_right\"],Orientation:[\"vertical\",\"horizontal\"],RenderLevel:[\"image\",\"underlay\",\"glyph\",\"annotation\",\"overlay\",\"tool\"],RenderMode:[\"canvas\",\"css\"],Side:[\"left\",\"right\"],SpatialUnits:[\"screen\",\"data\"],StartEnd:[\"start\",\"end\"],TextAlign:[\"left\",\"right\",\"center\"],TextBaseline:[\"top\",\"middle\",\"bottom\",\"alphabetic\",\"hanging\",\"ideographic\"],DistributionTypes:[\"uniform\",\"normal\"],TransformStepModes:[\"after\",\"before\",\"center\"],SizingMode:[\"stretch_both\",\"scale_width\",\"scale_height\",\"scale_both\",\"fixed\"]}},{}],\"core/has_props\":[function(t,e,r){var n,o,i,s,a,l,u,c=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,p=[].slice;n=t(\"jquery\"),s=t(\"underscore\"),o=t(\"backbone\"),a=t(\"./logging\").logger,l=t(\"./property_mixins\"),u=t(\"./util/refs\"),i=function(t){function e(t,e){var r,n,o,i,a,l;this.document=null,r=t||{},e||(e={}),this.cid=s.uniqueId(\"c\"),this.attributes={},this.properties={},i=this.props;for(o in i){if(a=i[o],l=a.type,n=a.default_value,null==l)throw new Error(\"undefined property type for \"+this.type+\".\"+o);this.properties[o]=new l({obj:this,attr:o,default_value:n})}e.parse&&(r=this.parse(r,e)||{}),this._set_after_defaults={},this.set(r,e),this.changed={},this._computed={},s.has(r,this.idAttribute)||(this.id=s.uniqueId(this.type),this.attributes[this.idAttribute]=this.id),e.defer_initialization||this.initialize.apply(this,arguments)}return c(e,t),e.prototype.props={},e.prototype.mixins=[],e.define=function(t){var e,r,n;n=[];for(e in t)r=t[e],n.push(function(t){return function(e,r){var n,o,i,a,l;if(null!=t.prototype.props[e])throw new Error(\"attempted to redefine property '\"+t.name+\".\"+e+\"'\");if(null!=t.prototype[e]&&\"url\"!==e)throw new Error(\"attempted to redefine attribute '\"+t.name+\".\"+e+\"'\");return Object.defineProperty(t.prototype,e,{get:function(){return this.get(e)},set:function(t){return this.set(e,t)}},{configurable:!1,enumerable:!0}),l=r[0],n=r[1],o=r[2],a={type:l,default_value:n,internal:null!=o&&o},i=s.clone(t.prototype.props),i[e]=a,t.prototype.props=i}}(this)(e,r));return n},e.internal=function(t){var e,r,n,o;e={},r=function(t){return function(t,r){var n,o;return o=r[0],n=r[1],e[t]=[o,n,!0]}}(this);for(n in t)o=t[n],r(n,o);return this.define(e)},e.mixin=function(){var t,e;return e=1<=arguments.length?p.call(arguments,0):[],this.define(l.create(e)),t=this.prototype.mixins.concat(e),this.prototype.mixins=t},e.mixins=function(t){return this.mixin.apply(this,t)},e.override=function(t,e){var r,n,o;s.isString(t)?(n={},n[r]=e):n=t,o=[];for(r in n)e=n[r],o.push(function(t){return function(e,r){var n,o;if(o=t.prototype.props[e],null==o)throw new Error(\"attempted to override nonexistent '\"+t.name+\".\"+e+\"'\");return n=s.clone(t.prototype.props),n[e]=s.extend({},o,{default_value:r}),t.prototype.props=n}}(this)(r,e));return o},e.prototype.toString=function(){return this.type+\"(\"+this.id+\")\"},e.prototype.destroy=function(t){return e.__super__.destroy.call(this,t),this.stopListening()},e.prototype.set=function(t,r,n){var o,i,a,l,u;s.isObject(t)||null===t?(o=t,n=r):(o={},o[t]=r);for(t in o)if(h.call(o,t)){if(u=o[t],a=t,\"id\"!==a&&!this.props[a])throw new Error(this.type+\".set('\"+a+\"'): \"+a+\" wasn't declared\");null!=n&&n.defaults||(this._set_after_defaults[t]=!0)}if(!s.isEmpty(o)){i={};for(t in o)r=o[t],i[t]=this.get(t);if(e.__super__.set.call(this,o,n),null==(null!=n?n.silent:void 0)){l=[];for(t in o)r=o[t],l.push(this._tell_document_about_change(t,i[t],this.get(t)));return l}}},e.prototype.add_dependencies=function(t,e,r){var n,o,i,a,l;for(s.isArray(r)||(r=[r]),a=this._computed[t],a.dependencies=a.dependencies.concat({obj:e,fields:r}),l=[],o=0,i=r.length;o0&&(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.get(\"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,h,p,_;c=t(\"underscore\"),n=t(\"backbone\"),_=t(\"kiwi\"),u=_.Variable,i=_.Expression,o=_.Constraint,s=_.Operator,l=_.Strength,h=function(t){return function(e){return function(){var e;return e=Object.create(i.prototype),i.apply(e,arguments),new o(e,t)}}(this)},p=function(t){return function(){var e,r,n,s;for(r=[null],n=0,s=arguments.length;ne;r=0<=e?++t:--t)o.push(i);return o}();return null!=this.spec.transform&&(o=this.spec.transform.v_compute(o)),o},e.prototype._init=function(t){var e,r,n,o;if(null==t&&(t=!0),o=this.get(\"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.get(\"attr\"),null==e)throw new Error(\"missing property attr\");if(r=o.get(e),B.isUndefined(r)&&(n=this.get(\"default_value\"),r=function(){switch(!1){case!B.isUndefined(n):return null;case!B.isArray(n):return B.clone(n);case!B.isFunction(n):return n(o);default:return n}}(),o.set(e,r,{silent:!0,defaults:!0})),B.isArray(r)?this.spec={value:r}:B.isObject(r)&&1===B.size(B.pick.apply(null,[r].concat(this.specifiers)))?this.spec=r:this.spec={value:r},null!=this.spec.field&&!B.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\")},e}(u.Model),V=function(t,e){var r;return r=function(r){function n(){return n.__super__.constructor.apply(this,arguments)}return Y(n,r),n.prototype.toString=function(){\n", " return t+\"(obj: \"+this.get(obj).id+\", spec: \"+JSON.stringify(this.spec)+\")\"},n.prototype.validate=function(r){var n;if(!e(r))throw n=this.get(\"attr\"),new Error(t+\" property '\"+n+\"' given invalid value: \"+r)},n}(A)},a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(V(\"Any\",function(t){return!0})),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(V(\"Array\",function(t){return B.isArray(t)||t instanceof Float64Array})),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(V(\"Bool\",B.isBoolean)),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(V(\"Color\",function(t){return null!=U[t.toLowerCase()]||\"#\"===t.substring(0,1)||$(t)})),w=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(V(\"Instance\",function(t){return null!=t.properties})),S=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(V(\"Number\",function(t){return B.isNumber(t)||B.isBoolean(t)})),q=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(V(\"String\",B.isString)),v=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(q),L=function(t,e){var r;return r=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Y(r,e),r.prototype.toString=function(){return t+\"(obj: \"+this.get(obj).id+\", spec: \"+JSON.stringify(this.spec)+\")\"},r}(V(t,function(t){return X.call(e,t)>=0}))},n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"Anchor\",G.LegendLocation)),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"AngleUnits\",G.AngleUnits)),d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(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}(L(\"Direction\",G.Direction)),_=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"Dimension\",G.Dimension)),x=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"FontStyle\",G.FontStyle)),k=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"LineCap\",G.LineCap)),T=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"LineJoin\",G.LineJoin)),M=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"LegendLocation\",G.LegendLocation)),j=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"Location\",G.Location)),P=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"Orientation\",G.Orientation)),I=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"TextAlign\",G.TextAlign)),D=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"TextBaseline\",G.TextBaseline)),E=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"RenderLevel\",G.RenderLevel)),C=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"RenderMode\",G.RenderMode)),O=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"SizingMode\",G.SizingMode)),N=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"SpatialUnits\",G.SpatialUnits)),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"Distribution\",G.DistributionTypes)),F=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(e,t),e}(L(\"TransformStepMode\",G.TransformStepModes)),H=function(t,e,r){var n;return n=function(n){function o(){return o.__super__.constructor.apply(this,arguments)}return Y(o,n),o.prototype.toString=function(){return t+\"(obj: \"+this.get(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,X.call(e,n)<0)throw new Error(t+\" units must be one of \"+e+\", given invalid value: \"+n)},o}(S)},o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Y(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;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/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/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/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\"}],document:[function(t,e,r){var n,o,i,s,a,l,u,c,h,p,_,d,f,m,g,y,v,b,x,w,M,k=function(t,e){function r(){this.constructor=t}for(var n in e)T.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},T={}.hasOwnProperty,j=[].indexOf||function(t){for(var e=0,r=this.length;e0;)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(!(j.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&&(k=t._events_to_sync_objects(o[a],x[a],r,T),n=n.concat(k));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)},j=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\",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger(\"activate\",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass(\"ui-sortable-helper\"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,o,s,r=this.options,a=!1;for(this.position=this._generatePosition(e),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-e.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||t.contains(this.placeholder[0],o)||\"semi-dynamic\"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===s?\"down\":\"up\",\"pointer\"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger(\"change\",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger(\"sort\",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),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,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,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 e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger(\"deactivate\",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger(\"out\",null,this._uiHash(this)),this.containers[e].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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||\"id\")||\"\").match(e.expression||/(.+)[\\-=_](.+)/);i&&n.push((e.key||i[1]+\"[]\")+\"=\"+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+\"=\"),n.join(\"&\")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||\"id\")||\"\")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,s=t.left,r=s+t.width,a=t.top,l=a+t.height,u=this.offset.click.top,c=this.offset.click.left,h=\"x\"===this.options.axis||n+u>a&&n+us&&e+ct[this.floating?\"width\":\"height\"]?p:s0?\"down\":\"up\")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?\"right\":\"left\")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,o,s,r,a=[],l=[],u=this._connectWith();if(u&&e)for(n=u.length-1;n>=0;n--)for(s=t(u[n]),o=s.length-1;o>=0;o--)r=t.data(s[o],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),r]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(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 t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(\":data(\"+this.widgetName+\"-item)\");this.items=t.grep(this.items,function(t){for(var i=0;i=0;i--)for(o=t(d[i]),n=o.length-1;n>=0;n--)s=t.data(o[n],this.widgetFullName),s&&s!==this&&!s.options.disabled&&(h.push([t.isFunction(s.options.items)?s.options.items.call(s.element[0],e,{item:this.currentItem}):t(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?t(this.options.toleranceElement,n.item):n.item,e||(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(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),o=t(\"<\"+n+\">\",e.document[0]).addClass(i||e.currentItem[0].className+\" ui-sortable-placeholder\").removeClass(\"ui-sortable-helper\");return\"tr\"===n?e.currentItem.children().each(function(){t(\" \",e.document[0]).attr(\"colspan\",t(this).attr(\"colspan\")||1).appendTo(o)}):\"img\"===n&&o.attr(\"src\",e.currentItem.attr(\"src\")),i||o.css(\"visibility\",\"hidden\"),o},update:function(t,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css(\"paddingTop\")||0,10)-parseInt(e.currentItem.css(\"paddingBottom\")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css(\"paddingLeft\")||0,10)-parseInt(e.currentItem.css(\"paddingRight\")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(e){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(!t.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&t.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\",e,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\",e,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--)t.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),e.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(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],\"down\"===this.direction?e.item[0]:e.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(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}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&&!e&&o.push(function(t){this._trigger(\"receive\",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(\".ui-sortable-helper\")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push(function(t){this._trigger(\"update\",t,this._uiHash())}),this!==this.currentContainer&&(e||(o.push(function(t){this._trigger(\"remove\",t,this._uiHash())}),o.push(function(t){return function(e){t._trigger(\"receive\",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger(\"update\",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||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(!e){for(this._trigger(\"beforeStop\",t,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 e={},i=this.element;return t.each([\"min\",\"max\",\"step\"],function(t,n){var o=i.attr(n);void 0!==o&&o.length&&(e[n]=o)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:\"_stop\",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger(\"change\",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},\"mousedown .ui-spinner-button\":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(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(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,e)},\"mouseup .ui-spinner-button\":\"_stop\",\"mouseenter .ui-spinner-button\":function(e){if(t(e.currentTarget).hasClass(\"ui-state-active\"))return this._start(e)!==!1&&void this._repeat(null,t(e.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,e)},\"mouseleave .ui-spinner-button\":\"_stop\"},_draw:function(){var t=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=t.find(\".ui-spinner-button\").attr(\"tabIndex\",-1).button().removeClass(\"ui-corner-all\"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return\"\"},_buttonHtml:function(){return\"\"},_start:function(t){return!(!this.spinning&&this._trigger(\"start\",t)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger(\"spin\",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(\".\");return i===-1?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t\",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(i,n){var o,s,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if(\"string\"==typeof i)if(a={},o=i.split(\".\"),i=o.shift(),o.length){for(s=a[i]=t.widget.extend({},this.options[i]),r=0;r').appendTo(document.body),this.$element.on(\"click.dismiss.bk-bs.modal\",n.proxy(function(t){t.target===t.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\"),!t)return;i?this.$backdrop.one(n.support.transition.end,t).emulateTransitionEnd(150):t()}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,t).emulateTransitionEnd(150):t()):t&&t()};var s=n.fn.modal;n.fn.modal=function(t,e){return this.each(function(){var i=n(this),s=i.data(\"bk-bs.modal\"),r=n.extend({},o.DEFAULTS,i.data(),\"object\"==typeof t&&t);s||i.data(\"bk-bs.modal\",s=new o(this,r)),\"string\"==typeof t?s[t](e):r.show&&s.show(e)})},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(t){var e=n(this),i=e.attr(\"href\"),o=n(e.attr(\"data-bk-bs-target\")||i&&i.replace(/.*(?=#[^\\s]+$)/,\"\")),s=o.data(\"bk-bs.modal\")?\"toggle\":n.extend({remote:!/#/.test(i)&&i},o.data(),e.data());e.is(\"a\")&&t.preventDefault(),o.modal(s,this).one(\"hide\",function(){e.is(\":visible\")&&e.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(t,e,i){var n=t(\"jquery\"),o=function(t){this.element=n(t)};o.prototype.show=function(){var t=this.element,e=t.closest(\"ul:not(.bk-bs-dropdown-menu)\"),i=t.data(\"bk-bs-target\");if(i||(i=t.attr(\"href\"),i=i&&i.replace(/.*(?=#[^\\s]*$)/,\"\")),!t.parent(\"li\").hasClass(\"bk-bs-active\")){var o=e.find(\".bk-bs-active:last a\")[0],s=n.Event(\"show.bk-bs.tab\",{relatedTarget:o});if(t.trigger(s),!s.isDefaultPrevented()){var r=n(i);this.activate(t.parent(\"li\"),e),this.activate(r,r.parent(),function(){t.trigger({type:\"shown.bk-bs.tab\",relatedTarget:o})})}}},o.prototype.activate=function(t,e,i){function o(){s.removeClass(\"bk-bs-active\").find(\"> .bk-bs-dropdown-menu > .bk-bs-active\").removeClass(\"bk-bs-active\"),t.addClass(\"bk-bs-active\"),r?(t[0].offsetWidth,t.addClass(\"bk-bs-in\")):t.removeClass(\"bk-bs-fade\"),t.parent(\".bk-bs-dropdown-menu\")&&t.closest(\"li.bk-bs-dropdown\").addClass(\"bk-bs-active\"),i&&i()}var s=e.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(t){return this.each(function(){var e=n(this),i=e.data(\"bk-bs.tab\");i||e.data(\"bk-bs.tab\",i=new o(this)),\"string\"==typeof t&&i[t]()})},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(t){t.preventDefault(),n(this).tab(\"show\")})},{jquery:\"jquery\"}],\"jqrangeslider/jQDateRangeSlider\":[function(t,e,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=t(\"jquery\");t(\"./jQRangeSlider\"),e.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(t,e){(\"defaultValues\"===t||\"bounds\"===t)&&\"undefined\"!=typeof e&&null!==e&&this._isValidDate(e.min)&&this._isValidDate(e.max)?n.ui.rangeSlider.prototype._setOption.apply(this,[t,{min:e.min.valueOf(),max:e.max.valueOf()}]):n.ui.rangeSlider.prototype._setOption.apply(this,this._toArray(arguments))},_handleType:function(){return\"dateRangeSliderHandle\"},option:function(t){if(\"bounds\"===t||\"defaultValues\"===t){var e=n.ui.rangeSlider.prototype.option.apply(this,arguments);return{min:new Date(e.min),max:new Date(e.max)}}return n.ui.rangeSlider.prototype.option.apply(this,this._toArray(arguments))},_defaultFormatter:function(t){var e=t.getMonth()+1,i=t.getDate();return\"\"+t.getFullYear()+\"-\"+(e<10?\"0\"+e:e)+\"-\"+(i<10?\"0\"+i:i)},_getFormatter:function(){var t=this.options.formatter;return this.options.formatter!==!1&&null!==this.options.formatter||(t=this._defaultFormatter),function(t){return function(e){return t(new Date(e))}}(t)},values:function(t,e){var i=null;return i=this._isValidDate(t)&&this._isValidDate(e)?n.ui.rangeSlider.prototype.values.apply(this,[t.valueOf(),e.valueOf()]):n.ui.rangeSlider.prototype.values.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},min:function(t){return this._isValidDate(t)?new Date(n.ui.rangeSlider.prototype.min.apply(this,[t.valueOf()])):new Date(n.ui.rangeSlider.prototype.min.apply(this))},max:function(t){return this._isValidDate(t)?new Date(n.ui.rangeSlider.prototype.max.apply(this,[t.valueOf()])):new Date(n.ui.rangeSlider.prototype.max.apply(this))},bounds:function(t,e){var i;return i=this._isValidDate(t)&&this._isValidDate(e)?n.ui.rangeSlider.prototype.bounds.apply(this,[t.valueOf(),e.valueOf()]):n.ui.rangeSlider.prototype.bounds.apply(this,this._toArray(arguments)),{min:new Date(i.min),max:new Date(i.max)}},_isValidDate:function(t){return\"undefined\"!=typeof t&&t instanceof Date},_toArray:function(t){return Array.prototype.slice.call(t)}})},{\"./jQRangeSlider\":\"jqrangeslider/jQRangeSlider\",jquery:\"jquery\"}],\"jqrangeslider/jQRangeSlider\":[function(t,e,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=t(\"jquery\");t(\"jquery-ui/core\"),t(\"jquery-ui/widget\"),t(\"jquery-ui/mouse\"),t(\"jquery-mousewheel\"),e.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 t=this;this._resizeProxy=function(e){t.resize(e)},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(t,e){this._setWheelOption(t,e),this._setArrowsOption(t,e),this._setLabelsOption(t,e),this._setLabelsDurations(t,e),this._setFormatterOption(t,e),this._setBoundsOption(t,e),this._setRangeOption(t,e),this._setStepOption(t,e),this._setScalesOption(t,e),this._setEnabledOption(t,e),this._setPositionningOption(t,e)},_validProperty:function(t,e,i){return null===t||\"undefined\"==typeof t[e]?i:t[e]},_setStepOption:function(t,e){\"step\"===t&&(this.options.step=e,this._leftHandle(\"option\",\"step\",e),this._rightHandle(\"option\",\"step\",e),this._changed(!0))},_setScalesOption:function(t,e){\"scales\"===t&&(e===!1||null===e?(this.options.scales=!1,this._destroyRuler()):e instanceof Array&&(this.options.scales=e,this._updateRuler()))},_setRangeOption:function(t,e){\"range\"===t&&(this._bar(\"option\",\"range\",e),this.options.range=this._bar(\"option\",\"range\"),this._changed(!0))},_setBoundsOption:function(t,e){\"bounds\"===t&&\"undefined\"!=typeof e.min&&\"undefined\"!=typeof e.max&&this.bounds(e.min,e.max)},_setWheelOption:function(t,e){\"wheelMode\"!==t&&\"wheelSpeed\"!==t||(this._bar(\"option\",t,e),this.options[t]=this._bar(\"option\",t))},_setLabelsOption:function(t,e){if(\"valueLabels\"===t){if(\"hide\"!==e&&\"show\"!==e&&\"change\"!==e)return;this.options.valueLabels=e,\"hide\"!==e?(this._createLabels(),this._leftLabel(\"update\"),this._rightLabel(\"update\")):this._destroyLabels()}},_setFormatterOption:function(t,e){\"formatter\"===t&&null!==e&&\"function\"==typeof e&&\"hide\"!==this.options.valueLabels&&(this._leftLabel(\"option\",\"formatter\",e),this.options.formatter=this._rightLabel(\"option\",\"formatter\",e))},_setArrowsOption:function(t,e){\"arrows\"!==t||e!==!0&&e!==!1||e===this.options.arrows||(e===!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):e===!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(t,e){if(\"durationIn\"===t||\"durationOut\"===t||\"delayOut\"===t){if(parseInt(e,10)!==e)return;null!==this.labels.left&&this._leftLabel(\"option\",t,e),null!==this.labels.right&&this._rightLabel(\"option\",t,e),this.options[t]=e}},_setEnabledOption:function(t,e){\"enabled\"===t&&this.toggle(e)},_setPositionningOption:function(t,e){\"symmetricPositionning\"===t&&(this._rightHandle(\"option\",t,e),this.options[t]=this._leftHandle(\"option\",t,e))},_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(t){return n(\"
\")[this._handleType()](t).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(t){var e,i=n(\"
\").append(\"
\").addClass(\"bk-ui-rangeSlider-\"+t+\"Arrow\").css(\"position\",\"absolute\").css(t,0).appendTo(this.element);return e=\"right\"===t?n.proxy(this._scrollRightClick,this):n.proxy(this._scrollLeftClick,this),i.bind(\"mousedown touchstart\",e),i},_proxy:function(t,e,i){var n=Array.prototype.slice.call(i);return t&&t[e]?t[e].apply(t,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(t,e){return e===this.rightHandle&&(t-=e.outerWidth()),t*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-e.outerWidth(!0))+this.options.bounds.min},_trigger:function(t){var e=this;setTimeout(function(){e.element.trigger(t,{label:e.element,values:e.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(t){t===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger(\"valuesChanged\"),t!==!0&&this._trigger(\"userValuesChanged\"),this._valuesChanged=!1),t===!0&&this._reactivateLabels()},_updateValues:function(){var t=this._leftHandle(\"value\"),e=this._rightHandle(\"value\"),i=this._min(t,e),n=this._max(t,e),o=i!==this._values.min||n!==this._values.max;return this._values.min=this._min(t,e),this._values.max=this._max(t,e),o},_min:function(t,e){return Math.min(t,e)},_max:function(t,e){return Math.max(t,e)},_createLabel:function(t,e){var i;return null===t?(i=this._getLabelConstructorParameters(t,e),t=n(\"
\").appendTo(this.element)[this._labelType()](i)):(i=this._getLabelRefreshParameters(t,e),t[this._labelType()](i)),t},_getLabelConstructorParameters:function(t,e){return{handle:e,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(t){return Math.round(t)},_destroyLabel:function(t){return null!==t&&(t[this._labelType()](\"destroy\"),t.remove(),t=null),t},_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(t){return!!this.options.enabled&&(t.preventDefault(),this._bar(\"startScroll\"),this._bindStopScroll(),void this._continueScrolling(\"scrollRight\",4*this._stepRatio(),1))},_continueScrolling:function(t,e,i,n){if(!this.options.enabled)return!1;this._bar(t,i),n=n||5,n--;var o=this,s=16,r=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===n&&(e>s?e=Math.max(s,e/1.5):i=Math.min(r,2*i),n=5),o._continueScrolling(t,e,i,n)},e)},_scrollLeftClick:function(t){return!!this.options.enabled&&(t.preventDefault(),this._bar(\"startScroll\"),this._bindStopScroll(),void this._continueScrolling(\"scrollLeft\",4*this._stepRatio(),1))},_bindStopScroll:function(){var t=this;this._stopScrollHandle=function(e){e.preventDefault(),t._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(t,e){var i;if(\"undefined\"!=typeof t&&\"undefined\"!=typeof e){if(!this._initialized)return this._values.min=t,this._values.max=e,this._values;this._deactivateLabels(),i=this._bar(\"values\",t,e),this._changed(!0),this._reactivateLabels()}else i=this._bar(\"values\",t,e);return i},min:function(t){return this._values.min=this.values(t,this._values.max).min,this._values.min},max:function(t){return this._values.max=this.values(this._values.min,t).max,this._values.max},bounds:function(t,e){return this._isValidValue(t)&&this._isValidValue(e)&&t0&&t.which!=i.which)&&!n(t.target).is(i.not)&&(!i.handle||n(t.target).closest(i.handle,t.currentTarget).length)&&(r.touched=\"touchstart\"==t.type?this:null,i.propagates=1,i.mousedown=this,i.interactions=[r.interaction(this,i)],i.target=t.target,i.pageX=t.pageX,i.pageY=t.pageY,i.dragging=null,e=r.hijack(t,\"draginit\",i),i.propagates))return e=r.flatten(e),e&&e.length&&(i.interactions=[],n.each(e,function(){i.interactions.push(r.interaction(this,i))})),i.propagates=i.interactions.length,i.drop!==!1&&s.drop&&s.drop.handler(t,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(t,e){var i=n(t)[e.relative?\"position\":\"offset\"]()||{top:0,left:0};return{drag:t,callback:new r.callback,droppable:[],offset:i}},handler:function(t){var e=t.data;switch(t.type){case!e.dragging&&\"touchmove\":t.preventDefault();case!e.dragging&&\"mousemove\":if(Math.pow(t.pageX-e.pageX,2)+Math.pow(t.pageY-e.pageY,2)0?void n.removeData(this,\"suppress.\"+t.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(t,e){if(e){var i=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||null;i&&n.each(l.props,function(e,n){t[n]=i[n]})}return t}};s.draginit=s.dragstart=s.dragend=r},{jquery:\"jquery\"}],jquery_event_drop:[function(t,e,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=t(\"jquery\");t(\"jquery_event_drag\");n.fn.drop=function(t,e,i){var o=\"string\"==typeof t?t:\"\",s=n.isFunction(t)?t:n.isFunction(e)?e:null;return 0!==o.indexOf(\"drop\")&&(o=\"drop\"+o),i=(t==s?e:i)||{},s?this.bind(o,i,s):this.trigger(o)},n.drop=function(t){t=t||{},r.multi=t.multi===!0?1/0:t.multi===!1?1:isNaN(t.multi)?r.multi:t.multi,r.delay=t.delay||r.delay,r.tolerance=n.isFunction(t.tolerance)?t.tolerance:null===t.tolerance?null:r.tolerance,r.mode=t.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(t){var e=n.data(this,r.datakey);e.related+=1},remove:function(){n.data(this,r.datakey).related-=1},setup:function(){if(!n.data(this,r.datakey)){var t={related:0,active:[],anyactive:0,winner:0,location:{}};n.data(this,r.datakey,t),r.targets.push(this)}},teardown:function(){var t=n.data(this,r.datakey)||{};if(!t.related){n.removeData(this,r.datakey);var e=this;r.targets=n.grep(r.targets,function(t){return t!==e})}},handler:function(t,e){var i;if(e)switch(t.type){case\"mousedown\":case\"touchstart\":i=n(r.targets),\"string\"==typeof e.drop&&(i=i.filter(e.drop)),i.each(function(){var t=n.data(this,r.datakey);t.active=[],t.anyactive=0,t.winner=0}),e.droppable=i,s.drag.hijack(t,\"dropinit\",e);break;case\"mousemove\":case\"touchmove\":r.event=t,r.timer||r.tolerate(e);break;case\"mouseup\":case\"touchend\":r.timer=clearTimeout(r.timer),e.propagates&&(s.drag.hijack(t,\"drop\",e),s.drag.hijack(t,\"dropend\",e))}},locate:function(t,e){var i=n.data(t,r.datakey),o=n(t),s=o.offset()||{},a=o.outerHeight(),l=o.outerWidth(),u={elem:t,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=e,i.elem=t),u},contains:function(t,e){return(e[0]||e.left)>=t.left&&(e[0]||e.right)<=t.right&&(e[1]||e.top)>=t.top&&(e[1]||e.bottom)<=t.bottom},modes:{intersect:function(t,e,i){return this.contains(i,[t.pageX,t.pageY])?1e9:this.modes.overlap.apply(this,arguments)},overlap:function(t,e,i){return Math.max(0,Math.min(i.bottom,e.bottom)-Math.max(i.top,e.top))*Math.max(0,Math.min(i.right,e.right)-Math.max(i.left,e.left))},fit:function(t,e,i){return this.contains(i,e)?1:0},middle:function(t,e,i){return this.contains(i,[e.left+.5*e.width,e.top+.5*e.height])?1:0}},sort:function(t,e){return e.winner-t.winner||t.index-e.index},tolerate:function(t){var e,i,o,a,l,u,c,h,d=0,p=t.interactions.length,f=[r.event.pageX,r.event.pageY],m=r.tolerance||r.modes[r.mode];do if(h=t.interactions[d]){if(!h)return;h.drop=[],l=[],u=h.droppable.length,m&&(o=r.locate(h.proxy)),e=0;do if(c=h.droppable[e]){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(++e\",g.toolTip):d.updateColumnHeader(g.columnId,\"\",g.toolTip)}function r(t,e){32==t.which&&d.getColumns()[e.cell].id===g.columnId&&(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit()||l(e.row),t.preventDefault(),t.stopImmediatePropagation())}function a(t,e){if(d.getColumns()[e.cell].id===g.columnId&&o(t.target).is(\":checkbox\")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();l(e.row),t.stopPropagation(),t.stopImmediatePropagation()}}function l(t){f[t]?d.setSelectedRows(o.grep(d.getSelectedRows(),function(e){return e!=t})):d.setSelectedRows(d.getSelectedRows().concat(t))}function u(t,e){if(e.column.id==g.columnId&&o(t.target).is(\":checkbox\")){if(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit())return t.preventDefault(),void t.stopImmediatePropagation();if(o(t.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(t,e,i,n,o){return o?f[t]?\"\":\"\":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,t);o.extend(this,{init:e,destroy:i,getColumnDefinition:c})}var o=t(\"jquery\"),s=t(\"../slick.core\");e.exports=n},{\"../slick.core\":\"slick_grid/slick.core\",jquery:\"jquery\"}],\"slick_grid/plugins/slick.rowselectionmodel\":[function(t,e,i){function n(t){function e(e){_=o.extend(!0,{},k,t),g=e,w.subscribe(g.onActiveCellChanged,n(p)),w.subscribe(g.onKeyDown,n(f)),w.subscribe(g.onClick,n(m))}function i(){w.unsubscribeAll()}function n(t){return function(){v||(v=!0,t.apply(this,arguments),v=!1)}}function r(t){for(var e=[],i=0;i=0&&n=0;i--)t[i]===e&&t.splice(i,1)},this.notify=function(e,i,o){i=i||new n,o=o||this;for(var s,r=0;r=this.fromRow&&t<=this.toRow&&e>=this.fromCell&&e<=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 t=null;this.isActive=function(e){return e?t===e:null!==t},this.activate=function(e){if(e!==t){if(null!==t)throw\"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController\";if(!e.commitCurrentEdit)throw\"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()\";if(!e.cancelCurrentEdit)throw\"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()\";t=e}},this.deactivate=function(e){if(t!==e)throw\"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one\";t=null},this.commitCurrentEdit=function(){return!t||t.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!t||t.cancelCurrentEdit()}}var h=(t(\"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(t){return this.value===t.value&&this.count===t.count&&this.collapsed===t.collapsed&&this.title===t.title},u.prototype=new a,e.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 t=0;te.maxWidth&&(e.width=e.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(t){return $(t.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(t){plugins.unshift(t),t.init(self)}function unregisterPlugin(t){for(var e=plugins.length;e>=0;e--)if(plugins[e]===t){plugins[e].destroy&&plugins[e].destroy(),plugins.splice(e,1);break}}function setSelectionModel(t){selectionModel&&(selectionModel.onSelectedRangesChanged.unsubscribe(handleSelectedRangesChanged),selectionModel.destroy&&selectionModel.destroy()),selectionModel=t,selectionModel&&(selectionModel.init(self),selectionModel.onSelectedRangesChanged.subscribe(handleSelectedRangesChanged))}function getSelectionModel(){return selectionModel}function getCanvasNode(){return $canvas[0]}function measureScrollbar(){var t=$(\"
\").appendTo(\"body\"),e={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),e}function getHeadersWidth(){for(var t=0,e=0,i=columns.length;eviewportW-scrollbarDimensions.width),$headerRowSpacer.width(canvasWidth+(viewportHasVScroll?scrollbarDimensions.width:0)),(canvasWidth!=e||t)&&applyColumnWidths()}function disableSelection(t){t&&t.jquery&&t.attr(\"unselectable\",\"on\").css(\"MozUserSelect\",\"none\").bind(\"selectstart.ui\",function(){return!1})}function getMaxSupportedCssHeight(){for(var t=1e6,e=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=$(\"
\").appendTo(document.body);;){var n=2*t;if(i.css(\"height\",n),n>e||i.height()!==n)break;t=n}return i.remove(),t}function bindAncestorScrollEvents(){for(var t=$canvas[0];(t=t.parentNode)!=document.body&&null!=t;)if(t==$viewport[0]||t.scrollWidth!=t.clientWidth||t.scrollHeight!=t.clientHeight){var e=$(t);$boundAncestors=$boundAncestors?$boundAncestors.add(e):e,e.bind(\"scroll.\"+uid,handleActiveCellPositionChange)}}function unbindAncestorScrollEvents(){$boundAncestors&&($boundAncestors.unbind(\"scroll.\"+uid),$boundAncestors=null)}function updateColumnHeader(t,e,i){if(initialized){var n=getColumnIndex(t);if(null!=n){var o=columns[n],s=$headers.children().eq(n);s&&(void 0!==e&&(columns[n].name=e),void 0!==i&&(columns[n].toolTip=i),trigger(self.onBeforeHeaderCellDestroy,{node:s[0],column:o}),s.attr(\"title\",i||\"\").children().eq(0).html(e),trigger(self.onHeaderCellRendered,{node:s[0],column:o}))}}}function getHeaderRow(){return $headerRow[0]}function getHeaderRowColumn(t){var e=getColumnIndex(t),i=$headerRow.children().eq(e);return i&&i[0]}function createColumnHeaders(){function t(){$(this).addClass(\"bk-ui-state-hover\")}function e(){$(this).removeClass(\"bk-ui-state-hover\")}$headers.find(\".bk-slick-header-column\").each(function(){var t=$(this).data(\"column\");t&&trigger(self.onBeforeHeaderCellDestroy,{node:this,column:t})}),$headers.empty(),$headers.width(getHeadersWidth()),$headerRow.find(\".bk-slick-headerrow-column\").each(function(){var t=$(this).data(\"column\");t&&trigger(self.onBeforeHeaderRowCellDestroy,{node:this,column:t})}),$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\",t).on(\"mouseleave\",e),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(t){if(t.metaKey=t.metaKey||t.ctrlKey,!$(t.target).hasClass(\"bk-slick-resizable-handle\")){var e=$(t.target).closest(\".bk-slick-header-column\");if(e.length){var i=e.data(\"column\");if(i.sortable){if(!getEditorLock().commitCurrentEdit())return;for(var n=null,o=0;o=l||(t=$(c),$(\"
\").appendTo(c).bind(\"dragstart\",function(t,a){if(!getEditorLock().commitCurrentEdit())return!1;n=t.pageX,$(this).parent().addClass(\"bk-slick-header-column-active\");var l=null,c=null;if(o.each(function(t,e){columns[t].previousWidth=$(e).outerWidth()}),options.forceFitColumns)for(l=0,c=0,e=u+1;e=0;e--)i=columns[e],i.resizable&&(l=Math.max(i.minWidth||0,absoluteColumnMinWidth),c&&i.previousWidth+c=0;e--)i=columns[e],i.resizable&&(c&&i.maxWidth&&i.maxWidth-i.previousWidth
\").appendTo($headers),headerColumnWidthDiff=headerColumnHeightDiff=0,\"border-box\"!=t.css(\"box-sizing\")&&\"border-box\"!=t.css(\"-moz-box-sizing\")&&\"border-box\"!=t.css(\"-webkit-box-sizing\")&&($.each(e,function(e,i){headerColumnWidthDiff+=parseFloat(t.css(i))||0}),$.each(i,function(e,i){headerColumnHeightDiff+=parseFloat(t.css(i))||0})),t.remove();var n=$(\"
\").appendTo($canvas);t=$(\"\").appendTo(n),cellWidthDiff=cellHeightDiff=0,\"border-box\"!=t.css(\"box-sizing\")&&\"border-box\"!=t.css(\"-moz-box-sizing\")&&\"border-box\"!=t.css(\"-webkit-box-sizing\")&&($.each(e,function(e,i){cellWidthDiff+=parseFloat(t.css(i))||0}),$.each(i,function(e,i){cellHeightDiff+=parseFloat(t.css(i))||0})),n.remove(),absoluteColumnMinWidth=Math.max(headerColumnWidthDiff,cellWidthDiff)}function createCssRules(){$style=$(\"