mirror of https://github.com/Aidaho12/haproxy-wi
86 lines
654 KiB
JavaScript
86 lines
654 KiB
JavaScript
![]() |
/*!
|
||
|
* Copyright (c) 2012, Anaconda, Inc.
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
* Redistribution and use in source and binary forms, with or without modification,
|
||
|
* are permitted provided that the following conditions are met:
|
||
|
*
|
||
|
* Redistributions of source code must retain the above copyright notice,
|
||
|
* this list of conditions and the following disclaimer.
|
||
|
*
|
||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||
|
* this list of conditions and the following disclaimer in the documentation
|
||
|
* and/or other materials provided with the distribution.
|
||
|
*
|
||
|
* Neither the name of Anaconda nor the names of any contributors
|
||
|
* may be used to endorse or promote products derived from this software
|
||
|
* without specific prior written permission.
|
||
|
*
|
||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/
|
||
|
!function(t,e){var o,s,r,a,l;t.Bokeh=(o=[function(t,e,i){var n=t(148),r=t(32);i.overrides={};var o=r.clone(n);i.Models=function(t){var e=i.overrides[t]||o[t];if(null==e)throw new Error("Model '"+t+"' does not exist. This could be due to a widget\n or a custom model not being registered before first usage.");return e},i.Models.register=function(t,e){i.overrides[t]=e},i.Models.unregister=function(t){delete i.overrides[t]},i.Models.register_models=function(t,e,i){if(void 0===e&&(e=!1),null!=t)for(var n in t){var r=t[n];e||!o.hasOwnProperty(n)?o[n]=r:null!=i?i(n):console.warn("Model '"+n+"' was already registered")}},i.register_models=i.Models.register_models,i.Models.registered_names=function(){return Object.keys(o)},i.index={}},function(t,e,o){var s=t(326),a=t(14),l=t(50),h=t(269),c=t(270),u=t(2);o.DEFAULT_SERVER_WEBSOCKET_URL="ws://localhost:5006/ws",o.DEFAULT_SESSION_ID="default";var _=0,p=function(){function t(t,e,i,n,r){void 0===t&&(t=o.DEFAULT_SERVER_WEBSOCKET_URL),void 0===e&&(e=o.DEFAULT_SESSION_ID),void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=null),this.url=t,this.id=e,this.args_string=i,this._on_have_session_hook=n,this._on_closed_permanently_hook=r,this._number=_++,this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this._receiver=new c.Receiver,a.logger.debug("Creating websocket "+this._number+" to '"+this.url+"' session '"+this.id+"'")}return t.prototype.connect=function(){var i=this;if(this.closed_permanently)return s.Promise.reject(new Error("Cannot connect() a closed ClientConnection"));if(null!=this.socket)return s.Promise.reject(new Error("Already connected"));this._pending_replies={},this._current_handler=null;try{var t=this.url+"?bokeh-protocol-version=1.0&bokeh-session-id="+this.id;return null!=this.args_string&&0<this.args_string.length&&(t+="&"+this.args_string),this.socket=new WebSocket(t),new s.Promise(function(t,e){i.socket.binaryType="arraybuffer",i.socket.onopen=function(){return i._on_open(t,e)},i.socket.onmessage=function(t){return i._on_message(t)},i.socket.onclose=function(t){return i._on_close(t)},i.socket.onerror=function(){return i._on_error(e)}})}catch(t){return a.logger.error("websocket creation failed to url: "+this.url),a.logger.error(" - "+t),s.Promise.reject(t)}},t.prototype.close=function(){this.closed_permanently||(a.logger.debug("Permanently closing websocket connection "+this._number),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,"close method called on ClientConnection "+this._number),this.session._connection_closed(),null!=this._on_closed_permanently_hook&&(this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null))},t.prototype._schedule_reconnect=function(t){var e=this;setTimeout(function(){e.closed_permanently||a.logger.info("Websocket connection "+e._number+" disconnected, will not attempt to reconnect")},t)},t.prototype.send=function(t){if(null==this.socket)throw new Error("not connected so cannot send "+t);t.send(this.socket)},t.prototype.send_with_reply=function(i){var n=this,t=new s.Promise(function(t,e){n._pending_replies[i.msgid()]=[t,e],n.send(i)});return t.then(function(t){if("ERROR"===t.msgtype())throw new Error("Error reply "+t.content.text);return t},function(t){throw t})},t.prototype._pull_doc_json=function(){var t=h.Message.create("PULL-DOC-REQ",{}),e=this.send_with_reply(t);return e.then(function(t){if(!("doc"in t.content))throw new Error("No 'doc' field in PULL-DOC-REPLY");return t.content.doc},function(t){throw t})},t.prototype._repull_session_doc=function(){var r=this;null==this.session?a.logger.debug("Pulling session for first time"):a.logger.debug("Repulling session"),this._pull_doc_json().then(function(t){if(null==r.session)if(r.closed_permanently)a.logger.debug("Got new document after connection was already closed");else{var e=l.Document.from_json(t),i=l.Document._compute_patch_since_json(t,e);if(0<i.events.length){a.logger.debug("Sending "+i.events.length+" changes from model construction back to ser
|
||
|
// 13. If IsConstructor(C) is true, then
|
||
|
;s<r;){var a=e[s];o[s]=n?void 0===i?n(a,s):n.call(i,a,s):a,s+=1}return o.length=r,o}))},function(t,e,i){var n=t(387);n.__exportStar(t(269),i),n.__exportStar(t(270),i)},function(t,e,i){var n=t(38),r=function(){function s(t,e,i){this.header=t,this.metadata=e,this.content=i,this.buffers=[]}return s.assemble=function(t,e,i){var n=JSON.parse(t),r=JSON.parse(e),o=JSON.parse(i);return new s(n,r,o)},s.prototype.assemble_buffer=function(t,e){var i=null!=this.header.num_buffers?this.header.num_buffers:0;if(i<=this.buffers.length)throw new Error("too many buffers received, expecting #{nb}");this.buffers.push([t,e])},s.create=function(t,e,i){void 0===i&&(i={});var n=s.create_header(t);return new s(n,e,i)},s.create_header=function(t){return{msgid:n.uniqueId(),msgtype:t}},s.prototype.complete=function(){return!(null==this.header||null==this.metadata||null==this.content||"num_buffers"in this.header&&this.buffers.length!==this.header.num_buffers)},s.prototype.send=function(t){var e=null!=this.header.num_buffers?this.header.num_buffers:0;if(0<e)throw new Error("BokehJS only supports receiving buffers, not sending");var i=JSON.stringify(this.header),n=JSON.stringify(this.metadata),r=JSON.stringify(this.content);t.send(i),t.send(n),t.send(r)},s.prototype.msgid=function(){return this.header.msgid},s.prototype.msgtype=function(){return this.header.msgtype},s.prototype.reqid=function(){return this.header.reqid},s.prototype.problem=function(){return"msgid"in this.header?"msgtype"in this.header?null:"No msgtype in header":"No msgid in header"},s}();i.Message=r},function(t,e,i){var o=t(269),n=function(){function t(){this.message=null,this._partial=null,this._fragments=[],this._buf_header=null,this._current_consumer=this._HEADER}return t.prototype.consume=function(t){this._current_consumer(t)},t.prototype._HEADER=function(t){this._assume_text(t),this.message=null,this._partial=null,this._fragments=[t],this._buf_header=null,this._current_consumer=this._METADATA},t.prototype._METADATA=function(t){this._assume_text(t),this._fragments.push(t),this._current_consumer=this._CONTENT},t.prototype._CONTENT=function(t){this._assume_text(t),this._fragments.push(t);var e=this._fragments.slice(0,3),i=e[0],n=e[1],r=e[2];this._partial=o.Message.assemble(i,n,r),this._check_complete()},t.prototype._BUFFER_HEADER=function(t){this._assume_text(t),this._buf_header=t,this._current_consumer=this._BUFFER_PAYLOAD},t.prototype._BUFFER_PAYLOAD=function(t){this._assume_binary(t),this._partial.assemble_buffer(this._buf_header,t),this._check_complete()},t.prototype._assume_text=function(t){if(t instanceof ArrayBuffer)throw new Error("Expected text fragment but received binary fragment")},t.prototype._assume_binary=function(t){if(!(t instanceof ArrayBuffer))throw new Error("Expected binary fragment but received text fragment")},t.prototype._check_complete=function(){this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER},t}();i.Receiver=n},function(t,e,i){i.safely=function(t,e){void 0===e&&(e=!1);try{return t()}catch(t){if(function(t){var e=document.createElement("div");e.style.backgroundColor="#f2dede",e.style.border="1px solid #a94442",e.style.borderRadius="4px",e.style.display="inline-block",e.style.fontFamily="sans-serif",e.style.marginTop="5px",e.style.minWidth="200px",e.style.padding="5px 5px 5px 10px",e.classList.add("bokeh-error-box-into-flames");var i=document.createElement("span");i.style.backgroundColor="#a94442",i.style.borderRadius="0px 4px 0px 0px",i.style.color="white",i.style.cursor="pointer",i.style.cssFloat="right",i.style.fontSize="0.8em",i.style.margin="-6px -6px 0px 0px",i.style.padding="2px 5px 4px 5px",i.title="close",i.setAttribute("aria-label","close"),i.appendChild(document.createTextNode("x")),i.addEventListener("click",function(){return s.removeChild(e)});var n=document.createElement("h3");n.style.color="#a94442",n.style.margin="8px 0px 0px 0px",n.style.padding="0px",n.appendChild(document.createTextNode("Bokeh Error"));var r=document.createElement("pre");r.style.whiteSpa
|
||
|
/*!
|
||
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
||
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
||
|
* @license Licensed under MIT license
|
||
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
||
|
* @version v4.2.4+314e4831
|
||
|
*/var i,n;i=this,n=function(){"use strict";function h(t){return"function"==typeof t}var i=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,e=void 0,r=void 0,a=function(t,e){_[n]=t,_[n+1]=e,2===(n+=2)&&(r?r(p):g())},t="undefined"!=typeof window?window:void 0,o=t||{},s=o.MutationObserver||o.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),c="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function u(){var t=setTimeout;return function(){return t(p,1)}}var _=new Array(1e3);function p(){for(var t=0;t<n;t+=2){var e=_[t],i=_[t+1];e(i),_[t]=void 0,_[t+1]=void 0}n=0}var d,f,v,m,g=void 0;function y(t,e){var i=this,n=new this.constructor(w);void 0===n[x]&&I(n);var r=i._state;if(r){var o=arguments[r-1];a(function(){return F(r,n,o,i._result)})}else j(i,n,t,e);return n}function b(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(w);return M(e,t),e}l?g=function(){return process.nextTick(p)}:s?(f=0,v=new s(p),m=document.createTextNode(""),v.observe(m,{characterData:!0}),g=function(){m.data=f=++f%2}):c?((d=new MessageChannel).port1.onmessage=p,g=function(){return d.port2.postMessage(0)}):g=void 0===t&&"function"==typeof L?function(){try{var t=Function("return this")().require("vertx");return void 0!==(e=t.runOnLoop||t.runOnContext)?function(){e(p)}:u()}catch(t){return u()}}():u();var x=Math.random().toString(36).substring(2);function w(){}var k=void 0,S=1,T=2,C={error:null};function A(t){try{return t.then}catch(t){return C.error=t,C}}function E(t,e,i){var n,r,o,s;e.constructor===t.constructor&&i===y&&e.constructor.resolve===b?(o=t,(s=e)._state===S?z(o,s._result):s._state===T?P(o,s._result):j(s,void 0,function(t){return M(o,t)},function(t){return P(o,t)})):i===C?(P(t,C.error),C.error=null):void 0===i?z(t,e):h(i)?(n=e,r=i,a(function(e){var i=!1,t=function(t,e,i,n){try{t.call(e,i,n)}catch(t){return t}}(r,n,function(t){i||(i=!0,n!==t?M(e,t):z(e,t))},function(t){i||(i=!0,P(e,t))},e._label);!i&&t&&(i=!0,P(e,t))},t)):z(t,e)}function M(t,e){var i,n;t===e?P(t,new TypeError("You cannot resolve a promise with itself")):(n=typeof(i=e),null===i||"object"!==n&&"function"!==n?z(t,e):E(t,e,A(e)))}function O(t){t._onerror&&t._onerror(t._result),N(t)}function z(t,e){t._state===k&&(t._result=e,t._state=S,0!==t._subscribers.length&&a(N,t))}function P(t,e){t._state===k&&(t._state=T,t._result=e,a(O,t))}function j(t,e,i,n){var r=t._subscribers,o=r.length;t._onerror=null,r[o]=e,r[o+S]=i,r[o+T]=n,0===o&&t._state&&a(N,t)}function N(t){var e=t._subscribers,i=t._state;if(0!==e.length){for(var n=void 0,r=void 0,o=t._result,s=0;s<e.length;s+=3)n=e[s],r=e[s+i],n?F(i,n,r,o):r(o);t._subscribers.length=0}}function F(t,e,i,n){var r=h(i),o=void 0,s=void 0,a=void 0,l=void 0;if(r){if((o=function(t,e){try{return t(e)}catch(t){return C.error=t,C}}(i,n))===C?(l=!0,s=o.error,o.error=null):a=!0,e===o)return void P(e,new TypeError("A promises callback cannot return that same promise."))}else o=n,a=!0;e._state!==k||(r&&a?M(e,o):l?P(e,s):t===S?z(e,o):t===T&&P(e,o))}var D=0;function I(t){t[x]=D++,t._state=void 0,t._result=void 0,t._subscribers=[]}var R=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(w),this.promise[x]||I(this.promise),i(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&z(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===k&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===b){var r=A(e);if(r===y&&e._state!==k)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(i===B){var o=new i(w);E(o,e,r),this._willSettleAt(o,t)}else this._will
|
||
|
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
||
|
* http://hammerjs.github.io/
|
||
|
*
|
||
|
* Copyright (c) 2016 Jorik Tangelder;
|
||
|
* Licensed under the MIT license */
|
||
|
!function(o,a,t,x){"use strict";var s,l=["","webkit","Moz","MS","ms","o"],e=a.createElement("div"),i="function",h=Math.round,w=Math.abs,k=Date.now;function c(t,e,i){return setTimeout(f(t,i),e)}function n(t,e,i){return!!Array.isArray(t)&&(u(t,i[e],i),!0)}function u(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==x)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function r(n,t,e){var r="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),e=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=o.console&&(o.console.warn||o.console.log);return i&&i.call(o.console,r,e),n.apply(this,arguments)}}s="function"!=typeof Object.assign?function(t){if(t===x||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==x&&null!==n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}:Object.assign;var _=r(function(t,e,i){for(var n=Object.keys(e),r=0;r<n.length;)(!i||i&&t[n[r]]===x)&&(t[n[r]]=e[n[r]]),r++;return t},"extend","Use `assign`."),p=r(function(t,e){return _(t,e,!0)},"merge","Use `assign`.");function d(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&s(n,i)}function f(t,e){return function(){return t.apply(e,arguments)}}function v(t,e){return typeof t==i?t.apply(e&&e[0]||x,e):t}function m(t,e){return t===x?e:t}function g(e,t,i){u(T(t),function(t){e.addEventListener(t,i,!1)})}function y(e,t,i){u(T(t),function(t){e.removeEventListener(t,i,!1)})}function S(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return-1<t.indexOf(e)}function T(t){return t.trim().split(/\s+/g)}function C(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function A(t){return Array.prototype.slice.call(t,0)}function E(t,i,e){for(var n=[],r=[],o=0;o<t.length;){var s=i?t[o][i]:t[o];C(r,s)<0&&n.push(t[o]),r[o]=s,o++}return e&&(n=i?n.sort(function(t,e){return t[i]>e[i]}):n.sort()),n}function M(t,e){for(var i,n,r=e[0].toUpperCase()+e.slice(1),o=0;o<l.length;){if(i=l[o],(n=i?i+r:e)in t)return n;o++}return x}var O=1;function z(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||o}var P="ontouchstart"in o,j=M(o,"PointerEvent")!==x,N=P&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F="touch",D=25,I=1,R=4,B=8,L=1,V=2,G=4,U=8,q=16,Y=V|G,X=U|q,H=Y|X,W=["x","y"],J=["clientX","clientY"];function Q(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){v(e.options.enable,[e])&&i.handler(t)},this.init()}function $(t,e,i){var n=i.pointers.length,r=i.changedPointers.length,o=e&I&&n-r==0,s=e&(R|B)&&n-r==0;i.isFirst=!!o,i.isFinal=!!s,o&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,r=n.length;i.firstInput||(i.firstInput=K(e)),1<r&&!i.firstMultiple?i.firstMultiple=K(e):1===r&&(i.firstMultiple=!1);var o,s,a,l,h,c,u=i.firstInput,_=i.firstMultiple,p=_?_.center:u.center,d=e.center=Z(n);e.timeStamp=k(),e.deltaTime=e.timeStamp-u.timeStamp,e.angle=nt(p,d),e.distance=it(p,d),o=i,a=(s=e).center,l=o.offsetDelta||{},h=o.prevDelta||{},c=o.prevInput||{},s.eventType!==I&&c.eventType!==R||(h=o.prevDelta={x:c.deltaX||0,y:c.deltaY||0},l=o.offsetDelta={x:a.x,y:a.y}),s.deltaX=h.x+(a.x-l.x),s.deltaY=h.y+(a.y-l.y),e.offsetDirection=et(e.deltaX,e.deltaY);var f,v,m,g,y=tt(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=y.x,e.overallVelocityY=y.y,e.overallVelocity=w(y.x)>w(y.y)?y.x:y.y,e.scale=_?(m=_.pointers,it((g=n)[0],g[1],J)/it(m[0],m[1],J)):1,e.rotation=_?(f=_.pointers,nt((v=n)[1],v[0],J)+nt(f[1],f[0],J)):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,r,o,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(e.eventType!=B&&(D<a||s.veloc
|
||
|
/*-----------------------------------------------------------------------------
|
||
|
| Copyright (c) 2014, Nucleic Development Team.
|
||
|
|
|
||
|
| Distributed under the terms of the Modified BSD License.
|
||
|
|
|
||
|
| The full license is in the file COPYING.txt, distributed with this software.
|
||
|
|----------------------------------------------------------------------------*/
|
||
|
function n(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}n(t(356)),n(t(345)),n(t(344)),n(t(349)),n(t(348))},function(t,e,i){var n=t(353);i.createMap=function(t){return new n.AssociativeArray(t)}},function(t,e,i){var g,n,r=t(356),a=t(345),y=t(344),b=t(349),o=t(347),s=t(353),l=function(){function t(){this._cnMap=o.createMap(y.Constraint.Compare),this._rowMap=o.createMap(h.Compare),this._varMap=o.createMap(r.Variable.Compare),this._editMap=o.createMap(r.Variable.Compare),this._infeasibleRows=[],this._objective=new k,this._artificial=null,this._idTick=0}return t.prototype.addConstraint=function(t){var e=this._cnMap.find(t);if(void 0!==e)throw new Error("duplicate constraint");var i=this._createRow(t),n=i.row,r=i.tag,o=this._chooseSubject(n,r);if(o.type()===g.Invalid&&n.allDummies()){if(!x(n.constant())){for(var s=[],a=0,l=t.expression.terms._array;a<l.length;a++){var h=l[a];s.push(h.first.name)}var c=["LE","GE","EQ"][t.op];throw new Error("unsatisfiable constraint ["+s.join(",")+"] operator: "+c)}o=r.marker}if(o.type()===g.Invalid){if(!this._addWithArtificialVariable(n))throw new Error("unsatisfiable constraint")}else n.solveFor(o),this._substitute(o,n),this._rowMap.insert(o,n);this._cnMap.insert(t,r),this._optimize(this._objective)},t.prototype.removeConstraint=function(t,e){void 0===e&&(e=!1);var i=this._cnMap.erase(t);if(void 0===i){if(e)return;throw new Error("unknown constraint")}this._removeConstraintEffects(t,i.second);var n=i.second.marker,r=this._rowMap.erase(n);if(void 0===r){var o=this._getMarkerLeavingSymbol(n);if(o.type()===g.Invalid)throw new Error("failed to find leaving row");(r=this._rowMap.erase(o)).second.solveForEx(o,n),this._substitute(n,r.second)}this._optimize(this._objective)},t.prototype.hasConstraint=function(t){return this._cnMap.contains(t)},t.prototype.addEditVariable=function(t,e){var i=this._editMap.find(t);if(void 0!==i)throw new Error("duplicate edit variable: "+t.name);if((e=b.Strength.clip(e))===b.Strength.required)throw new Error("bad required strength");var n=new a.Expression(t),r=new y.Constraint(n,y.Operator.Eq,e);this.addConstraint(r);var o=this._cnMap.find(r).second,s={tag:o,constraint:r,constant:0};this._editMap.insert(t,s)},t.prototype.removeEditVariable=function(t,e){void 0===e&&(e=!1);var i=this._editMap.erase(t);if(void 0===i){if(e)return;throw new Error("unknown edit variable: "+t.name)}this.removeConstraint(i.second.constraint,e)},t.prototype.hasEditVariable=function(t){return this._editMap.contains(t)},t.prototype.suggestValue=function(t,e){var i=this._editMap.find(t);if(void 0===i)throw new Error("unknown edit variable: "+t.name);var n=this._rowMap,r=i.second,o=e-r.constant;r.constant=e;var s=r.tag.marker,a=n.find(s);if(void 0!==a)return a.second.add(-o)<0&&this._infeasibleRows.push(s),void this._dualOptimize();var l=r.tag.other;if(void 0!==(a=n.find(l)))return a.second.add(o)<0&&this._infeasibleRows.push(l),void this._dualOptimize();for(var h=0,c=n.size();h<c;++h){var u=n.itemAt(h),_=u.second,p=_.coefficientFor(s);0!==p&&_.add(o*p)<0&&u.first.type()!==g.External&&this._infeasibleRows.push(u.first)}this._dualOptimize()},t.prototype.updateVariables=function(){for(var t=this._varMap,e=this._rowMap,i=0,n=t.size();i<n;++i){var r=t.itemAt(i),o=e.find(r.second),s=0;void 0!==o&&-0===(s=o.second.constant())&&(s=0),r.first.setValue(s)}},t.prototype.getConstraints=function(){var e=[];return s.forEach(this._cnMap,function(t){e.push(t.first)}),e},Object.defineProperty(t.prototype,"numConstraints",{get:function(){return this._cnMap.size()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numEditVariables",{get:function(){return this._editMap.size()},enumerable:!0,configurable:!0}),t.prototype._getVarSymbol=function(t){var e=this;return this._varMap.setDefault(t,function(){return e._makeSymbol(g.External)}).second},t.prototype._createRow=function(t){for(var e=t.expression,i=new k(e.constant),n=e.terms,r=0,o=n.size();r<o;++r){var s=n.itemAt(r);if(!x(s.second)){var a=this._getVarSymbol(s.first),l=this._rowMap.find(a);void 0!==l?i.insertRow(l.second,s.second):i.insertS
|
||
|
/*-----------------------------------------------------------------------------
|
||
|
| Copyright (c) 2014, Nucleic Development Team.
|
||
|
|
|
||
|
| Distributed under the terms of the Modified BSD License.
|
||
|
|
|
||
|
| The full license is in the file COPYING.txt, distributed with this software.
|
||
|
|----------------------------------------------------------------------------*/
|
||
|
var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=t(355),o=t(351),a=t(350),l=t(354),h=function(n){function o(t){var i,e=n.call(this)||this;return e._compare=t,e._wrapped=(i=t,function(t,e){return i(t.first,e)}),e}return r(o,n),o.prototype.comparitor=function(){return this._compare},o.prototype.indexOf=function(t){return a.binarySearch(this._array,t,this._wrapped)},o.prototype.contains=function(t){return 0<=a.binarySearch(this._array,t,this._wrapped)},o.prototype.find=function(t){return a.binaryFind(this._array,t,this._wrapped)},o.prototype.setDefault=function(t,e){var i=this._array,n=a.lowerBound(i,t,this._wrapped);if(n===i.length){var r=new s.Pair(t,e());return i.push(r),r}var o=i[n];if(0!==this._compare(o.first,t)){var r=new s.Pair(t,e());return i.splice(n,0,r),r}return o},o.prototype.insert=function(t,e){var i=this._array,n=a.lowerBound(i,t,this._wrapped);if(n===i.length){var r=new s.Pair(t,e);return i.push(r),r}var o=i[n];if(0!==this._compare(o.first,t)){var r=new s.Pair(t,e);return i.splice(n,0,r),r}return o.second=e,o},o.prototype.update=function(t){var e=this;t instanceof o?this._array=function(t,e,i){for(var n=0,r=0,o=t.length,s=e.length,a=[];n<o&&r<s;){var l=t[n],h=e[r],c=i(l.first,h.first);c<0?(a.push(l.copy()),++n):(0<c?a.push(h.copy()):(a.push(h.copy()),++n),++r)}for(;n<o;)a.push(t[n].copy()),++n;for(;r<s;)a.push(e[r].copy()),++r;return a}(this._array,t._array,this._compare):l.forEach(t,function(t){e.insert(t.first,t.second)})},o.prototype.erase=function(t){var e=this._array,i=a.binarySearch(e,t,this._wrapped);if(!(i<0))return e.splice(i,1)[0]},o.prototype.copy=function(){for(var t=new o(this._compare),e=t._array,i=this._array,n=0,r=i.length;n<r;++n)e.push(i[n].copy());return t},o}(o.ArrayBase);i.AssociativeArray=h},function(t,e,i){function n(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}n(t(350)),n(t(351)),n(t(352)),n(t(354)),n(t(355))},function(t,e,i){var n=function(){function t(t,e){void 0===e&&(e=0),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[this._index++]},t.prototype.__iter__=function(){return this},t}();i.ArrayIterator=n;var r=function(){function t(t,e){void 0===e&&(e=t.length),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[--this._index]},t.prototype.__iter__=function(){return this},t}();i.ReverseArrayIterator=r,i.iter=function(t){return t instanceof Array?new n(t):t.__iter__()},i.reversed=function(t){return t instanceof Array?new r(t):t.__reversed__()},i.next=function(t){return t.__next__()},i.asArray=function(t){if(t instanceof Array)return t.slice();for(var e,i=[],n=t.__iter__();void 0!==(e=n.__next__());)i.push(e);return i},i.forEach=function(t,e){if(t instanceof Array){for(var i=0,n=t.length;i<n;++i)if(!1===e(t[i]))return}else for(var r,o=t.__iter__();void 0!==(r=o.__next__());)if(!1===e(r))return},i.map=function(t,e){var i=[];if(t instanceof Array)for(var n=0,r=t.length;n<r;++n)i.push(e(t[n]));else for(var o,s=t.__iter__();void 0!==(o=s.__next__());)i.push(e(o));return i},i.filter=function(t,e){var i,n=[];if(t instanceof Array)for(var r=0,o=t.length;r<o;++r)i=t[r],e(i)&&n.push(i);else for(var s=t.__iter__();void 0!==(i=s.__next__());)e(i)&&n.push(i);return n}},function(t,e,i){var n=function(){function t(t,e){this.first=t,this.second=e}return t.prototype.copy=function(){return new t(this.first,this.second)},t}();i.Pair=n},function(t,e,i){var n=function(){function t(t){void 0===t&&(t=""),this._value=0,this._context=null,this._id=r++,this._name=t}return t.Compare=function(t,e){return t.id-e.id},t.prototype.toString=function(){return this._name},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:functi
|
||
|
/*!
|
||
|
* numbro.js
|
||
|
* version : 1.6.2
|
||
|
* author : Företagsplatsen AB
|
||
|
* license : MIT
|
||
|
* http://www.foretagsplatsen.se
|
||
|
*/
|
||
|
var c,U={},o=U,q="en-US",Y=null,r="0,0";function n(t){this._value=t}function p(t){var e,i="";for(e=0;e<t;e++)i+="0";return i}function X(t,e,i,n){var r,o,s,a,l,h,c,u,_=Math.pow(10,e);return o=-1<t.toFixed(0).search("e")?(s=e,u=t.toString(),a=u.split("e")[0],c=u.split("e")[1],l=a.split(".")[0],h=a.split(".")[1]||"",u=l+h+p(c-h.length),0<s&&(u+="."+p(s)),u):(i(t*_)/_).toFixed(e),n&&(r=new RegExp("0{1,"+n+"}$"),o=o.replace(r,"")),o}function s(t,e,i){var n,r,o,s,a,l,h,c,u,_;return-1<e.indexOf("$")?n=function(t,e,i){var n,r,o=e,s=o.indexOf("$"),a=o.indexOf("("),l=o.indexOf("+"),h=o.indexOf("-"),c="",u="";if(-1===o.indexOf("$")?"infix"===U[q].currency.position?(u=U[q].currency.symbol,U[q].currency.spaceSeparated&&(u=" "+u+" ")):U[q].currency.spaceSeparated&&(c=" "):-1<o.indexOf(" $")?(c=" ",o=o.replace(" $","")):-1<o.indexOf("$ ")?(c=" ",o=o.replace("$ ","")):o=o.replace("$",""),r=d(t,o,i,u),-1===e.indexOf("$"))switch(U[q].currency.position){case"postfix":-1<r.indexOf(")")?((r=r.split("")).splice(-1,0,c+U[q].currency.symbol),r=r.join("")):r=r+c+U[q].currency.symbol;break;case"infix":break;case"prefix":-1<r.indexOf("(")||-1<r.indexOf("-")?(r=r.split(""),n=Math.max(a,h)+1,r.splice(n,0,U[q].currency.symbol+c),r=r.join("")):r=U[q].currency.symbol+c+r;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else s<=1?-1<r.indexOf("(")||-1<r.indexOf("+")||-1<r.indexOf("-")?(r=r.split(""),n=1,(s<a||s<l||s<h)&&(n=0),r.splice(n,0,U[q].currency.symbol+c),r=r.join("")):r=U[q].currency.symbol+c+r:-1<r.indexOf(")")?((r=r.split("")).splice(-1,0,c+U[q].currency.symbol),r=r.join("")):r=r+c+U[q].currency.symbol;return r}(t,e,i):-1<e.indexOf("%")?(l=t,c=i,_="",l*=100,-1<(h=e).indexOf(" %")?(_=" ",h=h.replace(" %","")):h=h.replace("%",""),-1<(u=d(l,h,c)).indexOf(")")?((u=u.split("")).splice(-1,0,_+"%"),u=u.join("")):u=u+_+"%",n=u):-1<e.indexOf(":")?(r=t,o=Math.floor(r/60/60),s=Math.floor((r-60*o*60)/60),a=Math.round(r-60*o*60-60*s),n=o+":"+(s<10?"0"+s:s)+":"+(a<10?"0"+a:a)):n=d(t,e,i),n}function d(t,e,i,n){var r,o,s,a,l,h,c,u,_,p,d,f,v,m,g,y,b,x,w,k=!1,S=!1,T=!1,C="",A=!1,E=!1,M=!1,O=!1,z=!1,P="",j="",N=Math.abs(t),F=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],D=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],I="",R=!1,B=!1;if(0===t&&null!==Y)return Y;if(!isFinite(t))return""+t;if(0===e.indexOf("{")){var L=e.indexOf("}");if(-1===L)throw Error('Format should also contain a "}"');f=e.slice(1,L),e=e.slice(L+1)}else f="";if(e.indexOf("}")===e.length-1){var V=e.indexOf("{");if(-1===V)throw Error('Format should also contain a "{"');v=e.slice(V+1,-1),e=e.slice(0,V+1)}else v="";if(w=-1===e.indexOf(".")?e.match(/([0-9]+).*/):e.match(/([0-9]+)\..*/),x=null===w?-1:w[1].length,-1!==e.indexOf("-")&&(R=!0),-1<e.indexOf("(")?(k=!0,e=e.slice(1,-1)):-1<e.indexOf("+")&&(S=!0,e=e.replace(/\+/g,"")),-1<e.indexOf("a")){if(p=e.split(".")[0].match(/[0-9]+/g)||["0"],p=parseInt(p[0],10),A=0<=e.indexOf("aK"),E=0<=e.indexOf("aM"),M=0<=e.indexOf("aB"),O=0<=e.indexOf("aT"),z=A||E||M||O,-1<e.indexOf(" a")?(C=" ",e=e.replace(" a","")):e=e.replace("a",""),l=Math.floor(Math.log(N)/Math.LN10)+1,c=0==(c=l%3)?3:c,p&&0!==N&&(h=Math.floor(Math.log(N)/Math.LN10)+1-p,u=3*~~((Math.min(p,l)-c)/3),N/=Math.pow(10,u),-1===e.indexOf(".")&&3<p))for(e+="[.]",y=(y=0===h?0:3*~~(h/3)-h)<0?y+3:y,r=0;r<y;r++)e+="0";Math.floor(Math.log(Math.abs(t))/Math.LN10)+1!==p&&(N>=Math.pow(10,12)&&!z||O?(C+=U[q].abbreviations.trillion,t/=Math.pow(10,12)):N<Math.pow(10,12)&&N>=Math.pow(10,9)&&!z||M?(C+=U[q].abbreviations.billion,t/=Math.pow(10,9)):N<Math.pow(10,9)&&N>=Math.pow(10,6)&&!z||E?(C+=U[q].abbreviations.million,t/=Math.pow(10,6)):(N<Math.pow(10,6)&&N>=Math.pow(10,3)&&!z||A)&&(C+=U[q].abbreviations.thousand,t/=Math.pow(10,3)))}if(-1<e.indexOf("b"))for(-1<e.indexOf(" b")?(P=" ",e=e.replace(" b","")):e=e.replace("b",""),a=0;a<=F.length;a++)if(o=Math.pow(1024,a),s=Math.pow(1024,a+1),o<=t&&t<s){P+=F[a],0<o&&(t/=o);break}if(-1<e.indexOf("d"))for(-1<e.indexOf(" d")?(P=" ",e=e.replace(" d","")):e=e.replace("d",""),a=0;a<=D.length;a++)if(o=Math.pow(1e3,a),s=Math.pow
|
||
|
/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
|
this file except in compliance with the License. You may obtain a copy of the
|
||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
|
||
|
See the Apache Version 2.0 License for specific language governing permissions
|
||
|
and limitations under the License.
|
||
|
***************************************************************************** */
|
||
|
var i,r,o,s,a,l,h,c,u,_,p,d,f,v,m,g,y,b,x;!function(t){var e="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function i(i,n){return i!==e&&("function"==typeof Object.create?Object.defineProperty(i,"__esModule",{value:!0}):i.__esModule=!0),function(t,e){return i[t]=n?n(t,e):e}}"object"==typeof n&&"object"==typeof n.exports?t(i(e,i(n.exports))):t(i(e))}(function(t){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};i=function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&(i[n[r]]=t[n[r]]);return i},s=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,i,s):r(e,i))||s);return 3<o&&s&&Object.defineProperty(e,i,s),s},a=function(i,n){return function(t,e){n(t,e,i)}},l=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},h=function(o,s,a,l){return new(a||(a=Promise))(function(t,e){function i(t){try{r(l.next(t))}catch(t){e(t)}}function n(t){try{r(l.throw(t))}catch(t){e(t)}}function r(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(i,n)}r((l=l.apply(o,s||[])).next())})},c=function(i,n){var r,o,s,t,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(i,a)}catch(t){e=[6,t],o=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},u=function(t,e){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])},_=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}},p=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=o.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s},d=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t},f=function(t){return this instanceof f?(this.v=t,this):new f(t)},v=function(t,e,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=i.apply(t,e||[]),s=[];return r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r;function n(n){o[n]&&(r[n]=function(i){return new Promise(function(t,e){1<s.push([n,i,t,e])||a(n,i)})})}function a(t,e){try{(i=o[t](e)).value instanceof f?Promise.resolve(i.value.v).then(l,h):c(s[0][2],i)}catch(t){c(s[0][3],t)}var i}function l(t){a("next",t)}f
|
||
|
//# sourceMappingURL=bokeh.min.js.map
|