You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
78 KiB

  1. /*!
  2. * Copyright (c) 2012 - 2018, Anaconda, Inc., and Bokeh Contributors
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without modification,
  6. * are permitted provided that the following conditions are met:
  7. *
  8. * Redistributions of source code must retain the above copyright notice,
  9. * this list of conditions and the following disclaimer.
  10. *
  11. * Redistributions in binary form must reproduce the above copyright notice,
  12. * this list of conditions and the following disclaimer in the documentation
  13. * and/or other materials provided with the distribution.
  14. *
  15. * Neither the name of Anaconda nor the names of any contributors
  16. * may be used to endorse or promote products derived from this software
  17. * without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  20. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  23. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  24. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  25. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  27. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  28. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  29. * THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. !function(t,e){var n;n=t.Bokeh,function(t,e,i){if(null!=n)return n.register_plugin(t,{"models/widgets/abstract_button":410,"models/widgets/abstract_icon":411,"models/widgets/abstract_slider":412,"models/widgets/autocomplete_input":413,"models/widgets/button":414,"models/widgets/button_group":415,"models/widgets/checkbox_button_group":416,"models/widgets/checkbox_group":417,"models/widgets/color_picker":418,"models/widgets/control":419,"models/widgets/date_picker":420,"models/widgets/date_range_slider":421,"models/widgets/date_slider":422,"models/widgets/div":423,"models/widgets/dropdown":424,"models/widgets/index":425,"models/widgets/input_group":426,"models/widgets/input_widget":427,"models/widgets/main":428,"models/widgets/markup":429,"models/widgets/multiselect":430,"models/widgets/paragraph":431,"models/widgets/password_input":432,"models/widgets/pretext":433,"models/widgets/radio_button_group":434,"models/widgets/radio_group":435,"models/widgets/range_slider":436,"models/widgets/selectbox":437,"models/widgets/slider":438,"models/widgets/spinner":439,"models/widgets/text_input":440,"models/widgets/textarea_input":441,"models/widgets/toggle":442,"models/widgets/widget":453},428);throw new Error("Cannot find Bokeh. You have to load it prior to loading plugins.")}({410:function(t,e,n){var i=t(400),o=t(18),r=t(5),s=t(4),a=t(419),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.icon_views={}},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.render()})},e.prototype.remove=function(){s.remove_views(this.icon_views),t.prototype.remove.call(this)},e.prototype._render_button=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.button.apply(void 0,[{type:"button",disabled:this.model.disabled,class:["bk-btn","bk-btn-"+this.model.button_type]}].concat(t))},e.prototype.render=function(){var e=this;t.prototype.render.call(this),this.button_el=this._render_button(this.model.label),this.button_el.addEventListener("click",function(){return e.click()});var n=this.model.icon;if(null!=n){s.build_views(this.icon_views,[n],{parent:this});var i=this.icon_views[n.id];i.render(),r.prepend(this.button_el,i.el,r.nbsp())}this.group_el=r.div({class:"bk-btn-group"},this.button_el),this.el.appendChild(this.group_el)},e.prototype.click=function(){null!=this.model.callback&&this.model.callback.execute(this.model)},e}(a.ControlView);n.AbstractButtonView=l;var u=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.initClass=function(){this.prototype.type="AbstractButton",this.define({label:[o.String,"Button"],icon:[o.Instance],button_type:[o.ButtonType,"default"],callback:[o.Any]})},e}(a.Control);n.AbstractButton=u,u.initClass()},411:function(t,e,n){var i=t(400),o=t(62),r=t(6),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(r.DOMView);n.AbstractIconView=s;var a=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.initClass=function(){this.prototype.type="AbstractIcon"},e}(o.Model);n.AbstractIcon=a,a.initClass()},412:function(t,e,n){var i=t(400),o=t(444),r=t(18),s=t(5),a=t(24),l=t(28),u=t(419),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),Object.defineProperty(e.prototype,"noUiSlider",{get:function(){return this.slider_el.noUiSlider},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this._init_callback()},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this);var n=this.model.properties,i=n.callback,o=n.callback_policy,r=n.callback_throttle;this.on_change([i,o,r],function(){return e._init_callback()});var s=this.model.properties,a=s.start,l=s.end,u=s.value,c=s.step;this.on_change([a,l,u,c],function(){var t=e._calc_to(),n=t.start,i=t.end,o=t.value,r=t.step;e.noUiSlider.updateOption
  32. /*! nouislider - 10.1.0 - 2017-07-28 17:11:18 */var i;i=function(){"use strict";var t="10.1.0";function e(t){t.preventDefault()}function n(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function i(t,e,n){n>0&&(s(t,e),setTimeout(function(){a(t,e)},n))}function o(t){return Array.isArray(t)?t:[t]}function r(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function s(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function a(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(t){var e=void 0!==window.pageXOffset,n="CSS1Compat"===(t.compatMode||""),i=e?window.pageXOffset:n?t.documentElement.scrollLeft:t.body.scrollLeft,o=e?window.pageYOffset:n?t.documentElement.scrollTop:t.body.scrollTop;return{x:i,y:o}}function u(t,e){return 100/(e-t)}function c(t,e){return 100*e/(t[1]-t[0])}function h(t,e){for(var n=1;t>=e[n];)n+=1;return n}function d(t,e,n){if(n>=t.slice(-1)[0])return 100;var i,o,r,s,a=h(n,t);return i=t[a-1],o=t[a],r=e[a-1],s=e[a],r+function(t,e){return c(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}([i,o],n)/u(r,s)}function p(t,e,n,i){if(100===i)return i;var o,r,s=h(i,t);return n?(o=t[s-1],r=t[s],i-o>(r-o)/2?r:o):e[s-1]?t[s-1]+function(t,e){return Math.round(t/e)*e}(i-t[s-1],e[s-1]):i}function f(e,i,o){var r;if("number"==typeof i&&(i=[i]),"[object Array]"!==Object.prototype.toString.call(i))throw new Error("noUiSlider ("+t+"): 'range' contains invalid value.");if(!n(r="min"===e?0:"max"===e?100:parseFloat(e))||!n(i[0]))throw new Error("noUiSlider ("+t+"): 'range' value isn't numeric.");o.xPct.push(r),o.xVal.push(i[0]),r?o.xSteps.push(!isNaN(i[1])&&i[1]):isNaN(i[1])||(o.xSteps[0]=i[1]),o.xHighestCompleteStep.push(0)}function m(t,e,n){if(!e)return!0;n.xSteps[t]=c([n.xVal[t],n.xVal[t+1]],e)/u(n.xPct[t],n.xPct[t+1]);var i=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],o=Math.ceil(Number(i.toFixed(3))-1),r=n.xVal[t]+n.xNumSteps[t]*o;n.xHighestCompleteStep[t]=r}function g(t,e,n){this.xPct=[],this.xVal=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push([t[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(t,e){return t[0][0]-e[0][0]}):o.sort(function(t,e){return t[0]-e[0]}),i=0;i<o.length;i++)f(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)m(i,this.xNumSteps[i],this)}g.prototype.getMargin=function(e){var n=this.xNumSteps[0];if(n&&e/n%1!=0)throw new Error("noUiSlider ("+t+"): 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&c(this.xVal,e)},g.prototype.toStepping=function(t){return t=d(this.xVal,this.xPct,t)},g.prototype.fromStepping=function(t){return function(t,e,n){if(n>=100)return t.slice(-1)[0];var i,o,r,s,a=h(n,e);return i=t[a-1],o=t[a],r=e[a-1],s=e[a],function(t,e){return e*(t[1]-t[0])/100+t[0]}([i,o],(n-r)*u(r,s))}(this.xVal,this.xPct,t)},g.prototype.getStep=function(t){return t=p(this.xPct,this.xSteps,this.snap,t)},g.prototype.getNearbySteps=function(t){var e=h(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},g.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(r);return Math.max.apply(null,t)},g.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var v={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function _(e){if(function(t){return"object"==typeof t&&"function"==typeof t.to&&"function"==typeof t.from}(e))return!0;throw new Error("noUiSlider ("+t+"): 'format' requires 'to' and 'from' methods.")}function y(e,i){if(!n(i))throw new Error("noUiSlider ("+t+"): 'step' is not numeric.");e.singleStep=i}function b(e,n){if("object"!=typeof n||Array.isArray(n))throw new Error("noUiSlider ("+t+"): 'range' is not an ob
  33. // solution lifted from date.js (MIT license): https://github.com/datejs/Datejs
  34. return t%4==0&&t%100!=0||t%400==0},d=function(t,e){return[31,h(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},p=function(t){u(t)&&t.setHours(0,0,0,0)},f=function(t,e){return t.getTime()===e.getTime()},m=function(t,e,n){var i,o;for(i in e)(o=void 0!==t[i])&&"object"==typeof e[i]&&null!==e[i]&&void 0===e[i].nodeName?u(e[i])?n&&(t[i]=new Date(e[i].getTime())):l(e[i])?n&&(t[i]=e[i].slice(0)):t[i]=m({},e[i],n):!n&&o||(t[i]=e[i]);return t},g=function(t,e,n){var i;document.createEvent?((i=document.createEvent("HTMLEvents")).initEvent(e,!0,!1),i=m(i,n),t.dispatchEvent(i)):document.createEventObject&&(i=document.createEventObject(),i=m(i,n),t.fireEvent("on"+e,i))},v=function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t},_={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},y=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},b=function(t){var e=[],n="false";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';e.push("is-outside-current-month"),t.enableSelectionDaysInNextAndPreviousMonths||e.push("is-selection-disabled")}return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&(e.push("is-selected"),n="true"),t.hasEvent&&e.push("has-event"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+t.year+'" data-pika-month="'+t.month+'" data-pika-day="'+t.day+'">'+t.day+"</button></td>"},w=function(t,e,n){var i=new Date(n,e,t),o=function(t){t.setHours(0,0,0,0);var e=t.getDate(),n=t.getDay(),i=function(t){return(t+7-1)%7};t.setDate(e+3-i(n));var o=new Date(t.getFullYear(),0,4),r=(t.getTime()-o.getTime())/864e5;return 1+Math.round((r-3+i(o.getDay()))/7)}(i);return'<td class="pika-week">'+o+"</td>"},x=function(t,e,n,i){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(i?" is-selected":"")+'">'+(e?t.reverse():t).join("")+"</tr>"},k=function(t,e,n,i,o,r){var s,a,u,c,h,d=t._o,p=n===d.minYear,f=n===d.maxYear,m='<div id="'+r+'" class="pika-title" role="heading" aria-live="assertive">',g=!0,v=!0;for(u=[],s=0;s<12;s++)u.push('<option value="'+(n===o?s-e:12+s-e)+'"'+(s===i?' selected="selected"':"")+(p&&s<d.minMonth||f&&s>d.maxMonth?' disabled="disabled"':"")+">"+d.i18n.months[s]+"</option>");for(c='<div class="pika-label">'+d.i18n.months[i]+'<select class="pika-select pika-select-month" tabindex="-1">'+u.join("")+"</select></div>",l(d.yearRange)?(s=d.yearRange[0],a=d.yearRange[1]+1):(s=n-d.yearRange,a=1+n+d.yearRange),u=[];s<a&&s<=d.maxYear;s++)s>=d.minYear&&u.push('<option value="'+s+'"'+(s===n?' selected="selected"':"")+">"+s+"</option>");return h='<div class="pika-label">'+n+d.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+u.join("")+"</select></div>",d.showMonthAfterYear?m+=h+c:m+=c+h,p&&(0===i||d.minMonth>=i)&&(g=!1),f&&(11===i||d.maxMonth<=i)&&(v=!1),0===e&&(m+='<button class="pika-prev'+(g?"":"
  35. //# sourceMappingURL=bokeh-widgets.min.js.map