smart-energy-monitor/software/flow/node_modules/gridstack/dist/gridstack.all.js

17 lines
91 KiB
JavaScript
Raw Permalink Normal View History

/** gridstack.js 0.6.4 - IE and older browsers Polyfills for this library @preserve*/
Number.isNaN=Number.isNaN||function(t){return"number"==typeof t&&t!=t},Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw TypeError("predicate must be a function");for(var s=arguments[1],o=0;o<i;){var n=e[o];if(t.call(s,n,o,e))return n;o++}},configurable:!0,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var s=arguments[1],o=0;o<i;){var n=e[o];if(t.call(s,n,o,e))return o;o++}return-1},configurable:!0,writable:!0}),
/**
* gridstack.js 0.6.4
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
* @preserve
*/
function(t){if("function"==typeof define&&define.amd)define(["jquery","exports"],t);else if("undefined"!=typeof exports){var e;try{e=require("jquery")}catch(t){}t(e||window.jQuery,exports)}else t(window.jQuery,window)}(function(f,t){function a(t,e,i,s){void 0!==t[e]&&(t[i]=t[e],console.warn("gridstack.js: Option `"+e+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **completely** removed in v1.0"))}function h(t,e,i,s){var o=t.attr(e);void 0!==o&&(t.attr(i,o),console.warn("gridstack.js: attribute `"+e+"`="+o+" is deprecated on this object in "+s+" and has been replaced with `"+i+"`. It will be **completely** removed in v1.0"))}var m={isIntercepted:function(t,e){return!(t.x+t.width<=e.x||e.x+e.width<=t.x||t.y+t.height<=e.y||e.y+e.height<=t.y)},sort:function(t,e,i){if(!i){var s=t.map(function(t){return t.x+t.width});i=Math.max.apply(Math,s)}return-1===e?m.sortBy(t,function(t){return-(t.x+t.y*i)}):m.sortBy(t,function(t){return t.x+t.y*i})},createStylesheet:function(t,e){var i=document.createElement("style");return i.setAttribute("type","text/css"),i.setAttribute("data-gs-style-id",t),i.styleSheet?i.styleSheet.cssText="":i.appendChild(document.createTextNode("")),(e=e||document.getElementsByTagName("head")[0]).insertBefore(i,e.firstChild),i.sheet},removeStylesheet:function(t){f("STYLE[data-gs-style-id="+t+"]").remove()},insertCSSRule:function(t,e,i,s){"function"==typeof t.insertRule?t.insertRule(e+"{"+i+"}",s):"function"==typeof t.addRule&&t.addRule(e,i,s)},toBool:function(t){return"boolean"==typeof t?t:"string"==typeof t?!(""===(t=t.toLowerCase())||"no"===t||"false"===t||"0"===t):Boolean(t)},_collisionNodeCheck:function(t){return t!==this.node&&m.isIntercepted(t,this.nn)},_didCollide:function(t){return m.isIntercepted({x:this.n.x,y:this.newY,width:this.n.width,height:this.n.height},t)},_isAddNodeIntercepted:function(t){return m.isIntercepted({x:this.x,y:this.y,width:this.node.width,height:this.node.height},t)},parseHeight:function(t){var e=t,i="px";if(e&&"string"==typeof e){var s=e.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%)?$/);if(!s)throw new Error("Invalid height");i=s[2]||"px",e=parseFloat(s[1])}return{height:e,unit:i}},without:function(t,e){var i=t.indexOf(e);return-1!==i&&(t=t.slice(0)).splice(i,1),t},sortBy:function(t,o){return t.slice(0).sort(function(t,e){var i=o(t),s=o(e);return s===i?0:s<i?1:-1})},defaults:function(i){return Array.prototype.slice.call(arguments,1).forEach(function(t){for(var e in t)!t.hasOwnProperty(e)||i.hasOwnProperty(e)&&void 0!==i[e]||(i[e]=t[e])}),i},clone:function(t){return f.extend({},t)},throttle:function(t,e){var i=!1;return function(){i||(t.apply(this,arguments),i=!0,setTimeout(function(){i=!1},e))}},removePositioningStyles:function(t){var e=t[0].style;e.position&&e.removeProperty("position"),e.left&&e.removeProperty("left"),e.top&&e.removeProperty("top"),e.width&&e.removeProperty("width"),e.height&&e.removeProperty("height")},getScrollParent:function(t){return null===t?null:t.scrollHeight>t.clientHeight?t:m.getScrollParent(t.parentNode)},updateScrollPosition:function(t,e,i){var s=t.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>o){var n=s.bottom-o,r=s.top,a=m.getScrollParent(t);if(null!==a){var h=a.scrollTop;s.top<0&&i<0?t.offsetHeight>o?a.scrollTop+=i:a.scrollTop+=Math.abs(r)>Math.abs(i)?i:r:0<i&&(t.offsetHeight>o?a.scrollTop+=i:a.scrollTop+=i<n?i:n),e.position.top+=a.scrollTop-h}}}};function l(t){this.grid=t}l.registeredPlugins=[],l.registerPlugin=function(t){l.registeredPlugins.push(t)},l.prototype.resizable=function(t,e){return this},l.prototype.draggable=function(t,e){return this},l.prototype.droppable=function(t,e){return this},l.prototype.isDroppable=function(t){return!1},l.prototype.on=function(t,e,i){return this};function d(t,e,i,s,o){this.column=t||12,this.float=i||!1,this.maxRow=s||0,this.nodes=o||[],this.onchange=e||function(){},this._addedNodes=[],this._removedNodes=[],this._batchMode=!1}var n=0;d.prototype.batchUpdate=function(){this._batchMode||(this._batchMod
/*! jQuery UI - v1.12.1 - 2019-11-20
* http://jqueryui.com
* Includes: widget.js, data.js, disable-selection.js, scroll-parent.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/mouse.js
* Copyright jQuery Foundation and other contributors; Licensed MIT @preserve*/
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(y){y.ui=y.ui||{};y.ui.version="1.12.1";var o,i=0,a=Array.prototype.slice;y.cleanData=(o=y.cleanData,function(t){var e,i,s;for(s=0;null!=(i=t[s]);s++)try{(e=y._data(i,"events"))&&e.remove&&y(i).triggerHandler("remove")}catch(t){}o(t)}),y.widget=function(t,i,e){var s,o,n,r={},a=t.split(".")[0],h=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=y.Widget),y.isArray(e)&&(e=y.extend.apply(null,[{}].concat(e))),y.expr[":"][h.toLowerCase()]=function(t){return!!y.data(t,h)},y[a]=y[a]||{},s=y[a][t],o=y[a][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},y.extend(o,s,{version:e.version,_proto:y.extend({},e),_childConstructors:[]}),(n=new i).options=y.widget.extend({},n.options),y.each(e,function(e,s){function o(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}y.isFunction(s)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=n,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=s}),o.prototype=y.widget.extend(n,{widgetEventPrefix:s&&n.widgetEventPrefix||t},r,{constructor:o,namespace:a,widgetName:t,widgetFullName:h}),s?(y.each(s._childConstructors,function(t,e){var i=e.prototype;y.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),y.widget.bridge(t,o),o},y.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),o=0,n=s.length;o<n;o++)for(e in s[o])i=s[o][e],s[o].hasOwnProperty(e)&&void 0!==i&&(y.isPlainObject(i)?t[e]=y.isPlainObject(t[e])?y.widget.extend({},t[e],i):y.widget.extend({},i):t[e]=i);return t},y.widget.bridge=function(n,e){var r=e.prototype.widgetFullName||n;y.fn[n]=function(i){var t="string"==typeof i,s=a.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=y.data(this,r);return"instance"===i?(o=e,!1):e?y.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:y.error("no such method '"+i+"' for "+n+" widget instance"):y.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(s.length&&(i=y.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=y.data(this,r);t?(t.option(i||{}),t._init&&t._init()):y.data(this,r,new e(i,this))})),o}},y.Widget=function(){},y.Widget._childConstructors=[],y.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,o,n=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(n={},t=(i=t.split(".")).shift(),i.length){for(s=n[t]=y.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?nu
function(t){if("function"==typeof define&&define.amd)define(["jquery","gridstack","exports"],t);else if("undefined"!=typeof exports){try{jQuery=require("jquery")}catch(t){}try{gridstack=require("gridstack")}catch(t){}t(jQuery,gridstack.GridStackUI,exports)}else t(jQuery,GridStackUI,window)}(function(n,e,t){function i(t){e.GridStackDragDropPlugin.call(this,t)}return e.GridStackDragDropPlugin.registerPlugin(i),((i.prototype=Object.create(e.GridStackDragDropPlugin.prototype)).constructor=i).prototype.resizable=function(t,e){if(t=n(t),"disable"===e||"enable"===e)t.resizable(e);else if("option"===e){var i=arguments[2],s=arguments[3];t.resizable(e,i,s)}else{var o=t.data("gs-resize-handles")?t.data("gs-resize-handles"):this.grid.opts.resizable.handles;t.resizable(n.extend({},this.grid.opts.resizable,{handles:o},{start:e.start||function(){},stop:e.stop||function(){},resize:e.resize||function(){}}))}return this},i.prototype.draggable=function(t,e){return t=n(t),"disable"===e||"enable"===e?t.draggable(e):t.draggable(n.extend({},this.grid.opts.draggable,{containment:this.grid.opts.isNested&&!this.grid.opts.dragOut?this.grid.container.parent():this.grid.opts.draggable.containment||null,start:e.start||function(){},stop:e.stop||function(){},drag:e.drag||function(){}})),this},i.prototype.droppable=function(t,e){return(t=n(t)).droppable(e),this},i.prototype.isDroppable=function(t,e){return t=n(t),Boolean(t.data("droppable"))},i.prototype.on=function(t,e,i){return n(t).on(e,i),this},t.JQueryUIGridStackDragDropPlugin=i});
//# sourceMappingURL=gridstack.min.map