/*! For license information please see smartly.js.LICENSE.txt */ !function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s=13)}([function(t){t.exports=JSON.parse('{"customJS":"!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\\"object\\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\\"default\\",{enumerable:!0,value:e}),2&t&&\\"string\\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\\"a\\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\\"/dist/\\",n(n.s=0)}([function(e,t,n){\\"use strict\\";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function c(e){try{l(r.next(e))}catch(e){a(e)}}function i(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,i)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,a,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},\\"function\\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(n)throw new TypeError(\\"Generator is already executing.\\");for(;c;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,r=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){c=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1].hdi,\\n #dd-modal,\\n #about-modal,\\n #open-modal-btn {\\n display: none;\\n }\\n #hidden-json-update {\\n visibility: hidden;\\n position: fixed;\\n z-index: -99999;\\n }\\n #open-modal-btn-dummy {\\n opacity: 0.3;\\n }
Loading Layout...
"}')},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.obsolete=function(t,e,i,n,s){let r=(...r)=>(console.warn("gridstack.js: Function `"+i+"` is deprecated in "+s+" and has been replaced with `"+n+"`. It will be **completely** removed in v1.0"),e.apply(t,r));return r.prototype=e.prototype,r},e.obsoleteOpts=function(t,e,i,n){void 0!==t[e]&&(t[i]=t[e],console.warn("gridstack.js: Option `"+e+"` is deprecated in "+n+" and has been replaced with `"+i+"`. It will be **completely** removed in v1.0"))},e.obsoleteOptsDel=function(t,e,i,n){void 0!==t[e]&&console.warn("gridstack.js: Option `"+e+"` is deprecated in "+i+n)},e.obsoleteAttr=function(t,e,i,n){let s=t.getAttribute(e);null!==s&&(t.setAttribute(i,s),console.warn("gridstack.js: attribute `"+e+"`="+s+" is deprecated on this object in "+n+" and has been replaced with `"+i+"`. It will be **completely** removed in v1.0"))};class n{static isIntercepted(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)}static sort(t,e,i){if(!i){let e=t.map(t=>t.x+t.width);i=Math.max(...e)}return-1===e?t.sort((t,e)=>e.x+e.y*i-(t.x+t.y*i)):t.sort((t,e)=>t.x+t.y*i-(e.x+e.y*i))}static createStylesheet(t,e){let 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.insertBefore(i,e.firstChild):(e=document.getElementsByTagName("head")[0]).appendChild(i),i.sheet}static removeStylesheet(t){let e=document.querySelector("STYLE[data-gs-style-id="+t+"]");e&&e.parentNode&&e.parentNode.removeChild(e)}static addCSSRule(t,e,i){"function"==typeof t.addRule?t.addRule(e,i):"function"==typeof t.insertRule&&t.insertRule(`${e}{${i}}`)}static toBool(t){return"boolean"==typeof t?t:"string"==typeof t?!(""===(t=t.toLowerCase())||"no"===t||"false"===t||"0"===t):Boolean(t)}static toNumber(t){return null===t||0===t.length?null:Number(t)}static parseHeight(t){let e,i="px";if("string"==typeof t){let n=t.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%)?$/);if(!n)throw new Error("Invalid height");i=n[2]||"px",e=parseFloat(n[1])}else e=t;return{height:e,unit:i}}static defaults(t,...e){return e.forEach((function(e){for(let i in e)!Object.prototype.hasOwnProperty.call(e,i)||null!==t[i]&&void 0!==t[i]||(t[i]=e[i])})),t}static clone(t){return Object.assign({},t)}static closestByClass(t,e){return(t=t.parentElement)?t.classList.contains(e)?t:n.closestByClass(t,e):null}static throttle(t,e){let i=!1;return function(...n){i||(t.apply(this,n),i=!0,setTimeout((function(){i=!1}),e))}}static removePositioningStyles(t){let e=t.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")}static getScrollParent(t){let e;return e=null===t?null:t.scrollHeight>t.clientHeight?t:this.getScrollParent(t.parentElement),e}static updateScrollPosition(t,e,i){let n=t.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight;if(n.top<0||n.bottom>s){let r=n.bottom-s,o=n.top,a=this.getScrollParent(t);if(null!==a){let l=a.scrollTop;n.top<0&&i<0?t.offsetHeight>s?a.scrollTop+=i:a.scrollTop+=Math.abs(o)>Math.abs(i)?i:o:i>0&&(t.offsetHeight>s?a.scrollTop+=i:a.scrollTop+=r>i?i:r),e.top+=a.scrollTop-l}}}}e.Utils=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n{constructor(t){this.grid=t}static registerPlugin(t){n.registeredPlugins.push(t)}static get(){return n.registeredPlugins[0]||n}resizable(t,e,i,n){return this}draggable(t,e,i,n){return this}dragIn(t,e){return this}isDraggable(t){return!1}droppable(t,e,i,n){return this}isDroppable(t){return!1}on(t,e,i){return this}off(t,e){return this}}n.registeredPlugins=[],e.GridStackDD=n},function(t,e,i){"use strict";function n(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,"__esModule",{value:!0}),i(7);const s=i(4),r=i(1),o=i(2);n(i(1)),n(i(4)),n(i(2)),i(5),n(i(5));class a{constructor(t,e={}){this._gsEventHandler={},this.setGridWidth=r.obsolete(this,a.prototype.column,"setGridWidth","column","v0.5.3"),this.setColumn=r.obsolete(this,a.prototype.column,"setColumn","column","v0.6.4"),this.getGridHeight=r.obsolete(this,s.GridStackEngine.prototype.getRow,"getGridHeight","getRow","v1.0.0"),this.el=t,e=e||{},r.obsoleteOpts(e,"width","column","v0.5.3"),r.obsoleteOpts(e,"height","maxRow","v0.5.3"),r.obsoleteOpts(e,"verticalMargin","margin","v2.0"),r.obsoleteOptsDel(e,"oneColumnModeClass","v0.6.3",". Use class `.grid-stack-1` instead"),r.obsoleteAttr(this.el,"data-gs-width","data-gs-column","v0.5.3"),r.obsoleteAttr(this.el,"data-gs-height","data-gs-max-row","v0.5.3"),r.obsoleteAttr(this.el,"data-gs-current-height","data-gs-current-row","v1.0.0"),e.row&&(e.minRow=e.maxRow=e.row,delete e.row);let i=r.Utils.toNumber(t.getAttribute("data-gs-row")),n={column:r.Utils.toNumber(t.getAttribute("data-gs-column"))||12,minRow:i||(r.Utils.toNumber(t.getAttribute("data-gs-min-row"))||0),maxRow:i||(r.Utils.toNumber(t.getAttribute("data-gs-max-row"))||0),itemClass:"grid-stack-item",placeholderClass:"grid-stack-placeholder",placeholderText:"",handle:".grid-stack-item-content",handleClass:null,styleInHead:!1,cellHeight:"auto",margin:10,auto:!0,minWidth:768,float:!1,staticGrid:!1,_class:"grid-stack-instance-"+(1e4*Math.random()).toFixed(0),animate:r.Utils.toBool(t.getAttribute("data-gs-animate"))||!1,alwaysShowResizeHandle:!1,resizable:{autoHide:!e.alwaysShowResizeHandle,handles:"se"},draggable:{handle:(e.handleClass?"."+e.handleClass:e.handle?e.handle:"")||".grid-stack-item-content",scroll:!1,appendTo:"body"},dragIn:void 0,dragInOptions:{revert:"invalid",handle:".grid-stack-item-content",scroll:!1,appendTo:"body"},disableDrag:!1,disableResize:!1,rtl:"auto",removable:!1,removableOptions:{accept:"."+(e.itemClass||"grid-stack-item")},removeTimeout:2e3,marginUnit:"px",cellHeightUnit:"px",disableOneColumnMode:!1,oneColumnModeDomSort:!1};if(this.opts=r.Utils.defaults(e,n),this.initMargin(),!1===this.opts.ddPlugin?this.opts.ddPlugin=o.GridStackDD:void 0===this.opts.ddPlugin&&(this.opts.ddPlugin=o.GridStackDD.get()),this.dd=new this.opts.ddPlugin(this),"auto"===this.opts.rtl&&(this.opts.rtl="rtl"===t.style.direction),this.opts.rtl&&this.el.classList.add("grid-stack-rtl"),this.opts._isNested=null!==r.Utils.closestByClass(this.el,e.itemClass),this.opts._isNested&&this.el.classList.add("grid-stack-nested"),this._isAutoCellHeight="auto"===this.opts.cellHeight,this._isAutoCellHeight){let t=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;this.cellHeight(this.cellWidth()+t,!1)}else this.cellHeight(this.opts.cellHeight,!1);if(this.el.classList.add(this.opts._class),this._setStaticClass(),this._initStyles(),this.engine=new s.GridStackEngine(this.opts.column,(t,e=!0)=>{let i=0;this.engine.nodes.forEach(t=>{i=Math.max(i,t.y+t.height)}),t.forEach(t=>{let i=t.el;e&&null===t._id?i&&i.parentNode&&i.parentNode.removeChild(i):this._writeAttrs(i,t.x,t.y,t.width,t.height)}),this._updateStyles(i+10)},this.opts.float,this.opts.maxRow),this.opts.auto){let t=[];this.getGridItems().forEach(e=>{let i=parseInt(e.getAttribute("data-gs-x")),n=parseInt(e.getAttribute("data-gs-y"));t.push({el:e,i:(Number.isNaN(i)?1e3:i)+(Number.isNaN(n)?1e3:n)*this.opts.column})}),t.sort(t=>t.i).forEach(t=>{this._prepareElement(t.el)})}this.engine.saveInitial(),this.setAnimation(this.opts.animate);let l=document.createElement("div");l.className="placeholder-content",l.innerHTML=this.opts.placeholderText,this.placeholder=document.createElement("div"),this.placeholder.classList.add(this.opts.placeholderClass,this.opts.itemClass),this.placeholder.appendChild(l),this._updateContainerHeight(),window.addEventListener("resize",this._onResizeHandler.bind(this)),this._onResizeHandler(),this._setupDragIn(),this._setupRemoveDrop(),this._setupAcceptWidget()}static init(t={},e=".grid-stack"){let i=a.getGridElement(e);return i?(i.gridstack||(i.gridstack=new a(i,r.Utils.clone(t))),i.gridstack):("string"==typeof e?console.log("gridstack.js: init() no grid was found. Did you forget class "+e+' on your element ?\n".grid-stack" is required for proper CSS styling and drag/drop.'):console.log("gridstack.js: init() no grid element was passed."),null)}static initAll(t={},e=".grid-stack"){let i=[];return a.getGridElements(e).forEach(e=>{e.gridstack||(e.gridstack=new a(e,r.Utils.clone(t))),i.push(e.gridstack)}),0===i.length&&console.log("gridstack.js: initAll() no grid was found. Did you forget class "+e+' on your element ?\n".grid-stack" is required for proper CSS styling and drag/drop.'),i}addWidget(t,e){if(arguments.length>2){console.warn("gridstack.ts: `addWidget(el, x, y, width...)` is deprecated. Use `addWidget(el, {x, y, width,...})`. It will be removed soon");let e=arguments,i=1,n={x:e[i++],y:e[i++],width:e[i++],height:e[i++],autoPosition:e[i++],minWidth:e[i++],maxWidth:e[i++],minHeight:e[i++],maxHeight:e[i++],id:e[i++]};return this.addWidget(t,n)}if("string"==typeof t){let e=document.implementation.createHTMLDocument();e.body.innerHTML=t,t=e.body.children[0]}if(e){let i=this._readAttr(t);r.Utils.defaults(e,i),this.engine.prepareNode(e),this._writeAttr(t,e)}return this.el.appendChild(t),this.makeWidget(t)}save(){return this.engine.save()}load(t,e=!0){let i=a.Utils.sort(t),n=[];if(this.batchUpdate(),e){[...this.engine.nodes].forEach(t=>{i.find(e=>t.id===e.id)||("function"==typeof e?e(t,!1):(n.push(t),this.removeWidget(t.el,!0,!1)))})}i.forEach(t=>{let i=this.engine.nodes.find(e=>e.id===t.id);i?this.update(i.el,t.x,t.y,t.width,t.height):e&&("function"==typeof e?e(t,!0):this.addWidget('
',t))}),this.engine.removedNodes=n,this.commit()}batchUpdate(){return this.engine.batchUpdate(),this}getCellHeight(){if(this.opts.cellHeight&&"auto"!==this.opts.cellHeight)return this.opts.cellHeight;let t=this.el.querySelector("."+this.opts.itemClass),e=r.Utils.toNumber(t.getAttribute("data-gs-height"));return Math.round(t.offsetHeight/e)}cellHeight(t,e=!0){let i=r.Utils.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.height||(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.height,e&&this._updateStyles()),this}cellWidth(){return this.el.offsetWidth/this.opts.column}commit(){return this.engine.commit(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent(),this}compact(){return this.engine.compact(),this._triggerChangeEvent(),this}column(t,e){if(this.opts.column===t)return this;let i=this.opts.column;if(1===t?this._prevColumn=i:delete this._prevColumn,this.el.classList.remove("grid-stack-"+i),this.el.classList.add("grid-stack-"+t),this.opts.column=this.engine.column=t,!0===e)return this;let n=void 0;return 1===t&&this.opts.oneColumnModeDomSort&&(n=[],this.getGridItems().forEach(t=>{t.gridstackNode&&n.push(t.gridstackNode)}),n.length||(n=void 0)),this.engine.updateNodeWidths(i,t,n),this._triggerChangeEvent(!0),this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(t=>t.matches("."+this.opts.itemClass)&&!t.matches("."+this.opts.placeholderClass))}destroy(t=!0){return window.removeEventListener("resize",this._onResizeHandler),this.disable(),t?this.el.parentNode.removeChild(this.el):(this.removeAll(t),this.el.classList.remove(this.opts._class),delete this.el.gridstack),r.Utils.removeStylesheet(this._stylesId),delete this.engine,this}disable(){return this.enableMove(!1),this.enableResize(!1),this._triggerEvent("disable"),this}enable(){return this.enableMove(!0),this.enableResize(!0),this._triggerEvent("enable"),this}enableMove(t,e=!0){return this.getGridItems().forEach(e=>this.movable(e,t)),e&&(this.opts.disableDrag=!t),this}enableResize(t,e=!0){return this.getGridItems().forEach(e=>this.resizable(e,t)),e&&(this.opts.disableResize=!t),this}float(t){return this.engine.float=t,this._triggerChangeEvent(),this}getFloat(){return this.engine.float}getCellFromPixel(t,e=!1){let i,n=this.el.getBoundingClientRect();i=e?{top:n.top+document.documentElement.scrollTop,left:n.left}:{top:this.el.offsetTop,left:this.el.offsetLeft};let s=t.left-i.left,r=t.top-i.top,o=n.width/this.opts.column,a=n.height/parseInt(this.el.getAttribute("data-gs-current-row"));return{x:Math.floor(s/o),y:Math.floor(r/a)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(t,e,i,n){return this.engine.isAreaEmpty(t,e,i,n)}locked(t,e){return this.getElements(t).forEach(t=>{let i=t.gridstackNode;i&&(i.locked=e||!1,i.locked?t.setAttribute("data-gs-locked","yes"):t.removeAttribute("data-gs-locked"))}),this}makeWidget(t){let e=this.getElement(t);return this._prepareElement(e,!0),this._updateContainerHeight(),this._triggerAddEvent(),this._triggerChangeEvent(),e}maxWidth(t,e){return this.getElements(t).forEach(t=>{let i=t.gridstackNode;i&&(i.maxWidth=e||void 0,e?t.setAttribute("data-gs-max-width",String(e)):t.removeAttribute("data-gs-max-width"))}),this}minWidth(t,e){return this.getElements(t).forEach(t=>{t.gridstackNode&&(e?t.setAttribute("data-gs-min-width",String(e)):t.removeAttribute("data-gs-min-width"))}),this}maxHeight(t,e){return this.getElements(t).forEach(t=>{t.gridstackNode&&(e?t.setAttribute("data-gs-max-height",String(e)):t.removeAttribute("data-gs-max-height"))}),this}minHeight(t,e){return this.getElements(t).forEach(t=>{t.gridstackNode&&(e?t.setAttribute("data-gs-min-height",String(e)):t.removeAttribute("data-gs-min-height"))}),this}movable(t,e){return this.getElements(t).forEach(t=>{let i=t.gridstackNode;i&&(i.noMove=!e,i.noMove?(this.dd.draggable(t,"disable"),t.classList.remove("ui-draggable-handle")):(this.dd.draggable(t,"enable"),t.classList.remove("ui-draggable-handle")))}),this}move(t,e,i){return this._updateElement(t,(t,n)=>{e=void 0!==e?e:n.x,i=void 0!==i?i:n.y,this.engine.moveNode(n,e,i,n.width,n.height)}),this}on(t,e){if(-1!==t.indexOf(" ")){return t.split(" ").forEach(t=>this.on(t,e)),this}if("change"===t||"added"===t||"removed"===t||"enable"===t||"disable"===t){let i="enable"===t||"disable"===t;this._gsEventHandler[t]=i?t=>e(t):t=>e(t,t.detail),this.el.addEventListener(t,this._gsEventHandler[t])}else"dragstart"===t||"dragstop"===t||"resizestart"===t||"resizestop"===t||"dropped"===t?this._gsEventHandler[t]=e:console.log("gridstack.on("+t+") event not supported");return this}off(t){if(-1!==t.indexOf(" ")){return t.split(" ").forEach(t=>this.off(t)),this}return"change"!==t&&"added"!==t&&"removed"!==t&&"enable"!==t&&"disable"!==t||this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this}removeWidget(t,e=!0,i=!0){return this.getElements(t).forEach(t=>{if(t.parentElement!==this.el)return;let n=t.gridstackNode;n||(n=this.engine.nodes.find(e=>t===e.el)),n&&(delete t.gridstackNode,this.dd.draggable(t,"destroy").resizable(t,"destroy"),this.engine.removeNode(n,e,i),e&&t.parentElement&&t.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this}removeAll(t=!0){return this.engine.nodes.forEach(t=>{delete t.el.gridstackNode,this.dd.draggable(t.el,"destroy").resizable(t.el,"destroy")}),this.engine.removeAll(t),this._triggerRemoveEvent(),this}resize(t,e,i){return this._updateElement(t,(t,n)=>{e=e||n.width,i=i||n.height,this.engine.moveNode(n,n.x,n.y,e,i)}),this}resizable(t,e){return this.getElements(t).forEach(t=>{let i=t.gridstackNode;i&&(i.noResize=!e,i.noResize?this.dd.resizable(t,"disable"):this.dd.resizable(t,"enable"))}),this}setAnimation(t){return t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}setStatic(t){return this.opts.staticGrid=!0===t,this.enableMove(!t),this.enableResize(!t),this._setStaticClass(),this}update(t,e,i,n,s){return this._updateElement(t,(t,r)=>{e=void 0!==e?e:r.x,i=void 0!==i?i:r.y,n=n||r.width,s=s||r.height,this.engine.moveNode(r,e,i,n,s)}),this}margin(t){let e=r.Utils.parseHeight(t);if(this.opts.marginUnit!==e.unit||this.opts.margin!==e.height)return this.opts.marginUnit=e.unit,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=this.opts.margin=e.height,this._updateStyles(),this}getMargin(){return this.opts.margin}willItFit(t,e,i,n,s){return this.engine.canBePlacedWithRespectToHeight({x:t,y:e,width:i,height:n,autoPosition:s})}_triggerChangeEvent(t){if(this.engine.batchMode)return this;let e=this.engine.getDirtyNodes(!0);return e&&e.length&&(t||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){return this.engine.batchMode||this.engine.addedNodes&&this.engine.addedNodes.length>0&&(this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty}),this._triggerEvent("added",this.engine.addedNodes),this.engine.addedNodes=[]),this}_triggerRemoveEvent(){return this.engine.batchMode||this.engine.removedNodes&&this.engine.removedNodes.length>0&&(this._triggerEvent("removed",this.engine.removedNodes),this.engine.removedNodes=[]),this}_triggerEvent(t,e){let i=e?new CustomEvent(t,{bubbles:!1,detail:e}):new Event(t);return this.el.dispatchEvent(i),this}_initStyles(){this._stylesId&&r.Utils.removeStylesheet(this._stylesId),this._stylesId="gridstack-style-"+(1e5*Math.random()).toFixed();let t=this.opts.styleInHead?void 0:this.el.parentNode;return this._styles=r.Utils.createStylesheet(this._stylesId,t),null!==this._styles&&(this._styles._max=0),this}_updateStyles(t){if(!this._styles)return this;if(void 0===t&&(t=this._styles._max),this._initStyles(),this._updateContainerHeight(),!this.opts.cellHeight)return this;if(0!==this._styles._max&&t<=this._styles._max)return this;let e=this.opts.cellHeight,i=this.opts.cellHeightUnit,n=`.${this.opts._class} > .${this.opts.itemClass}`;if(0===this._styles._max){r.Utils.addCSSRule(this._styles,n,`min-height: ${e}${i}`);let t=this.opts.marginTop+this.opts.marginUnit,s=this.opts.marginBottom+this.opts.marginUnit,o=this.opts.marginRight+this.opts.marginUnit,a=this.opts.marginLeft+this.opts.marginUnit,l=n+" > .grid-stack-item-content",h=`.${this.opts._class} > .grid-stack-placeholder > .placeholder-content`;r.Utils.addCSSRule(this._styles,l,`top: ${t}; right: ${o}; bottom: ${s}; left: ${a};`),r.Utils.addCSSRule(this._styles,h,`top: ${t}; right: ${o}; bottom: ${s}; left: ${a};`),r.Utils.addCSSRule(this._styles,n+" > .ui-resizable-ne","right: "+o),r.Utils.addCSSRule(this._styles,n+" > .ui-resizable-e","right: "+o),r.Utils.addCSSRule(this._styles,n+" > .ui-resizable-se",`right: ${o}; bottom: ${s}`),r.Utils.addCSSRule(this._styles,n+" > .ui-resizable-nw","left: "+a),r.Utils.addCSSRule(this._styles,n+" > .ui-resizable-w","left: "+a),r.Utils.addCSSRule(this._styles,n+" > .ui-resizable-sw",`left: ${a}; bottom: ${s}`)}if(t>this._styles._max){let s=t=>e*t+i;for(let e=this._styles._max+1;e<=t;e++){let t=s(e);r.Utils.addCSSRule(this._styles,`${n}[data-gs-y="${e-1}"]`,"top: "+s(e-1)),r.Utils.addCSSRule(this._styles,`${n}[data-gs-height="${e}"]`,"height: "+t),r.Utils.addCSSRule(this._styles,`${n}[data-gs-min-height="${e}"]`,"min-height: "+t),r.Utils.addCSSRule(this._styles,`${n}[data-gs-max-height="${e}"]`,"max-height: "+t)}this._styles._max=t}return this}_updateContainerHeight(){if(this.engine.batchMode)return this;let t=this.getRow(),e=parseInt(getComputedStyle(this.el)["min-height"]);if(e>0){let i=Math.round(e/this.getCellHeight());t{t.classList.add("grid-stack-item-removing"),e._isAboutToRemove=!0},this.opts.removeTimeout),this):this}_clearRemovingTimeout(t){let e=t.gridstackNode;return e&&e._removeTimeout?(clearTimeout(e._removeTimeout),delete e._removeTimeout,t.classList.remove("grid-stack-item-removing"),delete e._isAboutToRemove,this):this}_prepareDragDropByNode(t){let e,i,n=t.el,s=(s,r)=>{this._gsEventHandler[s.type]&&this._gsEventHandler[s.type](s,s.target),this.engine.cleanNodes(),this.engine.beginUpdate(t),e=this.cellWidth(),i=this.getCellHeight();let{target:o}=s;this.placeholder.setAttribute("data-gs-x",o.getAttribute("data-gs-x")),this.placeholder.setAttribute("data-gs-y",o.getAttribute("data-gs-y")),this.placeholder.setAttribute("data-gs-width",o.getAttribute("data-gs-width")),this.placeholder.setAttribute("data-gs-height",o.getAttribute("data-gs-height")),this.el.append(this.placeholder),t.el=this.placeholder,t._beforeDragX=t.x,t._beforeDragY=t.y,t._prevYPix=r.position.top;let a=t.minHeight||1;if(this.dd.resizable(n,"option","minWidth",e*(t.minWidth||1)),this.dd.resizable(n,"option","minHeight",i*a),"resizestart"===s.type){let t=o.querySelector(".grid-stack-item");if(t){document.createEvent("HTMLEvents").initEvent("resizestart",!0,!1),t.dispatchEvent(s)}}},o=(s,o)=>{let a,l,h=Math.round(o.position.left/e),d=Math.floor((o.position.top+i/2)/i);if("drag"===s.type){let e=o.position.top-t._prevYPix;if(t._prevYPix=o.position.top,r.Utils.updateScrollPosition(n,o.position,e),n.dataset.inTrashZone||h<0||h>=this.engine.column||d<0||!this.engine.float&&d>this.engine.getRow()){if(t._temporaryRemoved)return;!0===this.opts.removable&&this._setupRemovingTimeout(n),h=t._beforeDragX,d=t._beforeDragY,this.placeholder.parentNode===this.el&&this.el.removeChild(this.placeholder),this.engine.removeNode(t),this._updateContainerHeight(),t._temporaryRemoved=!0}else this._clearRemovingTimeout(n),t._temporaryRemoved&&(this.engine.addNode(t),this._writeAttrs(this.placeholder,h,d,a,l),this.el.appendChild(this.placeholder),t.el=this.placeholder,delete t._temporaryRemoved)}else if("resize"===s.type){if(h<0)return;a=Math.round(o.size.width/e),l=Math.round((o.size.height+this.getMargin())/i)}let u=a||t._lastTriedWidth,c=l||t._lastTriedHeight;!this.engine.canMoveNode(t,h,d,a,l)||t._lastTriedX===h&&t._lastTriedY===d&&t._lastTriedWidth===u&&t._lastTriedHeight===c||(t._lastTriedX=h,t._lastTriedY=d,t._lastTriedWidth=a,t._lastTriedHeight=l,this.engine.moveNode(t,h,d,a,l),this._updateContainerHeight())},a=e=>{this.placeholder.parentNode===this.el&&this.el.removeChild(this.placeholder);let i=e.target;if(i.gridstackNode&&i.gridstackNode.grid===this){if(t.el=i,t._isAboutToRemove){let s=n.gridstackNode.grid;s._gsEventHandler[e.type]&&s._gsEventHandler[e.type](e,i),s.engine.removedNodes.push(t),s._triggerRemoveEvent(),delete n.gridstackNode,n.remove()}else this._clearRemovingTimeout(n),t._temporaryRemoved?(r.Utils.removePositioningStyles(i),this._writeAttrs(i,t._beforeDragX,t._beforeDragY,t.width,t.height),t.x=t._beforeDragX,t.y=t._beforeDragY,delete t._temporaryRemoved,this.engine.addNode(t)):(r.Utils.removePositioningStyles(i),this._writeAttrs(i,t.x,t.y,t.width,t.height)),this._gsEventHandler[e.type]&&this._gsEventHandler[e.type](e,i);this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),"resizestop"===e.type&&i.querySelectorAll(".grid-stack").forEach(t=>t.gridstack._onResizeHandler())}};return this.dd.draggable(n,{start:s,stop:a,drag:o}).resizable(n,{start:s,stop:a,resize:o}),(t.noMove||this.opts.disableDrag||this.opts.staticGrid)&&this.dd.draggable(n,"disable"),(t.noResize||this.opts.disableResize||this.opts.staticGrid)&&this.dd.resizable(n,"disable"),this._writeAttr(n,t),this}_prepareElement(t,e=!1){t.classList.add(this.opts.itemClass);let i=this._readAttr(t,{el:t,grid:this});return i=this.engine.addNode(i,e),t.gridstackNode=i,this._prepareDragDropByNode(i),this}_writeAttrs(t,e,i,n,s){return null!=e&&t.setAttribute("data-gs-x",String(e)),null!=i&&t.setAttribute("data-gs-y",String(i)),n&&t.setAttribute("data-gs-width",String(n)),s&&t.setAttribute("data-gs-height",String(s)),this}_writeAttr(t,e){return e?(this._writeAttrs(t,e.x,e.y,e.width,e.height),e.autoPosition?t.setAttribute("data-gs-auto-position","true"):t.removeAttribute("data-gs-auto-position"),e.minWidth&&t.setAttribute("data-gs-min-width",String(e.minWidth)),e.maxWidth&&t.setAttribute("data-gs-max-width",String(e.maxWidth)),e.minHeight&&t.setAttribute("data-gs-min-height",String(e.minHeight)),e.maxHeight&&t.setAttribute("data-gs-max-height",String(e.maxHeight)),e.noResize?t.setAttribute("data-gs-no-resize","true"):t.removeAttribute("data-gs-no-resize"),e.noMove?t.setAttribute("data-gs-no-move","true"):t.removeAttribute("data-gs-no-move"),e.locked?t.setAttribute("data-gs-locked","true"):t.removeAttribute("data-gs-locked"),e.resizeHandles&&t.setAttribute("data-gs-resize-handles",e.resizeHandles),e.id&&t.setAttribute("data-gs-id",String(e.id)),this):this}_readAttr(t,e={}){return e.x=r.Utils.toNumber(t.getAttribute("data-gs-x")),e.y=r.Utils.toNumber(t.getAttribute("data-gs-y")),e.width=r.Utils.toNumber(t.getAttribute("data-gs-width")),e.height=r.Utils.toNumber(t.getAttribute("data-gs-height")),e.maxWidth=r.Utils.toNumber(t.getAttribute("data-gs-max-width")),e.minWidth=r.Utils.toNumber(t.getAttribute("data-gs-min-width")),e.maxHeight=r.Utils.toNumber(t.getAttribute("data-gs-max-height")),e.minHeight=r.Utils.toNumber(t.getAttribute("data-gs-min-height")),e.autoPosition=r.Utils.toBool(t.getAttribute("data-gs-auto-position")),e.noResize=r.Utils.toBool(t.getAttribute("data-gs-no-resize")),e.noMove=r.Utils.toBool(t.getAttribute("data-gs-no-move")),e.locked=r.Utils.toBool(t.getAttribute("data-gs-locked")),e.resizeHandles=t.getAttribute("data-gs-resize-handles"),e.id=t.getAttribute("data-gs-id"),e}_updateElement(t,e){let i=this.getElement(t);if(!i)return this;let n=i.gridstackNode;return n?(this.engine.cleanNodes(),this.engine.beginUpdate(n),e.call(this,i,n),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),this):this}_setStaticClass(){let t="grid-stack-static";return!0===this.opts.staticGrid?this.el.classList.add(t):this.el.classList.remove(t),this}_onResizeHandler(){if(this._isAutoCellHeight&&r.Utils.throttle(()=>{let t=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;this.cellHeight(this.cellWidth()+t)},100),!this.opts.disableOneColumnMode&&this.el.clientWidth<=this.opts.minWidth){if(this._oneColumnMode)return this;this._oneColumnMode=!0,this.column(1)}else{if(!this._oneColumnMode)return this;delete this._oneColumnMode,this.column(this._prevColumn)}return this}_setupDragIn(){return this.opts.staticGrid||"string"!=typeof this.opts.dragIn||this.dd.isDraggable(this.opts.dragIn)||this.dd.dragIn(this.opts.dragIn,this.opts.dragInOptions),this}_setupRemoveDrop(){if(!this.opts.staticGrid&&"string"==typeof this.opts.removable){let t=document.querySelector(this.opts.removable);if(!t)return this;this.dd.isDroppable(t)||this.dd.droppable(t,this.opts.removableOptions),this.dd.on(t,"dropover",(t,e)=>{let i=e.gridstackNode;i&&i.grid===this&&(e.dataset.inTrashZone="true",this._setupRemovingTimeout(e))}).on(t,"dropout",(t,e)=>{let i=e.gridstackNode;i&&i.grid===this&&(delete e.dataset.inTrashZone,this._clearRemovingTimeout(e))})}return this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets)return this;let t=(t,e)=>{let i=e.gridstackNode,n=this.getCellFromPixel({left:t.pageX,top:t.pageY},!0),s=Math.max(0,n.x),r=Math.max(0,n.y);i._added?s===i.x&&r===i.y||!this.engine.canMoveNode(i,s,r)||(this.engine.moveNode(i,s,r),this._updateContainerHeight()):(i._added=!0,i.el=e,i.x=s,i.y=r,delete i.autoPosition,this.engine.cleanNodes(),this.engine.beginUpdate(i),this.engine.addNode(i),this._writeAttrs(this.placeholder,i.x,i.y,i.width,i.height),this.el.appendChild(this.placeholder),i.el=this.placeholder,i._beforeDragX=i.x,i._beforeDragY=i.y,this._updateContainerHeight())};return this.dd.droppable(this.el,{accept:t=>{let e=t.gridstackNode;if(e&&e.grid===this)return!1;if("function"==typeof this.opts.acceptWidgets)return this.opts.acceptWidgets(t);let i=!0===this.opts.acceptWidgets?".grid-stack-item":this.opts.acceptWidgets;return t.matches(i)}}).on(this.el,"dropover",(e,i)=>{let n,s,r=i.gridstackNode;if(!r||!r.width||!r.height){let t=parseInt(i.getAttribute("data-gs-width"));t>0&&(r=r||{},r.width=t);let e=parseInt(i.getAttribute("data-gs-height"));e>0&&(r=r||{},r.height=e)}let o=this.cellWidth(),a=this.getCellHeight();n=r&&r.width?r.width:Math.round(i.offsetWidth/o)||1,s=r&&r.height?r.height:Math.round(i.offsetHeight/a)||1;let l=this.engine.prepareNode({width:n,height:s,_added:!1,_temporary:!0});return l._isOutOfGrid=!0,i.gridstackNode=l,i._gridstackNodeOrig=r,this.dd.on(i,"drag",t),!1}).on(this.el,"dropout",(t,e)=>{let i=e.gridstackNode;if(i&&i._isOutOfGrid)return this.dd.off(e,"drag"),i.el=null,this.engine.removeNode(i),this.placeholder.parentNode===this.el&&this.el.removeChild(this.placeholder),this._updateContainerHeight(),e.gridstackNode=e._gridstackNodeOrig,!1}).on(this.el,"drop",(t,e,i)=>{this.placeholder.remove();let n=e._gridstackNodeOrig;if(delete e._gridstackNodeOrig,n&&n.grid&&n.grid!==this){let t=n.grid;t.placeholder.remove(),n.el=e,t.engine.removedNodes.push(n),t._triggerRemoveEvent()}let s=e.gridstackNode;return this.engine.cleanupNode(s),s.grid=this,this.dd.off(e,"drag"),i!==e?(i.remove(),e.gridstackNode=n,e=e.cloneNode(!0)):(e.remove(),this.dd.draggable(e,"destroy").resizable(e,"destroy")),e.gridstackNode=s,s.el=e,r.Utils.removePositioningStyles(e),this._writeAttr(e,s),this.el.appendChild(e),this._updateContainerHeight(),this.engine.addedNodes.push(s),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({type:"dropped"},n&&n.grid?n:void 0,s),window.setTimeout(()=>{s.el&&s.el.parentElement&&this._prepareDragDropByNode(s)}),!1}),this}getElement(t=".grid-stack-item"){return"string"==typeof t?document.querySelector(t)||document.querySelector("#"+t)||document.querySelector("."+t):t}getElements(t=".grid-stack-item"){if("string"==typeof t){let e=document.querySelectorAll(t);return e.length||(e=document.querySelectorAll("."+t)),e.length||(e=document.querySelectorAll("#"+t)),Array.from(e)}return[t]}static getGridElement(t=".grid-stack"){return"string"==typeof t?document.querySelector(t)||document.querySelector("#"+t)||document.querySelector("."+t):t}static getGridElements(t=".grid-stack"){if("string"==typeof t){let e=document.querySelectorAll(t);return e.length||(e=document.querySelectorAll("."+t)),e.length||(e=document.querySelectorAll("#"+t)),Array.from(e)}return[t]}initMargin(){let t=r.Utils.parseHeight(this.opts.margin);this.opts.marginUnit=t.unit;let e=this.opts.margin=t.height;return void 0===this.opts.marginTop?this.opts.marginTop=e:(t=r.Utils.parseHeight(this.opts.marginTop),this.opts.marginTop=t.height,delete this.opts.margin),void 0===this.opts.marginBottom?this.opts.marginBottom=e:(t=r.Utils.parseHeight(this.opts.marginBottom),this.opts.marginBottom=t.height,delete this.opts.margin),void 0===this.opts.marginRight?this.opts.marginRight=e:(t=r.Utils.parseHeight(this.opts.marginRight),this.opts.marginRight=t.height,delete this.opts.margin),void 0===this.opts.marginLeft?this.opts.marginLeft=e:(t=r.Utils.parseHeight(this.opts.marginLeft),this.opts.marginLeft=t.height,delete this.opts.margin),this.opts.marginUnit=t.unit,this}}a.Utils=r.Utils,a.Engine=s.GridStackEngine,e.GridStack=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=i(1);class s{constructor(t=12,e,i=!1,r=0,o=[]){this.addedNodes=[],this.removedNodes=[],this.getGridHeight=n.obsolete(this,s.prototype.getRow,"getGridHeight","getRow","v1.0.0"),this.column=t,this.onchange=e,this._float=i,this.maxRow=r,this.nodes=o}batchUpdate(){return this.batchMode||(this.batchMode=!0,this._prevFloat=this._float,this._float=!0),this}commit(){return this.batchMode?(this.batchMode=!1,this._float=this._prevFloat,delete this._prevFloat,this._packNodes(),this._notify(),this):this}_fixCollisions(t){this._sortNodes(-1);let e=t,i=Boolean(this.nodes.find(t=>t.locked));for(this.float||i||(e={x:0,y:t.y,width:this.column,height:t.height});;){let i,s=this.nodes.find(i=>i!==t&&n.Utils.isIntercepted(i,e),{node:t,nn:e});if(!s)return this;if(i=s.locked?this.moveNode(t,t.x,s.y+s.height,t.width,t.height,!0):this.moveNode(s,s.x,t.y+t.height,s.width,s.height,!0),!i)return this}}isAreaEmpty(t,e,i,s){let r={x:t||0,y:e||0,width:i||1,height:s||1};return!this.nodes.find(t=>n.Utils.isIntercepted(t,r))}compact(){if(0===this.nodes.length)return this;this.batchUpdate(),this._sortNodes();let t=this.nodes;return this.nodes=[],t.forEach(t=>{t.noMove||t.locked||(t.autoPosition=!0),this.addNode(t,!1),t._dirty=!0}),this.commit(),this}set float(t){this._float!==t&&(this._float=t||!1,t||(this._packNodes(),this._notify()))}get float(){return this._float||!1}_sortNodes(t){return this.nodes=n.Utils.sort(this.nodes,t,this.column),this}_packNodes(){return this._sortNodes(),this.float?this.nodes.forEach((t,e)=>{if(t._updating||void 0===t._packY||t.y===t._packY)return this;let i=t.y;for(;i>=t._packY;){let s={x:t.x,y:i,width:t.width,height:t.height};this.nodes.slice(0,e).find(t=>n.Utils.isIntercepted(s,t),{n:t,newY:i})||(t._dirty=!0,t.y=i),--i}}):this.nodes.forEach((t,e)=>{if(t.locked)return this;for(;t.y>0;){let i=t.y-1,s=0===e,r={x:t.x,y:i,width:t.width,height:t.height};if(e>0){s=void 0===this.nodes.slice(0,e).find(t=>n.Utils.isIntercepted(r,t),{n:t,newY:i})}if(!s)break;t._dirty=t.y!==i,t.y=i}}),this}prepareNode(t,e){void 0!==(t=t||{}).x&&void 0!==t.y&&null!==t.x&&null!==t.y||(t.autoPosition=!0);let i={width:1,height:1,x:0,y:0};return(t=n.Utils.defaults(t,i)).autoPosition=t.autoPosition||!1,t.noResize=t.noResize||!1,t.noMove=t.noMove||!1,Number.isNaN(t.x)&&(t.x=i.x,t.autoPosition=!0),Number.isNaN(t.y)&&(t.y=i.y,t.autoPosition=!0),Number.isNaN(t.width)&&(t.width=i.width),Number.isNaN(t.height)&&(t.height=i.height),t.maxWidth&&(t.width=Math.min(t.width,t.maxWidth)),t.maxHeight&&(t.height=Math.min(t.height,t.maxHeight)),t.minWidth&&(t.width=Math.max(t.width,t.minWidth)),t.minHeight&&(t.height=Math.max(t.height,t.minHeight)),t.width>this.column?t.width=this.column:t.width<1&&(t.width=1),this.maxRow&&t.height>this.maxRow?t.height=this.maxRow:t.height<1&&(t.height=1),t.x<0&&(t.x=0),t.y<0&&(t.y=0),t.x+t.width>this.column&&(e?t.width=this.column-t.x:t.x=this.column-t.width),this.maxRow&&t.y+t.height>this.maxRow&&(e?t.height=this.maxRow-t.y:t.y=this.maxRow-t.height),t}getDirtyNodes(t){if(t){let t=[];return this.nodes.forEach(e=>{e._dirty&&(e.y===e._origY&&e.x===e._origX&&e.width===e._origW&&e.height===e._origH?delete e._dirty:t.push(e))}),t}return this.nodes.filter(t=>t._dirty)}_notify(t,e=!0){if(this.batchMode)return this;let i=(t=void 0===t?[]:Array.isArray(t)?t:[t]).concat(this.getDirtyNodes());return this.onchange&&this.onchange(i,e),this}cleanNodes(){return this.batchMode||this.nodes.forEach(t=>{delete t._dirty}),this}addNode(t,e=!1){if((t=this.prepareNode(t))._id=t._id||s._idSeq++,t.autoPosition){this._sortNodes();for(let e=0;;++e){let i=e%this.column,s=Math.floor(e/this.column);if(i+t.width>this.column)continue;let r={x:i,y:s,width:t.width,height:t.height};if(!this.nodes.find(t=>n.Utils.isIntercepted(r,t),{x:i,y:s,node:t})){t.x=i,t.y=s,delete t.autoPosition;break}}}return this.nodes.push(t),e&&this.addedNodes.push(t),this._fixCollisions(t),this._packNodes(),this._notify(),t}removeNode(t,e=!0,i=!1){return i&&this.removedNodes.push(t),t._id=null,this.nodes.splice(this.nodes.findIndex(e=>e===t),1),this.float||this._packNodes(),this._notify(t,e),this}removeAll(t=!0){return delete this._layouts,0===this.nodes.length||(t&&this.nodes.forEach(t=>{t._id=null}),this.removedNodes=this.nodes,this.nodes=[],this._notify(this.removedNodes,t)),this}canMoveNode(t,e,i,r,o){if(!this.isNodeChangedPosition(t,e,i,r,o))return!1;let a,l=Boolean(this.nodes.find(t=>t.locked));if(!this.maxRow&&!l)return!0;let h=new s(this.column,null,this.float,0,this.nodes.map(e=>e===t?(a=n.Utils.clone(e),a):n.Utils.clone(e)));if(!a)return!0;h.moveNode(a,e,i,r,o);let d=!0;return l&&(d=d&&!Boolean(h.nodes.find(t=>t!==a&&Boolean(t.locked)&&Boolean(t._dirty)))),this.maxRow&&(d=d&&h.getRow()<=this.maxRow),d}canBePlacedWithRespectToHeight(t){if(!this.maxRow)return!0;let e=new s(this.column,null,this.float,0,this.nodes.map(t=>n.Utils.clone(t)));return e.addNode(t),e.getRow()<=this.maxRow}isNodeChangedPosition(t,e,i,n,s){return"number"!=typeof e&&(e=t.x),"number"!=typeof i&&(i=t.y),"number"!=typeof n&&(n=t.width),"number"!=typeof s&&(s=t.height),t.maxWidth&&(n=Math.min(n,t.maxWidth)),t.maxHeight&&(s=Math.min(s,t.maxHeight)),t.minWidth&&(n=Math.max(n,t.minWidth)),t.minHeight&&(s=Math.max(s,t.minHeight)),t.x!==e||t.y!==i||t.width!==n||t.height!==s}moveNode(t,e,i,n,s,r){if(t.locked)return null;"number"!=typeof e&&(e=t.x),"number"!=typeof i&&(i=t.y),"number"!=typeof n&&(n=t.width),"number"!=typeof s&&(s=t.height);let o=t.width!==n||t.height!==s,a={x:e,y:i,width:n,height:s,maxWidth:t.maxWidth,maxHeight:t.maxHeight,minWidth:t.minWidth,minHeight:t.minHeight};return a=this.prepareNode(a,o),t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height?null:(t._dirty=!0,t.x=t._lastTriedX=a.x,t.y=t._lastTriedY=a.y,t.width=t._lastTriedWidth=a.width,t.height=t._lastTriedHeight=a.height,this._fixCollisions(t),r||(this._packNodes(),this._notify()),t)}getRow(){return this.nodes.reduce((t,e)=>Math.max(t,e.y+e.height),0)}beginUpdate(t){return t._updating||(t._updating=!0,this.nodes.forEach(t=>{t._packY=t.y})),this}endUpdate(){let t=this.nodes.find(t=>t._updating);return t&&(delete t._updating,this.nodes.forEach(t=>{delete t._packY})),this}save(){let t=[];return n.Utils.sort(this.nodes),this.nodes.forEach(e=>{let i={};for(let t in e)"_"!==t[0]&&null!==e[t]&&void 0!==e[t]&&(i[t]=e[t]);delete i.el,delete i.grid,i.autoPosition||delete i.autoPosition,i.noResize||delete i.noResize,i.noMove||delete i.noMove,i.locked||delete i.locked,t.push(i)}),t}layoutsNodesChange(t){return!this._layouts||this._ignoreLayoutsNodeChange||this._layouts.forEach((e,i)=>{if(!e||i===this.column)return this;i{let n=e.find(e=>e._id===t._id);if(!n)return this;let s=i/this.column;t.y!==t._origY&&(n.y+=t.y-t._origY),t.x!==t._origX&&(n.x=Math.round(t.x*s)),t.width!==t._origW&&(n.width=Math.round(t.width*s))})}),this}updateNodeWidths(t,e,i){if(!this.nodes.length||t===e)return this;let s=[];if(this.nodes.forEach((t,e)=>{s[e]={x:t.x,y:t.y,width:t.width,_id:t._id}}),this._layouts=this._layouts||[],this._layouts[t]=s,1===e&&i&&i.length){let t=0;i.forEach(e=>{e.x=0,e.width=1,e.y=Math.max(e.y,t),t=e.y+e.height})}else i=n.Utils.sort(this.nodes,-1,t);let r=this._layouts[e]||[],o=this._layouts.length-1;0===r.length&&e>t&&e{let e=i.findIndex(e=>e._id===t._id);-1!==e&&(i[e].x=t.x,i[e].y=t.y,i[e].width=t.width)}),r=[]));let a=[];r.forEach(t=>{let e=i.findIndex(e=>e&&e._id===t._id);-1!==e&&(i[e].x=t.x,i[e].y=t.y,i[e].width=t.width,a.push(i[e]),i[e]=null)});let l=e/t;return i.forEach(i=>{if(!i)return this;i.x=1===e?0:Math.round(i.x*l),i.width=1===e||1===t?1:Math.round(i.width*l)||1,a.push(i)}),a=n.Utils.sort(a,-1,e),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(),this.nodes=[],a.forEach(t=>{this.addNode(t,!1),t._dirty=!0},this),this.commit(),delete this._ignoreLayoutsNodeChange,this}saveInitial(){return this.nodes.forEach(t=>{t._origX=t.x,t._origY=t.y,t._origW=t.width,t._origH=t.height,delete t._dirty}),this}cleanupNode(t){for(let e in t)"_"===e[0]&&delete t[e]}}s._idSeq=1,e.GridStackEngine=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=i(2),s=i(8);e.$=s,function(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}(i(9));class r extends n.GridStackDD{constructor(t){super(t)}resizable(t,e,i,n){let r=s(t);if("disable"===e||"enable"===e)r.resizable(e);else if("destroy"===e)r.data("ui-resizable")&&r.resizable(e);else if("option"===e)r.resizable(e,i,n);else{let t=r.data("gs-resize-handles")?r.data("gs-resize-handles"):this.grid.opts.resizable.handles;r.resizable(Object.assign({},this.grid.opts.resizable,{handles:t},{start:e.start,stop:e.stop,resize:e.resize}))}return this}draggable(t,e,i,n){let r=s(t);return"disable"===e||"enable"===e?r.draggable(e):"destroy"===e?r.data("ui-draggable")&&r.draggable(e):"option"===e?r.draggable(e,i,n):r.draggable(Object.assign({},this.grid.opts.draggable,{containment:this.grid.opts._isNested&&!this.grid.opts.dragOut?s(this.grid.el).parent():this.grid.opts.draggable.containment||null,start:e.start,stop:e.stop,drag:e.drag})),this}dragIn(t,e){return s(t).draggable(e),this}droppable(t,e,i,n){let r=s(t);return"function"!=typeof e.accept||e._accept||(e._accept=e.accept,e.accept=t=>e._accept(t.get(0))),r.droppable(e,i,n),this}isDroppable(t){let e=s(t);return Boolean(e.data("ui-droppable"))}isDraggable(t){let e=s(t);return Boolean(e.data("ui-draggable"))}on(t,e,i){return s(t).on(e,(t,e)=>{i(t,e.draggable?e.draggable[0]:t.target,e.helper?e.helper[0]:null)}),this}off(t,e){return s(t).off(e),this}}e.GridStackDDJQueryUI=r,n.GridStackDD.registerPlugin(r)},function(t,e){t.exports=' '},function(t,e){!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}}(),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 n=arguments[1],s=0;s>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],s=0;s>10|55296,1023&i|56320))}function i(){f()}var n,s,r,o,a,l,h,d,u,c,p,f,g,m,v,y,b,w,_,x="sizzle"+ +new Date,k=t.document,C=0,E=0,S=lt(),T=lt(),N=lt(),A=lt(),H=function(t,e){return t===e&&(p=!0),0},P={}.hasOwnProperty,z=[],D=z.pop,R=z.push,M=z.push,L=z.slice,$=function(t,e){for(var i=0,n=t.length;i+~]|"+j+")"+j+"*"),Y=new RegExp(j+"|>"),X=new RegExp(q),J=new RegExp("^"+I+"$"),V={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,tt=/^[^{]+\{\s*\[native \w/,et=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,it=/[+~]/,nt=new RegExp("\\\\[\\da-fA-F]{1,6}"+j+"?|\\\\([^\\r\\n\\f])","g"),st=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{M.apply(z=L.call(k.childNodes),k.childNodes),z[k.childNodes.length].nodeType}catch(n){M={apply:z.length?function(t,e){R.apply(t,L.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function at(t,e,i,n){var r,o,a,h,u,c,p,m=e&&e.ownerDocument,b=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return i;if(!n&&(f(e),e=e||g,v)){if(11!==b&&(u=et.exec(t)))if(r=u[1]){if(9===b){if(!(a=e.getElementById(r)))return i;if(a.id===r)return i.push(a),i}else if(m&&(a=m.getElementById(r))&&_(e,a)&&a.id===r)return i.push(a),i}else{if(u[2])return M.apply(i,e.getElementsByTagName(t)),i;if((r=u[3])&&s.getElementsByClassName&&e.getElementsByClassName)return M.apply(i,e.getElementsByClassName(r)),i}if(s.qsa&&!A[t+" "]&&(!y||!y.test(t))&&(1!==b||"object"!==e.nodeName.toLowerCase())){if(p=t,m=e,1===b&&(Y.test(t)||G.test(t))){for((m=it.test(t)&&vt(e.parentNode)||e)===e&&s.scope||((h=e.getAttribute("id"))?h=h.replace(st,rt):e.setAttribute("id",h=x)),o=(c=l(t)).length;o--;)c[o]=(h?"#"+h:":scope")+" "+bt(c[o]);p=c.join(",")}try{return M.apply(i,m.querySelectorAll(p)),i}catch(e){A(t,!0)}finally{h===x&&e.removeAttribute("id")}}}return d(t.replace(B,"$1"),e,i,n)}function lt(){var t=[];return function e(i,n){return t.push(i+" ")>r.cacheLength&&delete e[t.shift()],e[i+" "]=n}}function ht(t){return t[x]=!0,t}function dt(t){var e=g.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){for(var i=t.split("|"),n=i.length;n--;)r.attrHandle[i[n]]=e}function ct(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function gt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ht((function(e){return e=+e,ht((function(i,n){for(var s,r=t([],i.length,e),o=r.length;o--;)i[s=r[o]]&&(i[s]=!(n[s]=i[s]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(n in s=at.support={},a=at.isXML=function(t){var e=t.namespaceURI,i=(t.ownerDocument||t).documentElement;return!K.test(e||i&&i.nodeName||"HTML")},f=at.setDocument=function(t){var n,o,l=t?t.ownerDocument||t:k;return l!=g&&9===l.nodeType&&l.documentElement&&(m=(g=l).documentElement,v=!a(g),k!=g&&(o=g.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",i,!1):o.attachEvent&&o.attachEvent("onunload",i)),s.scope=dt((function(t){return m.appendChild(t).appendChild(g.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),s.attributes=dt((function(t){return t.className="i",!t.getAttribute("className")})),s.getElementsByTagName=dt((function(t){return t.appendChild(g.createComment("")),!t.getElementsByTagName("*").length})),s.getElementsByClassName=tt.test(g.getElementsByClassName),s.getById=dt((function(t){return m.appendChild(t).id=x,!g.getElementsByName||!g.getElementsByName(x).length})),s.getById?(r.filter.ID=function(t){var i=t.replace(nt,e);return function(t){return t.getAttribute("id")===i}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var i=e.getElementById(t);return i?[i]:[]}}):(r.filter.ID=function(t){var i=t.replace(nt,e);return function(t){var e=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===i}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&v){var i,n,s,r=e.getElementById(t);if(r){if((i=r.getAttributeNode("id"))&&i.value===t)return[r];for(s=e.getElementsByName(t),n=0;r=s[n++];)if((i=r.getAttributeNode("id"))&&i.value===t)return[r]}return[]}}),r.find.TAG=s.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):s.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],s=0,r=e.getElementsByTagName(t);if("*"!==t)return r;for(;i=r[s++];)1===i.nodeType&&n.push(i);return n},r.find.CLASS=s.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&v)return e.getElementsByClassName(t)},b=[],y=[],(s.qsa=tt.test(g.querySelectorAll))&&(dt((function(t){var e;m.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+j+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||y.push("\\["+j+"*(?:value|"+O+")"),t.querySelectorAll("[id~="+x+"-]").length||y.push("~="),(e=g.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||y.push("\\["+j+"*name"+j+"*="+j+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||y.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||y.push(".#.+[+~]"),t.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")})),dt((function(t){t.innerHTML="";var e=g.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&y.push("name"+j+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),m.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),y.push(",.*:")}))),(s.matchesSelector=tt.test(w=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&dt((function(t){s.disconnectedMatch=w.call(t,"*"),w.call(t,"[s!='']:x"),b.push("!=",q)})),y=y.length&&new RegExp(y.join("|")),b=b.length&&new RegExp(b.join("|")),n=tt.test(m.compareDocumentPosition),_=n||tt.test(m.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},H=n?function(t,e){if(t===e)return p=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!s.sortDetached&&e.compareDocumentPosition(t)===i?t==g||t.ownerDocument==k&&_(k,t)?-1:e==g||e.ownerDocument==k&&_(k,e)?1:c?$(c,t)-$(c,e):0:4&i?-1:1)}:function(t,e){if(t===e)return p=!0,0;var i,n=0,s=t.parentNode,r=e.parentNode,o=[t],a=[e];if(!s||!r)return t==g?-1:e==g?1:s?-1:r?1:c?$(c,t)-$(c,e):0;if(s===r)return ct(t,e);for(i=t;i=i.parentNode;)o.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;o[n]===a[n];)n++;return n?ct(o[n],a[n]):o[n]==k?-1:a[n]==k?1:0}),g},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(f(t),s.matchesSelector&&v&&!A[e+" "]&&(!b||!b.test(e))&&(!y||!y.test(e)))try{var i=w.call(t,e);if(i||s.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){A(e,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(nt,e),t[3]=(t[3]||t[4]||t[5]||"").replace(nt,e),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&X.test(i)&&(e=l(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var i=t.replace(nt,e).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===i}},CLASS:function(t){var e=S[t+" "];return e||(e=new RegExp("(^|"+j+")"+t+"("+j+"|$)"))&&S(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var s=at.attr(n,t);return null==s?"!="===e:!e||(s+="","="===e?s===i:"!="===e?s!==i:"^="===e?i&&0===s.indexOf(i):"*="===e?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(t,e,i){return y(e)?C.grep(t,(function(t,n){return!!e.call(t,n,t)!==i})):e.nodeType?C.grep(t,(function(t){return t===e!==i})):"string"!=typeof e?C.grep(t,(function(t){return-1)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||D,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==i.ready?i.ready(t):t(C):C.makeArray(t,this);if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:R.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),P.test(n[1])&&C.isPlainObject(e))for(n in e)y(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(s=b.getElementById(n[2]))&&(this[0]=s,this.length=1),this}).prototype=C.fn,D=C(b);var M=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function $(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),i=e.length;return this.filter((function(){for(var t=0;t\x20\t\r\n\f]*)/i,vt=/^$|^module$|\/(?:java|ecma)script/i;pt=b.createDocumentFragment().appendChild(b.createElement("div")),(ft=b.createElement("input")).setAttribute("type","radio"),ft.setAttribute("checked","checked"),ft.setAttribute("name","t"),pt.appendChild(ft),v.checkClone=pt.cloneNode(!0).cloneNode(!0).lastChild.checked,pt.innerHTML="",v.noCloneChecked=!!pt.cloneNode(!0).lastChild.defaultValue,pt.innerHTML="",v.option=!!pt.lastChild;var yt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function bt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&H(t,e)?C.merge([t],i):i}function wt(t,e){for(var i=0,n=t.length;i",""]);var _t=/<|&#?\w+;/;function xt(t,e,i,n,s){for(var r,o,a,l,h,d,u=e.createDocumentFragment(),c=[],p=0,f=t.length;p\s*$/g;function Rt(t,e){return H(t,"table")&&H(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function Mt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Lt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function $t(t,e){var i,n,s,r,o,a;if(1===e.nodeType){if(Q.hasData(t)&&(a=Q.get(t).events))for(s in Q.remove(e,"handle events"),a)for(i=0,n=a[s].length;i").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&s("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){i&&i()}}}));var si,ri=[],oi=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ri.pop()||C.expando+"_"+Le.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",(function(t,e,n){var s,r,o,a=!1!==t.jsonp&&(oi.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&oi.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(oi,"$1"+s):!1!==t.jsonp&&(t.url+=($e.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return o||C.error(s+" was not called"),o[0]},t.dataTypes[0]="json",r=i[s],i[s]=function(){o=arguments},n.always((function(){void 0===r?C(i).removeProp(s):i[s]=r,t[s]&&(t.jsonpCallback=e.jsonpCallback,ri.push(s)),o&&y(r)&&r(o[0]),o=r=void 0})),"script"})),v.createHTMLDocument=((si=b.implementation.createHTMLDocument("").body).innerHTML="
",2===si.childNodes.length),C.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(v.createHTMLDocument?((n=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(n)):e=b),r=!i&&[],(s=P.exec(t))?[e.createElement(s[1])]:(s=xt([t],e,r),r&&r.length&&C(r).remove(),C.merge([],s.childNodes)));var n,s,r},C.fn.load=function(t,e,i){var n,s,r,o=this,a=t.indexOf(" ");return-1").append(C.parseHTML(t)).find(n):t)})).always(i&&function(t,e){o.each((function(){i.apply(this,r||[t.responseText,e,t])}))}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,(function(e){return t===e.elem})).length},C.offset={setOffset:function(t,e,i){var n,s,r,o,a,l,h=C.css(t,"position"),d=C(t),u={};"static"===h&&(t.style.position="relative"),a=d.offset(),r=C.css(t,"top"),l=C.css(t,"left"),s=("absolute"===h||"fixed"===h)&&-1<(r+l).indexOf("auto")?(o=(n=d.position()).top,n.left):(o=parseFloat(r)||0,parseFloat(l)||0),y(e)&&(e=e.call(t,i,C.extend({},a))),null!=e.top&&(u.top=e.top-a.top+o),null!=e.left&&(u.left=e.left-a.left+s),"using"in e?e.using.call(t,u):("number"==typeof u.top&&(u.top+="px"),"number"==typeof u.left&&(u.left+="px"),d.css(u))}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){C.offset.setOffset(this,t,e)}));var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],s={top:0,left:0};if("fixed"===C.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((s=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),s.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-s.top-C.css(n,"marginTop",!0),left:e.left-s.left-C.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||ot}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i="pageYOffset"===e;C.fn[t]=function(n){return F(this,(function(t,n,s){var o;if(r(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===s)return o?o[e]:t[n];o?o.scrollTo(i?o.pageXOffset:s,i?s:o.pageYOffset):t[n]=s}),t,n,arguments.length)}})),C.each(["top","left"],(function(t,e){C.cssHooks[e]=ee(v.pixelPosition,(function(t,i){if(i)return i=te(t,e),Jt.test(i)?C(t).position()[e]+"px":i}))})),C.each({Height:"height",Width:"width"},(function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){C.fn[n]=function(s,o){var a=arguments.length&&(i||"boolean"!=typeof s),l=i||(!0===s||!0===o?"margin":"border");return F(this,(function(e,i,s){var o;return r(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===s?C.css(e,i,l):C.style(e,i,s,l)}),e,a?s:void 0,a)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){C.fn[e]=function(t){return this.on(e,t)}})),C.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){C.fn[e]=function(t,i){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,s,r,o=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(o={},n=e.split("."),e=n.shift(),n.length){for(s=o[e]=t.widget.extend({},this.options[e]),r=0;r=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,n){var s,r=t.ui[e].prototype;for(s in n)r.plugins[s]=r.plugins[s]||[],r.plugins[s].push([i,n[s]])},call:function(t,e,i,n){var s,r=t.plugins[e];if(r&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(s=0;s0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("
").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper),s=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,s=this.options,r=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(n=(i=t(s.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=s.containment:this.containment=[0,0,t(r).width()-this.helperProportions.width-this.margins.left,(t(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,s,r,o=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(s=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-o.grid[1]:s+o.grid[1]:s,r=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-o.grid[0]:r+o.grid[0]:r),"y"===o.axis&&(l=this.originalPageX),"x"===o.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var s=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,s))}))},stop:function(e,i,n){var s=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,(function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))}))},drag:function(e,i,n){t.each(n.sortables,(function(){var s=!1,r=this;r.positionAbs=n.positionAbs,r.helperProportions=n.helperProportions,r.offset.click=n.offset.click,r._intersectsWith(r.containerCache)&&(s=!0,t.each(n.sortables,(function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&t.contains(r.element[0],this.element[0])&&(s=!1),s}))),s?(r.isOver||(r.isOver=1,n._parent=i.helper.parent(),r.currentItem=i.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return i.helper[0]},e.target=r.currentItem[0],r._mouseCapture(e,!0),r._mouseStart(e,!0,!0),r.offset.click.top=n.offset.click.top,r.offset.click.left=n.offset.click.left,r.offset.parent.left-=n.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=n.offset.parent.top-r.offset.parent.top,n._trigger("toSortable",e),n.dropped=r.element,t.each(n.sortables,(function(){this.refreshPositions()})),n.currentItem=n.element,r.fromOutside=n),r.currentItem&&(r._mouseDrag(e),i.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",e,r._uiHash(r)),r._mouseStop(e,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var s=t("body"),r=n.options;s.css("cursor")&&(r._cursor=s.css("cursor")),s.css("cursor",r.cursor)},stop:function(e,i,n){var s=n.options;s._cursor&&t("body").css("cursor",s._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var s=t(i.helper),r=n.options;s.css("opacity")&&(r._opacity=s.css("opacity")),s.css("opacity",r.opacity)},stop:function(e,i,n){var s=n.options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var s=n.options,r=!1,o=n.scrollParentNotHidden[0],a=n.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(n.overflowOffset.top+o.offsetHeight-e.pageY=0;c--)h=(l=n.snapElements[c].left-n.margins.left)+n.snapElements[c].width,u=(d=n.snapElements[c].top-n.margins.top)+n.snapElements[c].height,vh+g||bu+g||!t.contains(n.snapElements[c].item.ownerDocument,n.snapElements[c].item)?(n.snapElements[c].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[c].item})),n.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(d-b)<=g,r=Math.abs(u-y)<=g,o=Math.abs(l-v)<=g,a=Math.abs(h-m)<=g,s&&(i.position.top=n._convertPositionTo("relative",{top:d-n.helperProportions.height,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),o&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h}).left)),p=s||r||o||a,"outer"!==f.snapMode&&(s=Math.abs(d-y)<=g,r=Math.abs(u-b)<=g,o=Math.abs(l-m)<=g,a=Math.abs(h-v)<=g,s&&(i.position.top=n._convertPositionTo("relative",{top:d,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),o&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left)),!n.snapElements[c].snapping&&(s||r||o||a||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[c].item})),n.snapElements[c].snapping=s||r||o||a||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var s,r=n.options,o=t.makeArray(t(r.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));o.length&&(s=parseInt(t(o[0]).css("zIndex"),10)||0,t(o).each((function(e){t(this).css("zIndex",s+e)})),this.css("zIndex",s+o.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var s=t(i.helper),r=n.options;s.css("zIndex")&&(r._zIndex=s.css("zIndex")),s.css("zIndex",r.zIndex)},stop:function(e,i,n){var s=n.options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}});t.ui.draggable;t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e=e&&t=d&&o<=c||l>=d&&l<=c||oc)&&(r>=h&&r<=u||a>=h&&a<=u||ru);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var n,s,r=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n0||(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,n=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",(function(){i.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())})).on("mouseleave",(function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,n,s,r,o=this.options,a=this;if(this.handles=o.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i"),this._addClass(r,"ui-resizable-handle "+s),r.css({zIndex:o.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(r);this._renderAxis=function(e){var i,n,s,r;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=t(this.handles[i],this.element),r=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(s,r),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){a.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=r&&r[1]?r[1]:"se")})),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,n,s=!1;for(i in this.handles)((n=t(this.handles[i])[0])===e.target||t.contains(n,e.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(e){var i,n,s,r=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),r.containment&&(i+=t(r.containment).scrollLeft()||0,n+=t(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,s=this.originalMousePosition,r=this.axis,o=e.pageX-s.left||0,a=e.pageY-s.top||0,l=this._change[r];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,o,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,s,r,o,a,l,h=this.options,d=this;return this._helper&&(s=(n=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:d.sizeDiff.height,r=n?0:d.sizeDiff.width,o={width:d.helper.width()-r,height:d.helper.height()-s},a=parseFloat(d.element.css("left"))+(d.position.left-d.originalPosition.left)||null,l=parseFloat(d.element.css("top"))+(d.position.top-d.originalPosition.top)||null,h.animate||this.element.css(t.extend(o,{top:l,left:a})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,s,r,o=this.options;r={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,n=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,s=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),n>r.minHeight&&(r.minHeight=n),it.width,o=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),d=/nw|ne|n/.test(i);return r&&(t.width=e.minWidth),o&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),s&&(t.height=e.maxHeight),r&&h&&(t.left=a-e.minWidth),n&&h&&(t.left=a-e.maxWidth),o&&d&&(t.top=l-e.minHeight),s&&d&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],s=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(s[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),n=i.options,s=i._proportionallyResizeElements,r=s.length&&/textarea/i.test(s[0].nodeName),o=r&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=r?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,d=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,d&&h?{top:d,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&t(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,s,r,o,a,l=t(this).resizable("instance"),h=l.options,d=l.element,u=h.containment,c=u instanceof t?u.get(0):/parent/.test(u)?d.parent().get(0):u;c&&(l.containerElement=t(c),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(c),i=[],t(["Top","Right","Left","Bottom"]).each((function(t,n){i[t]=l._num(e.css("padding"+n))})),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=l.containerOffset,s=l.containerSize.height,r=l.containerSize.width,o=l._hasScroll(c,"left")?c.scrollWidth:r,a=l._hasScroll(c)?c.scrollHeight:s,l.parentData={element:c,left:n.left,top:n.top,width:o,height:a}))},resize:function(e){var i,n,s,r,o=t(this).resizable("instance"),a=o.options,l=o.containerOffset,h=o.position,d=o._aspectRatio||e.shiftKey,u={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(u=l),h.left<(o._helper?l.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-l.left:o.position.left-u.left),d&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=a.helper?l.left:0),h.top<(o._helper?l.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-l.top:o.position.top),d&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?l.top:0),s=o.containerElement.get(0)===o.element.parent().get(0),r=/relative|absolute/.test(o.containerElement.css("position")),s&&r?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-u.left:o.offset.left-l.left)),n=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-u.top:o.offset.top-l.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,d&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),n+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-n,d&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,n=e.containerOffset,s=e.containerPosition,r=e.containerElement,o=t(e.helper),a=o.offset(),l=o.outerWidth()-e.sizeDiff.width,h=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(r.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(r.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each((function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})}))},resize:function(e,i){var n=t(this).resizable("instance"),s=n.options,r=n.originalSize,o=n.originalPosition,a={height:n.size.height-r.height||0,width:n.size.width-r.width||0,top:n.position.top-o.top||0,left:n.position.left-o.left||0};t(s.alsoResize).each((function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),s={},r=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(r,(function(t,e){var i=(n[e]||0)+(a[e]||0);i&&i>=0&&(s[e]=i||null)})),e.css(s)}))},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),n=i.options,s=i.size,r=i.originalSize,o=i.originalPosition,a=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,h=l[0]||1,d=l[1]||1,u=Math.round((s.width-r.width)/h)*h,c=Math.round((s.height-r.height)/d)*d,p=r.width+u,f=r.height+c,g=n.maxWidth&&n.maxWidthp,y=n.minHeight&&n.minHeight>f;n.grid=l,v&&(p+=h),y&&(f+=d),g&&(p-=h),m&&(f-=d),/^(se|s|e)$/.test(a)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(a)?(i.size.width=p,i.size.height=f,i.position.left=o.left-u):((f-d<=0||p-h<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),f-d>0?(i.size.height=f,i.position.top=o.top-c):(f=d-e.height,i.size.height=f,i.position.top=o.top+r.height-f),p-h>0?(i.size.width=p,i.position.left=o.left-u):(p=h-e.width,i.size.width=p,i.position.left=o.left+r.width-p))}});t.ui.resizable}(jQuery)},function(t,e){!function(t){if(t.support.touch="ontouchend"in document,t.support.touch){var e,i=t.ui.mouse.prototype,n=i._mouseInit,s=i._mouseDestroy;i._touchStart=function(t){!e&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,r(t,"mouseover"),r(t,"mousemove"),r(t,"mousedown"))},i._touchMove=function(t){e&&(this._touchMoved=!0,r(t,"mousemove"))},i._touchEnd=function(t){e&&(r(t,"mouseup"),r(t,"mouseout"),this._touchMoved||r(t,"click"),e=!1)},i._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),n.call(e)},i._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),s.call(e)}}function r(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var i=t.originalEvent.changedTouches[0],n=document.createEvent("MouseEvents");n.initMouseEvent(e,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(n)}}}(jQuery)},function(t,e,i){},function(t,e,i){},function(t,e,i){"use strict";i.r(e);var n={};i.r(n),i.d(n,"Color",(function(){return I})),i.d(n,"CubeHelix",(function(){return G})),i.d(n,"Scale",(function(){return pt})),i.d(n,"analyze",(function(){return yt})),i.d(n,"average",(function(){return lt})),i.d(n,"bezier",(function(){return ht})),i.d(n,"black",(function(){return W})),i.d(n,"blend",(function(){return dt})),i.d(n,"brewer",(function(){return U})),i.d(n,"cmyk",(function(){return V})),i.d(n,"color",(function(){return j})),i.d(n,"contrast",(function(){return gt})),i.d(n,"css",(function(){return J})),i.d(n,"cubehelix",(function(){return F})),i.d(n,"deltaE",(function(){return vt})),i.d(n,"distance",(function(){return mt})),i.d(n,"gl",(function(){return K})),i.d(n,"hcg",(function(){return Q})),i.d(n,"hsi",(function(){return tt})),i.d(n,"hsl",(function(){return et})),i.d(n,"hsv",(function(){return it})),i.d(n,"kelvin",(function(){return nt})),i.d(n,"lab",(function(){return st})),i.d(n,"lch",(function(){return Z})),i.d(n,"limits",(function(){return bt})),i.d(n,"mix",(function(){return X})),i.d(n,"num",(function(){return rt})),i.d(n,"random",(function(){return Y})),i.d(n,"rgb",(function(){return ot})),i.d(n,"scale",(function(){return ct})),i.d(n,"scales",(function(){return ft})),i.d(n,"w3cx11",(function(){return B})),i.d(n,"white",(function(){return q})),i.d(n,"xyz",(function(){return at}));var s=function(t,e,i,n){return new(i||(i=Promise))((function(s,r){function o(t){try{l(n.next(t))}catch(t){r(t)}}function a(t){try{l(n.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}l((n=n.apply(t,e||[])).next())}))},r=function(t,e){var i,n,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&this.registerTriggers.apply(this,h(s)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var e,i,n;return e=t,(i=[{key:"registerTriggers",value:function(){for(var t=this,e=arguments.length,i=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var i=function e(){t.modal.removeEventListener("animationend",e,!1),t.setFocusToFirstNode()};this.modal.addEventListener("animationend",i,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,e)}},{key:"closeModal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,t),this.config.awaitCloseAnimation){var i=this.config.openClass;this.modal.addEventListener("animationend",(function t(){e.classList.remove(i),e.removeEventListener("animationend",t,!1)}),!1)}else e.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(t){if(this.config.disableScroll){var e=document.querySelector("body");switch(t){case"enable":Object.assign(e.style,{overflow:""});break;case"disable":Object.assign(e.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(t){t.target.hasAttribute(this.config.closeTrigger)&&this.closeModal(t)}},{key:"onKeydown",value:function(t){27===t.keyCode&&this.closeModal(t),9===t.keyCode&&this.retainFocus(t)}},{key:"getFocusableNodes",value:function(){var t=this.modal.querySelectorAll(u);return Array.apply(void 0,h(t))}},{key:"setFocusToFirstNode",value:function(){var t=this;if(!this.config.disableFocus){var e=this.getFocusableNodes();if(0!==e.length){var i=e.filter((function(e){return!e.hasAttribute(t.config.closeTrigger)}));i.length>0&&i[0].focus(),0===i.length&&e[0].focus()}}}},{key:"retainFocus",value:function(t){var e=this.getFocusableNodes();if(0!==e.length)if(e=e.filter((function(t){return null!==t.offsetParent})),this.modal.contains(document.activeElement)){var i=e.indexOf(document.activeElement);t.shiftKey&&0===i&&(e[e.length-1].focus(),t.preventDefault()),!t.shiftKey&&e.length>0&&i===e.length-1&&(e[0].focus(),t.preventDefault())}else e[0].focus()}}])&&l(e.prototype,i),n&&l(e,n),t}(),p=null,f=function(t){if(!document.getElementById(t))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(t,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'')),!1},g=function(t,e){if(function(t){t.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",''))}(t),!e)return!0;for(var i in e)f(i);return!0},{init:function(t){var e=Object.assign({},{openTrigger:"data-micromodal-trigger"},t),i=h(document.querySelectorAll("[".concat(e.openTrigger,"]"))),n=function(t,e){var i=[];return t.forEach((function(t){var n=t.attributes[e].value;void 0===i[n]&&(i[n]=[]),i[n].push(t)})),i}(i,e.openTrigger);if(!0!==e.debugMode||!1!==g(i,n))for(var s in n){var r=n[s];e.targetModal=s,e.triggers=h(r),p=new c(e)}},show:function(t,e){var i=e||{};i.targetModal=t,!0===i.debugMode&&!1===f(t)||(p&&p.removeEventListeners(),(p=new c(i)).showModal())},close:function(t){t?p.closeModalById(t):p.closeModal()}});window.MicroModal=m;var v=m;const{abs:y,atan2:b,cos:w,floor:_,log:x,min:k,max:C,round:E,sign:S,sin:T,sqrt:N,cbrt:A,PI:H,hypot:P}=Math;function z(t,e,i){return t+(e-t)*i}function D(t,e=0,i=1){return ti?i:t}function R(t,e,i,n=1e-8){let s,r=e;for(;i--&&y(s=t(r))>n;){const e=(t(r+n)-s)/n;console.log("fx / dfdx",s/e,"fx",s,"x",r),r-=s/e}return r}const M=2*H,L=H/180,O=180/H;function j(...t){return t[0]instanceof I?t[0]:t.length>1&&"string"==typeof t[t.length-1]?xt(t.slice(0,t.length-1),t[t.length-1]):Array.isArray(t[0])?xt(t[0]):xt(t)}class I{constructor(t,e,i,n=1){this.r=t,this.g=e,this.b=i,this.a=n}mix(t,e,i="rgb"){return X(this,t,e,i)}rgb(t=!0,e=!0){const i=i=>(t&&(i=E(i)),e&&(i=D(i,0,255)),i),{r:n,g:s,b:r}=this;return[i(n),i(s),i(r)]}rgba(t=!0,e=!0){const i=i=>(t&&(i=E(i)),e&&(i=D(i,0,255)),i),{r:n,g:s,b:r,a:o}=this;return[i(n),i(s),i(r),o]}hex(t="rgb"){const{r:e,g:i,b:n,a:s}=this;return function(t,e,i,n,s="rgb"){t=D(E(t),0,255),e=D(E(e),0,255),i=D(E(i),0,255);const r=(t<<16|e<<8|i).toString(16).padStart(6,"0"),o=E(255*D(n)).toString(16).padStart(2,"0");return"#"+("argb"==s?o+r:"rgba"==s?r+o:r)}(e,i,n,s,t)}hsl(){const{r:t,g:e,b:i}=this;return function(t,e,i){const[n,s,r]=Wt(t/255,e/255,i/255),o=(r+s)/2;let a;a=r==s?0:o<.5?(r-s)/(r+s):(r-s)/(2-r-s);return[n,a,o]}(t,e,i)}hsv(){const{r:t,g:e,b:i}=this;return function(t,e,i){const[n,s,r]=Wt(t,e,i),o=r-s;return[n,0==r?0:o/r,r/255]}(t,e,i)}hcg(){const{r:t,g:e,b:i}=this;return function(t,e,i){const[n,s,r]=Wt(t,e,i),o=(r-s)/255;return[n,o,o<1?s/255/(1-o):0]}(t,e,i)}css(t="rgb"){if("rgb"==t){const{r:t,g:e,b:i,a:n}=this;return function(t,e,i,n=1){return n>=1?"rgb("+[t,e,i].map(E).join(",")+")":"rgba("+[t,e,i].map(E).join(",")+","+n+")"}(t,e,i,n)}if("hsl"==t)return function([t,e,i],n){const s=n<1?"hsla":"hsl";return s+"("+Mt(t)+","+Mt(100*e)+"%,"+Mt(100*i)+"%"+("hsla"==s?","+Mt(n):"")+")"}(this.hsl(),this.alpha());throw new Error}name(t=!1){const e=this.num(),i=Object.keys(B).find(t=>B[t]==e);if(!i&&t){const[t,e,i]=this.lab();return(n=Object.keys(B))[ee(n,n=>{const[s,r,o]=rt(B[n]).lab();return-P(t-s,e-r,i-o)})]}var n;return i}cmyk(){const{r:t,g:e,b:i}=this;return function(t,e,i){const n=1-C(t/=255,e/=255,i/=255);if(1==n)return[0,0,0,1];return[(1-t-n)/(1-n),(1-e-n)/(1-n),(1-i-n)/(1-n),n]}(t,e,i)}gl(){const{r:t,g:e,b:i,a:n}=this;return[t/255,e/255,i/255,n]}luminance(t){const{r:e,g:i,b:n,a:s}=this,[,r]=Zt(e,i,n);if(void 0===t)return r;const o=(t,e,i)=>(i-t)/(e-t);return t>r?X(this,q,o(r,1,t),"xyz").alpha(s):X(W,this,o(0,r,t),"xyz").alpha(s)}temperature(){const{r:t,g:e,b:i}=this;return n=t,s=e,r=i,console.log(r-n),s+r<158.61?(console.log("0 < t < 20"),E(100*R(t=>s-(-155.25485562709179-.44596950469579133*(t-2)+104.49216199393888*x(t-2)),15,4))):r-n<0?(console.log("20 < t < 66"),E(100*R(t=>r-(.8274096064007395*(t-10)-254.76935184120902+115.67994401066147*x(t-10)),43,4))):(console.log("0 < t < 400, start= "+(-1.4*(n+s)+755)),E(100*R(t=>n-(351.97690566805693+.114206453784165*(t-55)-40.25366309332127*x(t-55)),-1.4*(n+s)+755,8)));var n,s,r}set(t,e){const[i,n]=t.split("."),s=this[i](),r=i.indexOf(n);if(-1==r)throw new Error("invalid channel");return s[r]="number"==typeof e?e:e(s[r]),j(s,i).alpha(this.a)}clipped(){const{r:t,g:e,b:i}=this;return!(0<=t&&t<=255&&0<=e&&e<=255&&0<=i&&i<=255)}textColor(){return this.luminance()>.5?W:q}alpha(t){if(void 0===t)return this.a;const{r:e,g:i,b:n}=this;return ot(e,i,n,t)}darker(t=1){const[e,i,n]=this.lab();return st(e-Ft*t,i,n,this.alpha())}brighter(t=1){return this.darker(-t)}saturate(t=1){const[e,i,n]=this.lch();return Z(e,C(0,i+t*Ft),n,this.alpha())}desaturate(t=1){return this.saturate(-t)}premultiplied(){const{r:t,g:e,b:i,a:n}=this;return ot(t*n,e*n,i*n,n)}hsi(){const{r:t,g:e,b:i}=this;return function(t,e,i){const n=t/255,s=e/255,r=i/255,o=(n+s+r)/3;if(n==s&&s==r)return[0,0,o];{const t=.5*(2*n-s-r),e=N(3)/2*(s-r),i=b(e,t),a=k(n,s,r);return[(i<0?2*H+i:i)*O,1-a/o,o]}}(t,e,i)}lab(){const{r:t,g:e,b:i}=this;return Qt(t,e,i)}num(t="rgb"){const{r:e,g:i,b:n,a:s}=this;return function(t,e,i,n=1,s="rgb"){const r=E(t)<<16|E(e)<<8|E(i);return"rgb"===s?r:"rgba"===s?r<<8|E(255*n)<<24:E(255*n)<<24|r}(e,i,n,s,t)}lch(){const{r:t,g:e,b:i}=this;return function(t,e,i){const[n,s,r]=Qt(t,e,i);return function(t,e,i){const n=P(e,i),s=(b(i,e)*O+360)%360;return[t,n,s]}(n,s,r)}(t,e,i)}xyz(){const{r:t,g:e,b:i}=this;return Zt(t,e,i)}equals(t){const{r:e,g:i,b:n,a:s}=this,{r:r,g:o,b:a,a:l}=t;return e==r&&i==o&&n==a&&s==l}hashCode(){return this.num("rgba")}toSource(){const{r:t,g:e,b:i,a:n}=this;return"chroma.rgb("+t+", "+e+", "+i+(1===n?")":", "+n+")")}}I.prototype.toString=I.prototype.css,I.prototype.kelvin=I.prototype.temperature;const W=new I(0,0,0,1),q=new I(255,255,255,1),U={OrRd:[16775148,16705736,16635038,16628612,16551257,15689032,14102559,11730944,8323072],PuBu:[16775163,15525874,13685222,10927579,7645647,3576e3,356528,285325,145496],BuPu:[16252157,14740724,12571622,10403034,9213638,9202609,8929693,8458108,5046347],Oranges:[16774635,16705230,16634018,16625259,16616764,15821075,14239745,10892803,8333060],BuGn:[16252157,15070713,13429990,10082505,6734500,4304502,2329413,27948,17435],YlOrBr:[16777189,16775100,16704401,16696399,16685353,15495188,13388802,10040324,6694150],YlGn:[16777189,16252089,14282915,11394446,7915129,4303709,2327619,26679,17705],Reds:[16774640,16703698,16563105,16552562,16476746,15678252,13309981,10817301,6750221],RdPu:[16775155,16638173,16565696,16424885,16214177,14496919,11403646,7995767,4784234],Greens:[16252149,15070688,13101504,10607003,7652470,4303709,2329413,27948,17435],YlGnBu:[16777177,15595697,13101492,8375739,4306628,1937856,2252456,2438292,531800],Purples:[16579581,15724021,14342891,12369372,10394312,8420794,6967715,5515151,4128893],GnBu:[16252144,14742491,13429701,11066805,8113348,5157843,2854078,551084,540801],Greys:[16777215,15790320,14277081,12434877,9868950,7566195,5395026,2434341,0],YlOrRd:[16777164,16772512,16701814,16691788,16616764,16535082,14883356,12386342,8388646],PuRd:[16250105,15196655,13941210,13210823,14640560,15149450,13505110,9961539,6750239],Blues:[16251903,14609399,13032431,10406625,7057110,4362950,2191797,545180,536683],PuBuGn:[16775163,15524592,13685222,10927579,6793679,3576e3,164234,93273,83510],Viridis:[4456788,4728695,4147850,3237774,2524047,2071946,7130714,11984427,16705573],Spectral:[10355010,13975119,16018755,16625249,16703627,16777151,15136152,11263396,6734501,3311805,6180770],RdYlGn:[10813478,14102567,16018755,16625249,16703627,16777151,14282635,10934634,6733155,1742928,26679],RdBu:[6750239,11671595,14049357,16033154,16636871,16250871,13755888,9618910,4428739,2188972,340065],PiYG:[9306450,12917629,14579630,15840986,16638191,16250871,15136208,12116358,8371265,5083681,2581529],PRGn:[4194379,7744131,10055851,12756431,15193320,16250871,14282963,10935200,5942881,1800247,17435],RdYlBu:[10813478,14102567,16018755,16625249,16703632,16777151,14742520,11262441,7646673,4552116,3225237],BrBG:[5517317,9195786,12550445,14664317,16181443,16119285,13101797,8441281,3512207,91742,15408],RdGy:[6750239,11671595,14049357,16033154,16636871,16777215,14737632,12237498,8882055,5066061,1710618],PuOr:[8338184,11753478,14713364,16627811,16703670,16250871,14211819,11709394,8418220,5515144,2949195],Set2:[6734501,16551266,9281739,15174339,10934356,16767279,15058068,11776947],Accent:[8374655,12496596,16629894,16777113,3697840,15729279,12540695,6710886],Set1:[14948892,3636920,5091146,9981603,16744192,16777011,10901032,16220607,10066329],Set3:[9294791,16777139,12499674,16482418,8434131,16626786,11787881,16567781,14277081,12353725,13429701,16772463],Dark2:[1810039,14245634,7696563,15149450,6727198,15117058,10909213,6710886],Paired:[10931939,2062516,11722634,3383340,16489113,14883356,16629615,16744192,13284054,6962586,16777113,11622696],Pastel2:[11789005,16633260,13358568,16042724,15136201,16773806,15852236,13421772],Pastel1:[16495790,11783651,13429701,14601188,16701862,16777164,15063229,16636652,15921906]},B={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflower:6591981,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,laserlemon:16777044,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrod:16448210,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,maroon2:8323072,maroon3:11546720,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,purple2:8323199,purple3:10494192,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function F(t=300,e=-1.5,i=1,n=1,s=[0,1]){const r=t=>r.at(t);return Object.getOwnPropertyNames(G.prototype).forEach(t=>r[t]=G.prototype[t]),r.start(t),r.rotations(e),r.hue(i),r.gamma(n),r.lightness(s),r}class G{start(t){return void 0===t?this._start:(this._start=t,this)}rotations(t){return void 0===t?this._rotations:(this._rotations=t,this)}gamma(t){return void 0===t?this._gamma:(this._gamma=t,this)}hue(t){return void 0===t?this._hue:(this._hue=Array.isArray(t)?t:[t,t],this)}lightness(t){return void 0===t?this._lightness:(this._lightness=Array.isArray(t)?t:[t,t],this)}scale(){return ct(this)}at(t){const e=M*((this._start+120)/360+this._rotations*t),i=z(this._lightness[0],this._lightness[1],t)**this._gamma,n=z(this._hue[0],this._hue[1],t)*i*(1-i)/2,s=w(e),r=T(e);return ot([255*(i+n*(-.14861*s+1.78277*r)),255*(i+n*(-.29227*s-.90649*r)),255*(i+n*(1.97294*s)),1])}}function Y(t=Math.random){return rt(16777216*t()|0)}function X(t,e,i=.5,n="rgb"){const s=j(t),r=j(e),o=wt[n]&&wt[n](s,r,i,n);if(!o)throw new Error("color mode "+n+" is not supported");return o.alpha(z(s.alpha(),r.alpha(),i))}function J(t){const[e,i,n,s]=Rt(t);return new I(e,i,n,s)}function V(...t){return xt(t,"cmyk")}function K(...t){return xt(t,"gl")}function Q(...t){return xt(t,"hcg")}function Z(...t){return xt(t,"lch")}function tt(...t){return xt(t,"hsi")}function et(...t){return xt(t,"hsl")}function it(...t){return xt(t,"hsv")}function nt(t){const[e,i,n]=Ot(t);return new I(e,i,n)}function st(...t){return xt(t,"lab")}function rt(t){const[e,i,n]=Et(t);return new I(e,i,n)}function ot(...t){return xt(t,"rgb")}function at(...t){return xt(t,"xyz")}function lt(t,e="rgb"){const i=t.map(t=>j(t));if("lrgb"==e)return function(t){let e=0,i=0,n=0,s=0;for(const r of t){const[t,o,a,l]=r.rgba(!1,!1);e+=t**2,i+=o**2,n+=a**2,s+=l}return new I(N(e)/t.length,N(i)/t.length,N(n)/t.length,s/t.length)}(i);if("num"==e){let t=0,e=0;for(const n of i)t+=n.num(),e+=n.alpha();return rt(t/i.length).alpha(e/i.length)}const n=[0,0,0];let s=0,r=0,o=0;for(const t of i){const i=t[e]();o+=t.alpha();for(let t=0;tj(t)),[n,s,r,o]=i.map(t=>t.lab());if(2==e.length)return t=>st([0,1,2].map(e=>z(n[e],s[e],t)));if(3==e.length){const t=(t,e,i,n)=>(1-n)**2*t+2*(1-n)*n*e+n**2*i;return e=>st([0,1,2].map(i=>t(n[i],s[i],r[i],e)))}if(4==e.length){const t=(t,e,i,n,s)=>(1-s)**3*t+3*(1-s)**2*s*e+3*(1-s)*s**2*i+s**3*n;return e=>st([0,1,2].map(i=>t(n[i],s[i],r[i],o[i],e)))}if(5==e.length){const e=t(i.slice(0,3)),n=t(i.slice(2,5));return t=>t<.5?e(2*t):n(2*(t-.5))}throw new Error}(Array.isArray(t[0])?t[0]:t);return e.scale=G.prototype.scale,e}function dt(t,e,i){if(!ut[i])throw new Error("unknown blend mode "+i);return ut[i](t,e)}const ut={normal:jt(It((t,e)=>t)),multiply:jt(It((t,e)=>t*e/255)),screen:jt(It((function(t,e){return 255*(1-(1-t/255)*(1-e/255))}))),overlay:jt(It((function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))}))),darken:jt(It(k)),lighten:jt(It(C)),dodge:jt(It((function(t,e){if(255==t)return 255;return 255*k(1,e/255/(1-t/255))}))),burn:jt(It((function(t,e){return 255*(1-(1-e/255)/(t/255))})))};function ct(...t){const e=t=>e._at(t);return Object.getOwnPropertyNames(pt.prototype).forEach(t=>e[t]=pt.prototype[t]),Array.isArray(t[0])&&(t=t[0]),1==t.length&&"string"==typeof t[0]&&(t=U[t[0]]),e._init("function"==typeof t[0]?t[0]:t.map(t=>j(t))),e}class pt{classes(t){if(void 0===t)return this._classes;if(Array.isArray(t))this._classes=t,this.domain(t[0],t[t.length-1]);else{if(t%1!=0||t<1)throw new Error("invalid classes param");this._classes=bt(this.domain(),"e",t)}return this}domain(...t){if(void 0===t[0])return"function"!=typeof this._colors?this._pos.map(t=>z(this._min,this._max,t)):[this._min,this._max];if(this._min=t[0],this._max=t[t.length-1],2==t.length)"function"!=typeof this._colors&&(this._pos=this._colors.map((t,e)=>e/(this._colors.length-1)));else{if("function"==typeof this._colors||t.length!=this._colors.length)throw new Error("invalid domain "+t);this._pos=t.map(t=>{return e=this._min,i=this._max,(t-e)/(i-e);var e,i})}return this}mode(t){return void 0===t?this._mode:(this._mode=t,this._resetCache(),this)}out(t){return this._out=t,this}correctLightness(t=!0){if(this._correctLightness!=t){this._resetCache();const e=this._colors;if(t&&"function"!=typeof e){let t=0;for(let i=1;i1)i=Array.from({length:t},(e,i)=>this._color(z(this._min,this._max,i/(t-1))));else{let t;t=this._classes&&this._classes.length>2?Array.from({length:this._classes.length-1},(t,e)=>.5*(this._classes[e]+this._classes[e+1])):this.domain(),i=t.map(t=>this._color(t))}return"color"!=e?i.map(t=>t[e]()):i}cache(t){return void 0===t?!!this._cache:(this._cache=t?this._cache||new Map:void 0,this)}gamma(t){return void 0===t?this._gamma:(this._gamma=t,this)}_at(t){const e=this._color(t);return this._out?e[this._out]():e}_init(t){this._colors=t,"function"!=typeof t&&(this._pos=t.map((e,i)=>i/(t.length-1))),this._mode="rgb",this.domain(0,1),this._paddingLeft=0,this._paddingRight=0,this._correctLightness=!1,this._cache=new Map,this._gamma=1}_getClass(t){return this._classes.findIndex(e=>t<=e)-1}_color(t,e=!1){let i;if(e)i=t;else{const e=this._min,n=this._max;if(this._classes&&this._classes.length>2){i=this._getClass(t)/(this._classes.length-2)}else i=n!==e?(t-e)/(n-e):1;this._correctLightness&&(i=this._tCorrectedLightness(i))}i=i**this._gamma,i=(this._paddingLeft+i)/(1+this._paddingLeft+this._paddingRight),i=D(i,0,1);const n=i,s=this._cache&&this._cache.get(n);if(s)return s;{let t;if(Array.isArray(this._colors))for(let e=0;e=n&&e==this._pos.length-1){t=this._colors[e];break}if(i>n&&ithis._color(t,!0).lab()[0]-e,0,1,8)}_resetCache(){this._cache&&this._cache.clear()}}var ft;function gt(t,e){const i=j(t).luminance(),n=j(e).luminance();return i>n?(i+.05)/(n+.05):(n+.05)/(i+.05)}function mt(t,e,i="lab"){const n=j(t)[i](),s=j(e)[i](),r=n.map((t,e)=>t-s[e]);return P(...r)}function vt(t,e,i=1,n=1){const[s,r,o]=j(t).lab(),[a,l,h]=j(e).lab(),d=N(r*r+o*o),u=N(l*l+h*h),c=s<16?.511:.040975*s/(1+.01765*s),p=.0638*d/(1+.0131*d)+.638,f=Ct(d<1e-6?0:b(o,r)*O),g=f>=164&&f<=345?.56+y(.2*w((f+168)*L)):.36+y(.4*w((f+35)*L)),m=d*d*d*d,v=N(m/(m+1900)),_=p*(v*g+1-v),x=d-u,k=r-l,C=o-h,E=(s-a)/(i*c),S=x/(n*p);return N(E*E+S*S+(k*k+C*C-x*x)/(_*_))}function yt(t){const e={min:1/0,max:-1/0,sum:0,values:[],count:0};return t.forEach(t=>function(t){null==t||isNaN(t)||(e.values.push(t),e.sum+=t,te.max&&(e.max=t),e.count+=1)}(t)),e.domain=[e.min,e.max],e.limits=function(t,e){return bt(this,t,e)},e}function bt(t,e="e",i=7){const n=Array.isArray(t)?yt(t):t,{min:s,max:r,values:o}=n;if(o.sort((t,e)=>t-e),1==i)return[s,r];if(e.startsWith("c"))return[s,r];if(e.startsWith("e"))return Array.from({length:i+1},(t,e)=>z(s,r,e/i));if(e.startsWith("l")){if(s<=0)throw new Error("Logarithmic scales are only possible for values > 0");const t=Math.LOG10E*x(s),e=Math.LOG10E*x(r);return Array.from({length:i+1},(n,s)=>10**z(t,e,s/i))}if(e.startsWith("q"))return Array.from({length:i+1},(t,e)=>{const n=(o.length-1)*e/i,s=_(n);return s==n?o[s]:z(o[s],o[s+1],n-s)});if(e.startsWith("k")){const t=o.length,e=new Array(t),n=new Array(i);let a=!0,l=0,h=Array.from({length:i+1},(t,e)=>z(s,r,e/i));do{n.fill(0);for(let t=0;t-y(t-i));n[s]++,e[t]=s}const t=new Array(i).fill(0);for(let i=0;it!=h[e]),h=t}while(l++<200&&a);const d=Array.from({length:i},()=>[]);for(let t=0;tt-e);const c=[];c.push(u[0]);for(let t=1;t=0&&t[3]<=1)e="rgb";else{if(!(1==t.length&&"number"==typeof t[0]&&t[0]>=0&&t[0]<=16777215))throw new Error("could not guess mode. args "+JSON.stringify(t));e="num"}const i=_t[e](...t);return new I(i[0],i[1],i[2],void 0!==i[3]?i[3]:1)}function kt(t){let e;if(e=t.match(/^#?([A-F\d]{2})([A-F\d]{2})([A-F\d]{2})([A-F\d]{2})?$/i))return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),e[4]?parseInt(e[4],16)/255:1];if(e=t.match(/^#?([A-F\d])([A-F\d])([A-F\d])([A-F\d])?$/i))return[17*parseInt(e[1],16),17*parseInt(e[2],16),17*parseInt(e[3],16),e[4]?17*parseInt(e[4],16)/255:1];throw new Error("invalid hex color: "+t)}function Ct(t){return(t%360+360)%360}function Et(t){if(!("number"==typeof t&&t>=0&&t<=16777215))throw new Error("unknown num color: "+t);return[t>>16,t>>8&255,255&t,1]}wt.xyz=wt.rgb=wt.lab=function(t,e,i,n){const s=t[n](),r=e[n]();return xt([z(s[0],r[0],i),z(s[1],r[1],i),z(s[2],r[2],i),z(t.alpha(),e.alpha(),i)],n)},wt.num=function(t,e,i){return rt(z(t.num(),e.num(),i))},wt.lrgb=function(t,e,i){const[n,s,r,o]=t.rgba(!1,!1),[a,l,h,d]=e.rgba(!1,!1);return new I(N(n**2*(1-i)+a**2*i),N(s**2*(1-i)+l**2*i),N(r**2*(1-i)+h**2*i),z(o,d,i))},_t.lrgb=_t.rgb,_t.hex=kt,_t.hsl=Ut,_t.hsv=function(t,e,i,n=1){t=Ct(t);const s=i*e;return qt(t,s,s*(1-y(t/60%2-1)),i-s,n)},_t.num=Et;const St="\\s*",Tt="([+-]?(?:\\d*\\.?)?\\d+(?:[eE][+-]?\\d+)?)",Nt=new RegExp(["^rgba?\\(",Tt,",",Tt,",",Tt,"(?:,",Tt+"(%)?",")?\\)$"].join(St),"i"),At=new RegExp(["^rgba?\\(",Tt,Tt,Tt,"(?:/",Tt+"(%)?",")?\\)$"].join(St),"i"),Ht=new RegExp(["^rgba?\\(",Tt+"%",",",Tt+"%",",",Tt+"%","(?:,",Tt+"(%)?",")?\\)$"].join(St),"i"),Pt=new RegExp(["^rgba?\\(",Tt+"%",Tt+"%",Tt+"%","(?:/",Tt+"(%)?",")?\\)$"].join(St),"i"),zt=new RegExp(["^hsla?\\(",Tt+"(deg|rad|turn)?",",",Tt+"%",",",Tt+"%","(?:,",Tt+"(%)?",")?\\)$"].join(St),"i"),Dt=new RegExp(["^hsla?\\(",Tt+"(deg|rad|turn)?\\s+"+Tt+"%",Tt+"%","(?:/",Tt+"(%)?",")?\\)$"].join(St),"i");function Rt(t){if(B&&B.hasOwnProperty(t))return Et(B[t.toLowerCase()]);let e;if(e=t.match(Nt)||t.match(At))return[D(+e[1],0,255),D(+e[2],0,255),D(+e[3],0,255),e[4]?D(e[5]?+e[4]/100:+e[4]):1];if(e=t.match(Ht)||t.match(Pt))return[255*D(+e[1]/100),255*D(+e[2]/100),255*D(+e[3]/100),e[4]?D(e[5]?+e[4]/100:+e[4]):1];if(e=t.match(zt)||t.match(Dt)){const t={deg:1,rad:O,turn:360},i=e[2]?e[2].toLowerCase():"deg";return Ut((+e[1]*t[i]%360+360)%360,D(+e[3]/100),D(+e[4]/100),e[5]?D(e[6]?+e[5]/100:+e[5]):1)}return kt(t)}function Mt(t){return E(100*t)/100}function Lt(t){const e=t/255;return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function $t(t){return t<=.0031308?12.92*t*255:255*(1.055*t**(1/2.4)-.055)}function Ot(t){const e=t/100;let i,n,s;return e<66?(i=255,n=-155.25485562709179-.44596950469579133*(e-2)+104.49216199393888*x(e-2),s=e<20?0:.8274096064007395*(e-10)-254.76935184120902+115.67994401066147*x(e-10)):(i=351.97690566805693+.114206453784165*(e-55)-40.25366309332127*x(e-55),n=325.4494125711974+.07943456536662342*(e-50)-28.0852963507957*x(e-50),s=255),[i,n,s]}function jt(t){return function(e,i){const[n,s,r]=t(j(i).rgb(),j(e).rgb());return ot(n,s,r)}}function It(t){return function(e,i){return e.map((e,n)=>t(e,i[n]))}}function Wt(t,e,i){const n=k(t,e,i),s=C(t,e,i),r=s-n;let o;return o=0==r?0:t==s?(e-i)/r+(eJt?t**3:Vt*(t-4/29)}return[Gt*n((t+16)/116+e/500),Yt*n((t+16)/116),Xt*n((t+16)/116-i/200)]}(t,e,i);return te(s,r,o,n)}_t.css=Rt,_t.name=function(t){return Et(B[t])},_t.lch=function(t,e,i,n=1){const[,s,r]=function(t,e,i){return[t,w(i*L)*e,T(i*L)*e]}(t,e,i);return Bt(t,s,r,n)},_t.cmyk=function(t,e,i,n,s=1){return 1==n?[0,0,0,s]:[255*(1-t)*(1-n),255*(1-e)*(1-n),255*(1-i)*(1-n),s]},_t.gl=function(t,e,i,n=1){return[255*t,255*e,255*i,n]},_t.rgb=(...t)=>t,_t.temperature=_t.kelvin=_t.K=Ot,_t.hcg=function(t,e,i,n=1){const s=i*(1-e);return qt(t=Ct(t),e,e*(1-y(t/60%2-1)),s,n)};const Ft=18,Gt=.95047,Yt=1,Xt=1.08883,Jt=.206896552,Vt=.12841855,Kt=.008856452;function Qt(t,e,i){const[n,s,r]=Zt(t,e,i);return function(t,e,i){function n(t){return t>Kt?A(t):t/Vt+4/29}return[116*n(e/Yt)-16,500*(n(t/Gt)-n(e/Yt)),200*(n(e/Yt)-n(i/Xt))]}(n,s,r)}function Zt(t,e,i){const n=Lt(t),s=Lt(e),r=Lt(i);return[.4124564*n+.3575761*s+.1804375*r,.2126729*n+.7151522*s+.072175*r,.0193339*n+.119192*s+.9503041*r]}function te(t,e,i,n=1){const s=-.969266*t+1.8760108*e+.041556*i,r=.0556434*t-.2040259*e+1.0572252*i;return[$t(3.2404542*t-1.5371385*e-.4985314*i),$t(s),$t(r),n]}function ee(t,e){let i=-1/0,n=-1;for(let s=0;si&&(i=r,n=s)}return n}_t.xyz=te,_t.lab=Bt,_t.hsi=function(t,e,i,n=1){let s,r,o,a=t*L;return a<2*H/3?(o=(1-e)/3,s=(1+e*w(a)/w(H/3-a))/3,r=1-(o+s)):a<4*H/3?(a-=2*H/3,s=(1-e)/3,r=(1+e*w(a)/w(H/3-a))/3,o=1-(s+r)):(a-=4*H/3,r=(1-e)/3,o=(1+e*w(a)/w(H/3-a))/3,s=1-(r+o)),[3*i*s*255,3*i*r*255,3*i*o*255,n]},wt.hsv=wt.hsl=wt.hsi=wt.lch=wt.hcg=function(t,e,i,n){const[s,r,o]=t[n](),[a,l,h]=e[n]();function d(t,e,i){return t+i*(Ct(e-t+180)-180)}return j(("h"==n.charAt(0)?d:z)(s,a,i),z(r,l,i),("h"==n.charAt(2)?d:z)(o,h,i),n)};var ie=i(3);function ne(t,e,i){void 0===i&&(i=!1),$("#grid-message").stop().hide(),$("#grid-message").html(""+e+""),i?$("#grid-message").stop(!0,!0).fadeIn():$("#grid-message").stop(!0,!0).fadeIn().delay(5e3).fadeOut()}function se(t,e){var i=$(t).scrollTop(),n=$(t).scrollLeft();$(e).scrollTop(i).scrollLeft(n)}function re(t){var e=$("#"+t);e&&e.remove()}var oe=i(0),ae=(i(10),i(6)),le=i.n(ae),he=[];function de(t,e,i,n,s){void 0===e&&(e=!1),void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=null),e&&(i=JSON.parse(i));$("#parallax");var r=["tile-primary","overflow-hidden","h-full","material-icons","flex-grow-0","w-full","self-start"];if(t.each((function(){var t,o,a,l,h,d,u,c,p,f,g,m=this,v=parseInt(null!==(o=null===(t=$(this).attr("id"))||void 0===t?void 0:t.replace(/\D/g,""))&&void 0!==o?o:"",10),y=null;i&&(y=i.tiles[v]);var b,w,_,x,k,C,E,S,T,N=$(this).attr("class").split(" "),A=void 0!==$(this).attr("state"),H=0,P=function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0);var s=he[t],r=s[e-1]?n.color(s[e-1]).textColor().alpha(.7).css():null,o=s[e-1]?n.color(s[e-1]).textColor().name():null,a=s[e-1]?n.color(s[e-1]).alpha(.95).css():"";i.removeClass("fg-black"),i.removeClass("fg-white"),i.addClass("fg-"+o),r&&(i.css("color",r),i.find(".tile-primary").css("color",r),i.find(".material-icons").css("color",r)),i.css("background-color",a)};switch(N[1]){case"temperature":S=!1,E=[],T=[],H="F"===n.tempScale?30:0;var z=-30,D=15,R=32,M=33,L=70,O=90,j=100,I=120;if("C"===n.tempScale&&(H=30,z=-30,D=-10,R=0,M=1,L=20,O=30,j=40,I=50),i&&void 0!==i.dashboard.mods.chroma_temperature&&null!==i.dashboard.mods.chroma_temperature&&null!==i.dashboard.mods.chroma_temperature.value&&(E=i.dashboard.mods.chroma_temperature,S=!0),null!=y&&void 0!==y.mods&&null!==y.mods&&void 0!==y.mods.chroma_temperature&&null!==y.mods.chroma_temperature&&null!==y.mods.chroma_temperature.value&&(E=y.mods.chroma_temperature,S=!0),S)/^(-?\d+)(\s*,\s*-?\d+\d+)+$/.test(E.value)&&(T=E.value.split(","),z=parseInt(T[0],10),D=parseInt(T[1],10),R=parseInt(T[2],10),M=parseInt(T[3],10),L=parseInt(T[4],10),O=parseInt(T[5],10),j=parseInt(T[6],10),I=parseInt(T[7],10));e&&S&&(he[v]=s.scale(["d51ded","2547b2","397bc2","27c5d8","67d827","f8cc20","e44514","bd0000"]).domain(z+H,D+H,R+H,M+H,L+H,O+H,j+H,I+H).colors(I+H)),x=$(this).find(".tile-primary"),w=parseInt(null!==(a=null==x?void 0:x.contents().text())&&void 0!==a?a:"",10),A&&$(this).removeClass("temp-"+$(this).attr("state")),$(this).addClass("temp-"+w),$(this).attr("state",w),C=w,S&&P(v,C+H,$(this),s);break;case"humidity":var W="00ff69";e&&(he[v]=s.scale("f17d20","f0c71f",W,W,"2474bb","2b4d94").domain(0,20,35,55,70,100).mode("hsi").colors(100)),x=$(this).find(".tile-primary"),w=parseInt(null!==(l=null==x?void 0:x.contents().text())&&void 0!==l?l:"",10),A&&$(this).removeClass("temp-"+$(this).attr("state")),$(this).addClass("temp-"+w),$(this).attr("state",w),(C=w)&&P(v,C,$(this),s);break;case"battery":var q=10,U=20;if(S=!1,void 0!==i.dashboard.mods.chroma_battery&&null!==i.dashboard.mods.chroma_battery&&null!==i.dashboard.mods.chroma_battery.value&&(E=i.dashboard.mods.chroma_battery,S=!0),S||null==y||void 0!==y.mods&&null!==y.mods&&void 0!==y.mods.chroma_battery&&null!==y.mods.chroma_battery&&null!==y.mods.chroma_battery.value&&(E=y.mods.chroma_battery,S=!0),S)/^[0-9,]*$/.test(E.value)&&(T=E.value.split(","),q=parseInt(T[0],10),U=parseInt(T[1],10));e&&(he[v]=s.scale(["rgba(255,0,0,.65)","rgba(251,104,12,.9)","rgba(0,255,105,.75)"]).classes([0,q,U,100]).colors(100)),b=(null!==(h=(x=$(this).find(".tile-primary")).attr("class"))&&void 0!==h?h:"").split(" ").filter((function(t){return-1==r.indexOf(t)})),A&&$(this).removeClass($(this).attr("state")),$(this).addClass(b[0]),$(this).attr("state",b[0]),(C=parseInt(b[0].replace(/\D/g,""),10))&&P(v,C,$(this),s);break;case"thermostat":b=(null!==(d=(x=$(this).find("div").children().first()).attr("class"))&&void 0!==d?d:"").split(" ").filter((function(t){return-1==r.indexOf(t)})),A&&$(this).removeClass($(this).attr("state")),$(this).addClass(b.reverse()[0]),$(this).attr("state",b.reverse()[0]);break;case"bulb-color":b=(null!==(u=(x=$(this).find(".tile-primary>div>i")).attr("class"))&&void 0!==u?u:"").split(" ").filter((function(t){return-1==r.indexOf(t)})),A&&$(this).removeClass($(this).attr("state")),$(this).addClass(b[0].replace("he-bulb_","").replace("he-hour-glass","Sending...")),$(this).attr("state",b[0].replace("he-bulb_","").replace("he-hour-glass","Sending..."));break;case"button":x=$(this).find(".tile-primary"),$(this).click((function(){$(m).addClass("pressed");var t=$(m);setTimeout((function(){t.removeClass("pressed")}),500)}));break;case"dimmer":case"level-vertical":b=(null!==(c=(x=$(this).find(".tile-primary")).attr("class"))&&void 0!==c?c:"").split(" ").filter((function(t){return-1==r.indexOf(t)})),A&&$(this).removeClass($(this).attr("state")),$(this).addClass(b[0]),$(this).attr("state",b[0]),x=$(this).find(".tile-primary"),k=$(this).find(".vue-slider-dot-tooltip-text"),w=parseInt(null!==(p=null==k?void 0:k.contents().text())&&void 0!==p?p:"",10),_=10*Math.round(w/10),A&&($(this).removeClass("level-"+$(this).attr("state-value")),$(this).removeClass("lev10-"+10*Math.round(parseInt($(this).attr("state-value"))/10))),$(this).addClass("level-"+w),$(this).addClass("lev10-"+_),$(this).attr("state-value",w),$(this).attr("state-value2",_);break;case"attribute":x=$(this).find(".tile-primary");var B=void 0;(B=parseInt(null!==(f=null==x?void 0:x.contents().text())&&void 0!==f?f:"",10))||(B=null==x?void 0:x.contents().text().replace(/ .*/,"")),A&&$(this).removeClass("attribute-"+$(this).attr("state")),$(this).addClass("attribute-"+B),$(this).attr("state",B);break;default:b=(null!==(g=(x=$(this).find(".tile-primary")).attr("class"))&&void 0!==g?g:"").split(" ").filter((function(t){return-1==r.indexOf(t)})),A&&$(this).removeClass($(this).attr("state")),$(this).addClass(b[0]),$(this).attr("state",b[0])}x.addClass("state-target")})),e){!function(t,e,i,n){new MutationObserver((function(t){t.forEach((function(t){var s;switch(t.type){case"characterData":de($(t.target).closest(".tile"),!1,e,i,n);break;default:if(null!==(s=$(t.target).attr("state"))&&void 0!==s?s:null)return;var r=$(t.target).attr("class");r&&(r.includes("state-target")||r.includes("tile-primary"))&&de($(t.target).closest(".tile"),!1,e,i,n)}}))})).observe($(t)[0],{childList:!0,attributes:!0,subtree:!0,characterData:!0})}("#app",i,n,s);var o=$("html"),a=$(".wrapper.z-0");$(".dashboard>div>.header");if(i){if(void 0!==i.dashboard.mods.parallax&&null!==i.dashboard.mods.parallax&&!0===i.dashboard.mods.parallax.value){var l=$("#parallax"),h=(o.css("background-image"),(a.prop("scrollHeight")-$(window).outerHeight())/10);l.css({top:"-"+h+"px",left:"-"+h+"px",right:"-"+h+"px",bottom:"-"+h+"px",height:"calc(100% + "+h+"px)",width:"calc(100% + "+h+"px)","background-image":o.css("background-image"),"background-position":"center "+h+"px"}),l.fadeIn(500),a.on("scroll",(function(){var t=a.scrollTop(),e=Math.round(h-.1*t).toString();l.css({"background-position":"center "+e+"px"})}))}if(void 0!==i.dashboard.mods.header&&null!==i.dashboard.mods.header&&null!==i.dashboard.mods.header.value){if(["stock_plus"].includes(i.dashboard.mods.header.value)){var d=$(".dashboard>div>.header");$(".wrapper.z-0").on("scroll",(function(){var t=$(".wrapper.z-0").scrollTop(),e=t<15?1:-1;d.css({opacity:1-.05*t,"z-index":e})}))}}}}}$("body").append(le.a);var ue=!1;function ce(t,e,i){$.fn.onAvailable=function(t,e){var i;this.length>0?e.call(this):i=setInterval((function(){$(t).length>0&&(e.call($(t)),clearInterval(i))}),50)};var n=!0,s=$("#hidden-json-update");if(s.length||($("body").prepend('
'),s=$("#hidden-json-update"),n=!1),n||function(t,e){var i=$("#"+t);i.length||($(''),$("i:contains(settings)").parent().show()})),$("#close-modal-btn").click((function(){r?(ne("warning","There are unsaved changes! Click again to discard changes.",!0),$("#saveGrid").stop().fadeOut().fadeIn(),$("#grid-message .message-warning").css({"background-color":"red"}),$("#close-modal-btn").fadeOut().addClass("button-alert").fadeIn(),r=!1):($("#close-modal-btn").removeClass("button-alert"),$("#loadGrid").removeClass("button-alert"),$("#grid-message").stop().hide(),$("#app .wrapper").show(),se("#grid-stack-scroller",".dashboard .wrapper.z-0"),v.close("dd-modal"),$("#app .header").show(),$("#app .header>.justify-end").show(),$("#popup-container-style").remove(),r=!1,o=!1)})),$("#close-modal-btn").dblclick((function(){ue})),$(".hdi").removeClass("hdi"),$("#grid-label").on("click",(function(){$("#about-modal").show(),$(".approve").on("click",(function(){alert("approved")}))})),$("#about-modal .close").on("click",(function(){$("#about-modal").hide()}));var M=function(){var t=["sponsored by","
","and","
","drag-and-drop"],e=[6,2,6,1,6],i=$("#grid-label");$.each(t,(function(n,s){i.delay(1e3*e[n]).fadeOut(),i.queue((function(){i.html(t[n]),i.dequeue()})),i.fadeIn(),i.queue((function(){n==t.length-1&&M(),i.dequeue()}))}))};M(),$(".grid-stack").css("touch-action","none")}!function(){P.removeAll();var t=ie.GridStack.Utils.sort(e);P.batchUpdate(),t.forEach((function(t){P.addWidget('
'+t.innerHTML+"
",t)})),P.commit(),$("#grid-message").hide(),$("#loading-overlay").hide()}()}))}function fe(){var t=null;return $("script#inserted-body-script").each((function(e,i){t=i})),$("").prop("href",$(t).attr("src"))}var ge=function(){if(function(){var t=fe();return!(!t||window.location.origin===t.prop("origin"))}()){var t=fe();return t.prop("origin")+function(t){var e=t.substr(t.lastIndexOf("/")+1)+"$";return t.replace(new RegExp(e),"")}(t.prop("pathname"))}return window.location.origin+"/local/"}();i(11),i(12);$("div.tile:contains(javascript)").hide(),console.log("Base URL: ",ge),function(t,e){s(this,void 0,void 0,(function(){var i,n,s,a,l,h,d;return r(this,(function(r){switch(r.label){case 0:i=document.getElementsByTagName("head")[0],n=document.getElementById(e+"-css"),s=null!=n,a=null,l=0,r.label=1;case 1:return l