diff --git a/CHANGELOG.md b/CHANGELOG.md
index f7ed9d3a..8daef65e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
+## [1.14.3] - 2021-05-04
+
+### Changed
+- Fixed examples due to broken integetry tags.
+- Updated docs for the timeline classes.
+- Added github actions for Node 12.x, 14.x and 15.x
+- Updated to bootstrap@v5 in
+ [BootstrapTooltip](https://chird.github.io/meteoJS/doc/module-meteoJS_tooltip_bootstrapTooltip.BootstrapTooltip.html),
+ [ToggleButton](https://chird.github.io/meteoJS/doc/module-meteoJS_timeline_animation_togglebutton.ToggleButton.html),
+ [animation insert-functions](https://chird.github.io/meteoJS/doc/module-meteoJS_timeline_animation.html),
+ [bsDropdown](https://chird.github.io/meteoJS/doc/module-meteoJS_timeline_visualisation_bsDropdown.bsDropdown.html) and
+ [bsButtons](https://chird.github.io/meteoJS/doc/module-meteoJS_timeline_visualisation_bsButtons.bsButtons.html)
+- Use of bootstrap icons in
+ [ToggleButton](https://chird.github.io/meteoJS/doc/module-meteoJS_timeline_animation_togglebutton.ToggleButton.html)
+ for better default appearance.
+- Improved performance in
+ [Resources.html#getAvailableVariables](https://chird.github.io/meteoJS/doc/module-meteoJS_modelviewer_resources.Resources.html#getAvailableVariables)
+
## [1.14.2] - 2021-03-26
### Changed
@@ -187,7 +205,8 @@ will not work anymore, until you pass a callback to `getTimeText`.
### Fixed
- Some tests with DOM usage.
-[Unreleased]: https://github.com/chird/meteoJS/compare/v1.14.2...HEAD
+[Unreleased]: https://github.com/chird/meteoJS/compare/v1.14.3...HEAD
+[1.14.2]: https://github.com/chird/meteoJS/compare/v1.14.2...v1.14.3
[1.14.1]: https://github.com/chird/meteoJS/compare/v1.14.1...v1.14.2
[1.14.1]: https://github.com/chird/meteoJS/compare/v1.14.0...v1.14.1
[1.14.0]: https://github.com/chird/meteoJS/compare/v1.13.0...v1.14.0
diff --git a/doc/Modelviewer.js.html b/doc/Modelviewer.js.html
index 02087751..e99d1a97 100644
--- a/doc/Modelviewer.js.html
+++ b/doc/Modelviewer.js.html
@@ -277,7 +277,7 @@
* {@link module:meteoJS/timeline/visualisation.Visualisation} class. To animate
* through time steps use the {@link module:meteoJS/timeline/animation.Animation}
* class.
+ *
+ * <pre><code>import Timeline from 'meteojs/Timeline';</code></pre>
*/
export class Timeline {
@@ -894,7 +896,7 @@
getAvailableVariables
of the collection or one of its children). The resources are defined by
on of these Variable-Objects. If you pass 'variables', you can
additionally constrain the returned variables. E.g. you look for all
- run's with resources of a model, you pass the model's Variable-Object.
+ run's with resources of a model, you pass the model's Variable-Object.
+
meteoJS/<
If a Resource for a
certain Variable object from this VariableCollection is added, then a
child ResourcesTreeNode object is inserted in the tree (if it doesn't exists)
- for the Variable object.
+ for the Variable object.
+
Node to append the button and the dropdown menu (if menu set to true).
+ If this is a 'button' element, this will be the animation button and
+ no menu is added.
*
* @typedef {Object} module:meteoJS/timeline/animation~options
* @param {module:meteoJS/timeline.Timeline} timeline - Timeline to animate.
- * @param {number} [restartPause]
+ * @param {number} [restartPause=1.8]
* Time in seconds to pause before the animation restart.
- * @param {number} [imagePeriod]
+ * @param {number} [imagePeriod=0.2]
* Time in seconds between animation of two images.
* Ignored, if imageFrequency is specified.
* @param {number|undefined} [imageFrequency]
* Time of images during one second.
- * @param {boolean} [enabledStepsOnly] - Use only enabled times.
- * @param {boolean} [allEnabledStepsOnly]
+ * @param {boolean} [enabledStepsOnly=true] - Use only enabled times.
+ * @param {boolean} [allEnabledStepsOnly=false]
* Use only times that are enabled by all sets of time.
*/
@@ -91,6 +91,8 @@
Source: timeline/Animation.js
/**
* Object to animate {@link module:meteoJS/timeline.Timeline}.
+ *
+ * <pre><code>import Animation from 'meteojs/timeline/Animation';</code></pre>
*/
export class Animation {
@@ -100,7 +102,7 @@
* Class to create buttons and insert them into the DOM to navigate
* through the times of the passed timeline.
*
+ * <pre><code>import NavigationButtons from 'meteojs/timeline/NavigationButtons';</code></pre>
+ *
* @fires module:meteoJS/timeline/navigationButtons#click:button
*/
export class NavigationButtons {
@@ -210,7 +212,7 @@
* The event listener will be deleted automatically if the output is muted.
* * At the end of the constructor call "this.setNode(this.options.node);".
*
+ * <pre><code>import Visualisation from 'meteojs/timeline/Visualisation';</code></pre>
+ *
* @abstract
* @listens module:meteoJS/timeline#change:time
* @listens module:meteoJS/timeline#change:times
@@ -285,10 +287,10 @@
Source: timeline/Visualisation.js
* an object using {@link module:meteoJS/events}.
*
* @protected
- * @param {object} obj - Object to put the event listener on.
+ * @param {Object} obj - Object to put the event listener on.
* @param {mixed} listener - Event listener key.
- * @param {function} func - Function to be executed when event is triggered.
- * @param {object} [thisArg] - This in the function func when event triggered.
+ * @param {Function} func - Function to be executed when event is triggered.
+ * @param {Object} [thisArg] - This in the function func when event triggered.
*/
attachEventListener(obj, listener, func, thisArg) {
this.listeners.push([obj, listener]);
@@ -314,10 +316,19 @@
Source: timeline/Visualisation.js
addEventFunctions(Visualisation.prototype);
export default Visualisation;
+/**
+ * moment.js object.
+ *
+ * @external momentjs
+ * @see {@link https://momentjs.com}
+ */
+
/**
* Format a Date-object via the {@link https://momentjs.com|Moment.js} library.
*
- * @param {Object} moment - Moment.js object.
+ * <pre><code>import { makeTimeTextCallbackFunction } from 'meteojs/timeline/Visualisation';</code></pre>
+ *
+ * @param {external:momentjs} moment - Moment.js object.
* @returns {module:meteoJS/timeline/visualisation~timeTextCallbackFunction}
* Callback.
*/
@@ -340,7 +351,7 @@
import { insertFrequencyInput,
insertFrequencyRange,
insertRestartPauseInput } from '../Animation.js';
+import biPlayFill from 'bootstrap-icons/icons/play-fill.svg';
+import biPauseFill from 'bootstrap-icons/icons/pause-fill.svg';
/**
* Options for constructor.
*
- * @typedef {Object} meteoJS/timeline/animation/togglebutton~options
- * @param {meteoJS.timeline.animation} animation Animation object.
- * @param {HTMLElement} node
+ * @typedef {Object} module:meteoJS/timeline/animation/togglebutton~options
+ * @param {module:meteoJS/timeline/animation.Animation} animation Animation object.
+ * @param {external:HTMLElement} node
* Node to append the button and the dropdown menu (if menu set to true).
* If this is a 'button' element, this will be the animation button and
* no menu is added.
- * @param {string|HTMLElement|undefined} startedContent
+ * @param {string|external:HTMLElement|undefined} [startedContent]
* Content or text of button node if animation is running.
- * @param {string|undefined} startedClass
+ * Default ist the Bootstrap
+ * {@link https://icons.getbootstrap.com/icons/pause-fill/|pause-fill} Icon.
+ * @param {string|undefined} [startedClass]
* Classed added to button node if animation is running.
- * @param {string|HTMLElement|undefined} stoppedContent
+ * @param {string|external:HTMLElement|undefined} [stoppedContent]
* Content of button node if animation is stopped.
- * @param {string|undefined} stoppedClass
+ * Default ist the Bootstrap
+ * {@link https://icons.getbootstrap.com/icons/play-fill/|play-fill} Icon.
+ * @param {string|undefined} [stoppedClass]
* Classed added to button node if animation is running.
- * @param {string|undefined} classButton
+ * @param {string|undefined} [classButton]
* Classed added to button node.
- * @param {boolean} menu
+ * @param {boolean} [menu=true]
* Add dropdown menu for animation setup to the button. Ignored, if node is a
* button element.
- * @param {boolean} menuImageFrequency
+ * @param {boolean} [menuImageFrequency=true]
* Show frequency configuration in the dropdown menu.
- * @param {string} imageFrequencyCaption
+ * @param {string} [imageFrequencyCaption='Frequency']
* Label text for the frequency configuration in the dropdown menu.
- * @param {undefined|integer[]} menuFrequencies
+ * @param {undefined|integer[]} [menuFrequencies]
* Array of frequencies for the range slider. If undefined the slider will be
* hidden.
- * @param {boolean} menuRestartPause
+ * @param {boolean} [menuRestartPause=true]
* Show restart pause configuration in the dropdown menu.
- * @param {string} restartPauseCaption
+ * @param {string} [restartPauseCaption='Restart pause']
* Label text for the restart pause configuration in the dropdown menu.
*/
/**
* @classdesc
* Object to style a button accordingly to the status of an animation object.
+ *
+ * <pre><code>import ToggleButton from 'meteojs/timeline/animation/ToggleButton';</code></pre>
*/
export class ToggleButton {
/**
- * @param {meteoJS/timeline/animation/togglebutton~options} options Options.
+ * @param {module:meteoJS/timeline/animation/togglebutton~options} options Options.
*/
constructor(options = {}) {
let { animation = undefined,
@@ -97,9 +105,9 @@
/**
* Show current selected time of a timeline as text.
*
+ * <pre><code>import Text from 'meteojs/timeline/visualisation/Text';</code></pre>
+ *
* @extends module:meteoJS/timeline/visualisation.Visualisation
*/
export class Text extends Visualisation {
@@ -90,7 +92,7 @@
/**
* Show timeline as a group of buttons.
*
+ * <pre><code>import bsButtons from 'meteojs/timeline/visualisation/bsButtons';</code></pre>
+ *
* @extends module:meteoJS/timeline/visualisation.Visualisation
*/
export class bsButtons extends Visualisation {
@@ -68,7 +70,7 @@
* Show timeline in a dropdown menu. The menu will be build according to
* bootstrap.
*
+ * <pre><code>import bsDropdown from 'meteojs/timeline/visualisation/bsDropdown';</code></pre>
+ *
* @extends module:meteoJS/timeline/visualisation.Visualisation
*/
export class bsDropdown extends Visualisation {
@@ -159,7 +161,7 @@
Source: timeline/visualisation/bsDropdown.js
return;
var time = this.options.timeline.getSelectedTime();
- this.options.node.children('button')
+ this.options.node.children('li').children('button')
.removeClass(this.options.classButtonActive)
.removeClass(this.options.classButtonNotEnabled)
.removeClass(this.options.classButtonEnabled)
@@ -175,6 +177,7 @@
Source: timeline/visualisation/bsDropdown.js
.addClass(this.options.classButtonNotEnabled);
var that = this;
this.dropdownNode
+ .children('li')
.children('button.'+this.options.classDropdownItem)
.each(function () {
var t = new Date(+$(this).data('time'));
@@ -232,7 +235,7 @@
onContentChange() {
/* If no content is passed, the tooltip will not open with a
* content-callback until the tooltip is initialized otherwise. */
- this.tooltipNode.attr('data-original-title',
+ this.tooltipNode.attr('data-bs-original-title',
isStringContent(this.content) ? this.content : '-');
this._updateNonStringContent();
@@ -178,17 +197,19 @@
Source: tooltip/BootstrapTooltip.js
* @private
*/
_initTooltipNode() {
- this.tooltipNode
- .tooltip(this.bootstrapOptions)
- .on('inserted.bs.tooltip', () => {
- let tooltipNode = this._updateNonStringContent();
- if (!tooltipNode.length)
- return;
- if (this.closeOnMouseMove)
- tooltipNode.children('.tooltip-inner').mousemove(() => this.hide());
- if (this.closeOnMouseEnter)
- tooltipNode.children('.tooltip-inner').mouseenter(() => this.hide());
- });
+ if (this._bsTooltip !== undefined)
+ this._bsTooltip.dispose();
+ this._bsTooltip =
+ new bsTooltip(this._tooltipNode[0], this.bootstrapOptions);
+ this.tooltipNode[0].addEventListener('inserted.bs.tooltip', () => {
+ let tooltipNode = this._updateNonStringContent();
+ if (!tooltipNode.length)
+ return;
+ if (this.closeOnMouseMove)
+ tooltipNode.children('.tooltip-inner').mousemove(() => this.hide());
+ if (this.closeOnMouseEnter)
+ tooltipNode.children('.tooltip-inner').mouseenter(() => this.hide());
+ });
}
/**
@@ -226,7 +247,7 @@
Source: tooltip/BootstrapTooltip.js
diff --git a/meteoJS.min.js b/meteoJS.min.js
index 1bcfe7b6..a245401f 100644
--- a/meteoJS.min.js
+++ b/meteoJS.min.js
@@ -1,3 +1,3 @@
/*! For license information please see meteoJS.min.js.LICENSE.txt */
-var meteoJS,SVG=SVG||{},jQuery=jQuery||{},ol=ol||{layer:{},source:{},format:{},style:{}},Popper=Popper||{},bootstrap=bootstrap||{};(()=>{var e={588:(e,t,n)=>{function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(e){"use strict";var t,n=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof m?t:m,r=Object.create(o.prototype),a=new j(i||[]);return r._invoke=function(e,t,n){var i=d;return function(o,r){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw r;return C()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=P(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var l=f(e,t,n);if("normal"===l.type){if(i=n.done?v:h,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=v,n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function b(){}function g(){}var w={};w[a]=function(){return this};var _=Object.getPrototypeOf,O=_&&_(_(E([])));O&&O!==n&&o.call(O,a)&&(w=O);var S=g.prototype=m.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(r,a,s,l){var u=f(e[r],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===i(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,o){n(e,i,t,o)}))}return r=r?r.then(o,o):o()}}function P(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var r=o.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function n(){for(;++i=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;R(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:E(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}("object"===i(e=n.nmd(e))?e.exports:{});try{regeneratorRuntime=o}catch(e){Function("r","regeneratorRuntime = r")(o)}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,loaded:!1,exports:{}};return e[i](r,r.exports,n),r.loaded=!0,r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};(()=>{"use strict";n.r(i),n.d(i,{Modelviewer:()=>_i,RepetitiveRequests:()=>V,Sounding:()=>Xo,Synview:()=>Ot,ThermodynamicDiagram:()=>bl,ThermodynamicDiagramPluggable:()=>Sa,Timeline:()=>z,Tooltip:()=>Xn,calc:()=>e,events:()=>Il,modelviewer:()=>Ll,sounding:()=>Vl,synview:()=>Al,thermodynamicDiagram:()=>Gl,timeline:()=>Dl,tooltip:()=>Ml});var e={};function t(e){if(void 0!==e&&!isNaN(e))return 44330.769*(1-Math.pow(e/1013.25,.19029496))}function o(e){if(void 0!==e&&!isNaN(e))return 1013.25*Math.pow(1-e/44330.769,5.255)}function r(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(1e3/t,.286)}function a(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(t/1e3,.286)}function s(e,t){if(void 0!==t&&!isNaN(t)){for(var n=void 0,i=Math.pow(1e3/t,.286),o=273,r=20,a=0;Math.abs(r)>.1&&a<100;)a++,n=d(o,t),(o*i*Math.exp(2.5*n/o)-e)*r>0&&(r*=-.5),o+=r;return o}}function l(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t)){var n=.4343*Math.log(e*t/(622+e));return Math.pow(10,.0498646455*n+2.4082965)-7.07475+38.9114*Math.pow(Math.pow(10,.0915*n)-1.2035,2)}}function u(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){for(var i=t-273.15,o=1,r=10,a=1,s=6.112*Math.exp(17.67*i/(i+243.5));Math.abs(o)>.05&&0!=(o=s-(6.112*Math.exp(17.67*i/(i+243.5))-n*(e-273.15-i)*66e-5*(1+.00115*i)))&&(o<0?-1!=a&&(a=-1,r/=10):1!=a&&(a=1,r/=10),!(Math.abs(o)<=.05));)i+=r*a;return i+273.15}}function c(e,t,n){var i=r(e,n);if(!(void 0===i||void 0===t||isNaN(t)||void 0===e||isNaN(e)||void 0===n||isNaN(n)))return i*Math.exp(2.4819*d(t,n)/v(e,t))}function f(e){if(void 0!==e&&!isNaN(e)){var t=new Array(6.1104546,.4442351,.014302099,.00026454708,30357098e-13,2.0972268e-8,60487594e-18,-1469687e-19),n=new Array(.06485546857696639,.03783195122560735,.02224449342887902,.013182892842468312,.007874020771412448,.004739730494884733,.0028751203550435793,.001757430376758103,.0010824173951885098,.0006717089391856059,.0004199647026320394,.0002645243638634699,.00016784796373681322,.00010728539763162038,6907426344961356e-20,4479404897680843e-20,2925704195639373e-20,19245291263499416e-21,12749137241074795e-21,8505070102755051e-21,5713400253349711e-21,3864650296738762e-21,2632109719650053e-21,18049107293057043e-22,12460785055581605e-22,8.660705713468708e-7,6.059822176688955e-7,4.2682119794324277e-7,3.026165085143795e-7,2.15963854234914e-7,1.5512895457833687e-7),i=0;if((e-=273.15)>-50)i=t[0]+e*(t[1]+e*(t[2]+e*(t[3]+e*(t[4]+e*(t[5]+e*(t[6]+e*t[7]))))));else{var o=(-e-50)/5;i=010;){var o=i+(n-i)/2,r=d(a(e,o),o);if(void 0===r)return;r.1;){var o=i+(n-i)/2,r=h(o,t);if(void 0===r)return;r>e?i=o:n=o}return i+(n-i)/2}}function v(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return t-(.001296*t-.15772)*(e-t)}function y(e){return void 0===e||isNaN(e)?void 0:e+273.15}function m(e){return void 0===e||isNaN(e)?void 0:e-273.15}function b(e){return void 0===e||isNaN(e)?void 0:3.6*e}function g(e){return void 0===e||isNaN(e)?void 0:e/3.6}function w(e){return void 0===e||isNaN(e)?void 0:900*e/463}function _(e){return void 0===e||isNaN(e)?void 0:463*e/900}function O(e){return void 0===e||isNaN(e)?void 0:Math.min(12,Math.pow(e/.836,2/3))}function S(e){return void 0===e||isNaN(e)?void 0:.836*Math.pow(e,1.5)}function T(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return 153*m(e)+.9985*t-304.26}function k(e,t,n,i){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){if(0==t)return e;var o=.02896;if(void 0===i&&(i=n),n==i)return e*Math.exp(9.807*-o/8.314/n*t);var r=(n-i)/t;return e*Math.exp(9.807*o/8.314/r*Math.log(1-r*t/n))}}function P(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){var i=f(t)*n;return 100*(e-i)/287.058/t+100*i/461.495/t}}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e,t,n){"listeners"in this&&void 0!==this.listeners||(this.listeners={}),e in this.listeners||(this.listeners[e]={});var i=Math.random().toString(36).substr(2,9);return this.listeners[e][i]={callback:t,thisArg:n},i}function j(e,t){"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&t in this.listeners[e]&&delete this.listeners[e][t]}function E(e,t,n){"once_listeners"in this&&void 0!==this.once_listeners||(this.once_listeners={}),e in this.once_listeners&&"push"in this.once_listeners[e]||(this.once_listeners[e]=[]),this.once_listeners[e].push({callback:t,thisArg:n})}function C(e){return"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&Object.keys(this.listeners[e]).length||"once_listeners"in this&&e in this.once_listeners&&Object.keys(this.once_listeners[e]).length}function N(e){var t=this,n=Array.prototype.slice.call(arguments);if(n.shift(),"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&"object"==x(this.listeners[e])&&Object.keys(this.listeners[e]).forEach((function(i){t.listeners[e][i].callback.apply(void 0===t.listeners[e][i].thisArg?t:t.listeners[e][i].thisArg,n)})),"once_listeners"in this&&void 0!==this.once_listeners&&e in this.once_listeners&&"forEach"in this.once_listeners[e]){var i=this.once_listeners[e];this.once_listeners[e]=[],i.forEach((function(e){e.callback.apply(void 0===e.thisArg?t:e.thisArg,n)}))}}n.r(e),n.d(e,{altitudeISAByPres:()=>t,densityHumidAirByPressureAndTempAndRelHumidity:()=>P,dewpointByHMRAndPres:()=>l,equiPotentialTempByTempAndDewpointAndPres:()=>c,lclByPotentialTempAndHMR:()=>h,lclTemperatureByTempAndDewpoint:()=>v,potentialTempByLCLAndHMR:()=>p,potentialTempByTempAndPres:()=>r,pressureByBarometricFormula:()=>k,pressureISAByAltitude:()=>o,saturationHMRByTempAndPres:()=>d,saturationPressureByTemp:()=>f,snowlineByTemp850hPaAndAltidude:()=>T,tempByEquiPotTempAndPres:()=>s,tempByPotentialTempAndPres:()=>a,tempCelsiusToKelvin:()=>y,tempKelvinToCelsius:()=>m,wetbulbTempByTempAndDewpointAndPres:()=>u,windspeedBFToMS:()=>S,windspeedKMHToMS:()=>g,windspeedKNToMS:()=>_,windspeedMSToBF:()=>O,windspeedMSToKMH:()=>b,windspeedMSToKN:()=>w}),n(588);const B=function(e){e.on=R,e.un=j,e.once=E,e.hasListener=C,e.trigger=N};function I(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?void 0:n,o=t.user,r=void 0===o?"":o,a=t.password,s=void 0===a?"":a,l=t.start,u=void 0===l||l,c=t.defaultTimeout,f=void 0===c?void 0:c,d=t.timeoutOnError,h=void 0===d?void 0:d,p=t.pauseOnHiddenDocument,v=void 0!==p&&p,y=t.responseType,m=void 0===y?"":y;D(this,e),this._url=i,this._user=r,this._password=s,this._isStarted=u,this._defaultTimeout=f,this._timeoutOnError=h,this._pauseOnHiddenDocument=v,this._initPauseOnHiddenDocument(),this._isSuppressedByHiddenDocument=!1,this._responseType=m,this._timeoutID=void 0,this._loading=!1,this._isStarted&&this.start()}var t,n,i,o;return t=e,(n=[{key:"url",get:function(){return this._url},set:function(e){this._url=e}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"password",get:function(){return this._password},set:function(e){this._password=e}},{key:"responseType",get:function(){return this._responseType},set:function(e){this._responseType=e}},{key:"start",value:function(){this._isStarted=!0,this._startRequest()}},{key:"stop",value:function(){this._isStarted=!1,void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0)}},{key:"_planRequest",value:function(e){var t=this,n=e.delay;void 0===this._timeoutID&&(this._timeoutID=setTimeout((function(){t._pauseOnHiddenDocument&&"hidden"in document&&document.hidden?t._isSuppressedByHiddenDocument=!0:t._startRequest()}),n))}},{key:"_startRequest",value:function(){var e=this;void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0),this._makeRequest().then((function(t){var n=t.request;if(e._isStarted){var i=e._defaultTimeout,o=n.getResponseHeader("Cache-Control");if(null!==o){var r=/(^|,\s*)max-age=([0-9]+)($|\s*,)/.exec(o);null!==r&&r[2]>0&&(i=Math.round(1e3*r[2]))}e.trigger("success:request",{request:n}),void 0!==i&&e._planRequest({delay:i})}}),(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.request;e._isStarted&&void 0!==n&&(e.trigger("error:request",{request:n}),void 0!==e._timeoutOnError&&e._planRequest({delay:e._timeoutOnError}))}),(function(t){var n=t.request,i=void 0===n?void 0:n;void 0!==i&&e.trigger("error:request",{request:i})}))}},{key:"_makeRequest",value:(i=regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.trigger("before:request"),e.abrupt("return",new Promise((function(e,n){if(void 0!==t._url)if(t._loading)n();else{t._loading=!0;var i=new XMLHttpRequest;void 0!==t.responseType&&(i.responseType=t.responseType),i.addEventListener("load",(function(){t._loading=!1,200==i.status?e({request:i}):n({request:i})})),i.addEventListener("error",(function(){t._loading=!1,n({request:i})})),i.open("GET",t._url,!0,t._user,t._password),i.send()}else n()})));case 2:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,o){var r=i.apply(e,t);function a(e){I(r,n,o,a,s,"next",e)}function s(e){I(r,n,o,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"_initPauseOnHiddenDocument",value:function(){var e=this;this._pauseOnHiddenDocument&&document.addEventListener("visibilitychange",(function(){"hidden"in document&&!document.hidden&&e._isSuppressedByHiddenDocument&&e._isStarted&&(e._isSuppressedByHiddenDocument=!1,e.start())}))}}])&&A(t.prototype,n),e}();B(M.prototype);const V=M;function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxTimeGap,i=void 0===n?void 0:n,o=t.keyboardNavigation,r=void 0===o?{}:o;Y(this,e),this.maxTimeGap=i,this.selectedTime=new Date("invalid"),this.times=[],this.enabledTimes=[],this.allEnabledTimes=[],this.timesByKey={},this._keyboardNavigation={},this._initKeyboardNavigation(r)}var t,n;return t=e,(n=[{key:"getSelectedTime",value:function(){return this.selectedTime}},{key:"setSelectedTime",value:function(e){return this._setSelectedTime(q(e,this.times)>-1?e:new Date("invalid")),this}},{key:"getTimes",value:function(){return this.times}},{key:"getEnabledTimes",value:function(){return this.enabledTimes}},{key:"getAllEnabledTimes",value:function(){return this.allEnabledTimes}},{key:"setTimesBySetID",value:function(e,t){return this.timesByKey[e]={times:t,enabled:t},this._updateTimes(),this._updateEnabledTimes(),this}},{key:"setEnabledTimesBySetID",value:function(e,t){return e in this.timesByKey&&(this.timesByKey[e].enabled=t,this._updateEnabledTimes()),this}},{key:"getSetIDs",value:function(){return Object.keys(this.timesByKey)}},{key:"deleteSetID",value:function(e){return e in this.timesByKey&&(delete this.timesByKey[e],this._updateTimes(),this._updateEnabledTimes()),this}},{key:"first",value:function(){return this._setSelectedTime(this.getFirstEnabledTime()),this}},{key:"last",value:function(){return this._setSelectedTime(this.getLastEnabledTime()),this}},{key:"next",value:function(){return this._setSelectedTime(this.getNextEnabledTime()),this}},{key:"prev",value:function(){return this._setSelectedTime(this.getPrevEnabledTime()),this}},{key:"nextAllEnabledTime",value:function(){return this._setSelectedTime(this.getNextAllEnabledTime()),this}},{key:"prevAllEnabledTime",value:function(){return this._setSelectedTime(this.getPrevAllEnabledTime()),this}},{key:"add",value:function(e,t){var n=this.getSelectedTime(),i=0;switch(t){case"hours":case"h":i=3600*e*1e3;break;case"minutes":case"m":i=60*e*1e3;break;case"seconds":case"s":i=1e3*e;break;case"milliseconds":case"ms":i=e}switch(0!=i&&(n=new Date(n.valueOf()+i)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()+e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()+e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()+e)}return q(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"sub",value:function(e,t){var n=this.getSelectedTime(),i=0;switch(t){case"hours":case"h":i=3600*e*1e3;break;case"minutes":case"m":i=60*e*1e3;break;case"seconds":case"s":i=1e3*e;break;case"milliseconds":case"ms":i=e}switch(0!=i&&(n=new Date(n.valueOf()-i)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()-e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()-e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()-e)}return q(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"getFirstEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[0]:new Date("invalid")}},{key:"getLastEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[this.enabledTimes.length-1]:new Date("invalid")}},{key:"getNextEnabledTime",value:function(){if(this.enabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.enabledTimes);if(e>-1)return++e-1)return-1<--e?this.enabledTimes[e]:this.enabledTimes[0];if(isNaN(this.getSelectedTime()))return this.enabledTimes[0];for(var t=new Date("invalid"),n=this.enabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.enabledTimes[n].valueOf()){t=this.enabledTimes[n];break}return t}},{key:"getFirstAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[0]:new Date("invalid")}},{key:"getLastAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[this.allEnabledTimes.length-1]:new Date("invalid")}},{key:"getNextAllEnabledTime",value:function(){if(this.allEnabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.allEnabledTimes);if(e>-1)return++e-1)return-1<--e?this.allEnabledTimes[e]:this.allEnabledTimes[0];if(isNaN(this.getSelectedTime()))return this.allEnabledTimes[0];for(var t=new Date("invalid"),n=this.allEnabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.allEnabledTimes[n].valueOf()){t=this.allEnabledTimes[n];break}return t}},{key:"isTimeEnabled",value:function(e){return this.enabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isTimeAllEnabled",value:function(e){return this.allEnabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isFirstEnabledTime",value:function(){return this.getFirstEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"isLastEnabledTime",value:function(){return this.getLastEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"_setSelectedTime",value:function(e){var t=this.selectedTime;return this.selectedTime=e,this.trigger("change:time",t),this.selectedTime}},{key:"_updateTimes",value:function(){this.times=[];var e=[],t={};for(var n in this.timesByKey)this.timesByKey[n].times.forEach((function(n){n.valueOf()in t||(e.push(n),t[n.valueOf()]=n)}));H(e),e.forEach((function(e){if(this.times.length<1)this.times.push(e);else{var t=this.times[this.times.length-1];if(void 0!==this.maxTimeGap&&e.valueOf()-t.valueOf()>1e3*this.maxTimeGap){var n=t;do{n=new Date(n.getTime()+1e3*this.maxTimeGap),this.times.push(n)}while(e.valueOf()-n.valueOf()>1e3*this.maxTimeGap)}this.times.push(e)}}),this),H(this.times),this.trigger("change:times")}},{key:"_updateEnabledTimes",value:function(){this.enabledTimes=[],this.allEnabledTimes=[];var e={},t={};for(var n in this.timesByKey)this.timesByKey[n].enabled.forEach((function(n){n.valueOf()in e||(this.enabledTimes.push(n),e[n.valueOf()]=n),n.valueOf()in t?t[n.valueOf()]++:t[n.valueOf()]=1}),this);for(var i in H(this.enabledTimes),t)t[i]==Object.keys(this.timesByKey).length&&this.allEnabledTimes.push(e[i]);H(this.allEnabledTimes),this.trigger("change:enabledTimes")}},{key:"_initKeyboardNavigation",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.enabled,i=void 0!==n&&n,o=t.first,r=void 0===o?36:o,a=t.last,s=void 0===a?35:a,l=t.prev,u=void 0===l?37:l,c=t.next,f=void 0===c?39:c,d=t.prevAllEnabledTime,h=void 0===d?[37,"ctrl"]:d,p=t.nextAllEnabledTime,v=void 0===p?[39,"ctrl"]:p,y=t.add,m=void 0===y?void 0:y,b=t.sub,g=void 0===b?void 0:b;void 0===m&&(m={"3h":[39,"ctrl","shift"],"6h":[39,"shift"],"12h":[39,"alt","shift"],"24h":[39,"alt"]}),void 0===g&&(g={"3h":[37,"ctrl","shift"],"6h":[37,"shift"],"12h":[37,"alt","shift"],"24h":[37,"alt"]}),this._keyboardNavigation={enabled:i,first:r,last:s,prev:u,next:f,prevAllEnabledTime:h,nextAllEnabledTime:v,add:m,sub:g},document&&this._keyboardNavigation.enabled&&document.addEventListener("keydown",(function(t){Object.keys(e._keyboardNavigation).forEach((function(n){"enabled"!=n&&(/^(add|sub)$/.test(n)?Object.keys(e._keyboardNavigation[n]).forEach((function(i){var o=i.match(/^([0-9]+)\s*([a-zA-Z]+)$/);null!==o&&K(t,e._keyboardNavigation[n][i])&&(e[n](+o[1],o[2]),t.preventDefault(),t.stopPropagation())})):n in e&&K(t,e._keyboardNavigation[n])&&(e[n](),t.preventDefault(),t.stopPropagation()))}))}))}}])&&F(t.prototype,n),e}();B(X.prototype);const z=X;var q=function(e,t){return t.findIndex((function(t){return t.valueOf()==e.valueOf()}))};function H(e){e.sort((function(e,t){return e.valueOf()-t.valueOf()}))}function K(e,t){if("object"==G(t)&&"forEach"in t||(t=[t]),0==t.length)return!1;var n=[["ctrl","ctrlKey"],["alt","altKey"],["shift","shiftKey"],["meta","metaKey"]].reduce((function(n,i){return n&&(t.indexOf(i[0])>-1?e[i[1]]:!e[i[1]])}),!0);return t.forEach((function(t){switch(t){case"ctrl":case"alt":case"shift":case"meta":break;default:t!=e.keyCode&&(n=!1)}})),n}const U=jQuery;var $=n.n(U);function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},i=n.timeline,o=n.restartPause,r=void 0===o?1.8:o,a=n.imagePeriod,s=void 0===a?.2:a,l=n.imageFrequency,u=n.enabledStepsOnly,c=void 0===u||u,f=n.allEnabledStepsOnly,d=void 0!==f&&f;Z(this,e),this.options={timeline:i,restartPause:r,imagePeriod:s,imageFrequency:l,enabledStepsOnly:c,allEnabledStepsOnly:d},void 0===this.options.timeline&&(this.options.timeline=new z),void 0!==this.options.imageFrequency&&0!=this.options.imageFrequency&&(this.options.imagePeriod=1/this.options.imageFrequency),this.animationIntervalID=void 0,this.animationTimeoutID=void 0,this.animationStep=0,this.timesHash={},this.times=[];var h=function(){t.times=t.options.timeline[t._getTimelineTimesMethod()](),t.timesHash={},t.times.forEach((function(e,n){return t.timesHash[e.valueOf()]=n}))};this.options.timeline.on(this._getTimelineChangeTimesEvent(),h),h()}var t,n;return t=e,(n=[{key:"getImagePeriod",value:function(){return this.options.imagePeriod}},{key:"setImagePeriod",value:function(e){return this.options.imagePeriod=e,this.isStarted()&&this._updateAnimation(),this.trigger("change:imageFrequency"),this}},{key:"getImageFrequency",value:function(){return 1/this.options.imagePeriod}},{key:"setImageFrequency",value:function(e){return 0!=e&&this.setImagePeriod(1/e),this}},{key:"getRestartPause",value:function(){return this.options.restartPause}},{key:"setRestartPause",value:function(e){return this.options.restartPause=Number(e),this.trigger("change:restartPause"),this}},{key:"isStarted",value:function(){return void 0!==this.animationIntervalID||void 0!==this.animationTimeoutID}},{key:"start",value:function(){this.options.timeline.getSelectedTime().valueOf()in this.timesHash&&this._setStep(this.timesHash[this.options.timeline.getSelectedTime().valueOf()]),this.isStarted()||this._updateAnimation(),this.trigger("start:animation")}},{key:"stop",value:function(){this._clearAnimation(),this.trigger("stop:animation")}},{key:"toggle",value:function(){this.isStarted()?this.stop():this.start()}},{key:"_setStep",value:function(e){0<=e&&e=e._getCount()-1&&(e.trigger("end:animation"),e._clearAnimation(),e._initRestartPause())}),1e3*this.options.imagePeriod))}},{key:"_initRestartPause",value:function(){var e=this;void 0===this.animationTimeoutID&&(this.animationTimeoutID=window.setTimeout((function(){e.animationStep=0,e.trigger("restart:animation"),e.animationStep").addClass("form-control").attr("type","number").attr("min",1).attr("step",1),a=$()("