JEMBOT MAWOT Bypass Shell
/*! For license information please see grid.bundle.js.LICENSE.txt */
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,o){return t[0]===e&&(n=o,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),o=this.__entries__[n];return o&&o[1]},e.prototype.set=function(e,n){var o=t(this.__entries__,e);~o?this.__entries__[o][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,o=t(n,e);~o&&n.splice(o,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,o=this.__entries__;n<o.length;n++){var i=o[n];t.call(e,i[1],i[0])}},e}()}(),o="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),r="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,o=!1,i=0;function a(){n&&(n=!1,t()),o&&l()}function s(){r(a)}function l(){var t=Date.now();if(n){if(t-i<2)return;o=!0}else n=!0,o=!1,setTimeout(s,e);i=t}return l}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,o=Object.keys(e);n<o.length;n++){var i=o[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},d=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},u=v(0,0,0,0);function h(t){return parseFloat(t)||0}function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+h(t["border-"+n+"-width"])}),0)}function p(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return u;var o=d(t).getComputedStyle(t),i=function(t){for(var e={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var i=o[n],r=t["padding-"+i];e[i]=h(r)}return e}(o),r=i.left+i.right,a=i.top+i.bottom,s=h(o.width),l=h(o.height);if("border-box"===o.boxSizing&&(Math.round(s+r)!==e&&(s-=f(o,"left","right")+r),Math.round(l+a)!==n&&(l-=f(o,"top","bottom")+a)),!function(t){return t===d(t).document.documentElement}(t)){var c=Math.round(s+r)-e,p=Math.round(l+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(p)&&(l-=p)}return v(i.left,i.top,s,l)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof d(t).SVGGraphicsElement}:function(t){return t instanceof d(t).SVGElement&&"function"==typeof t.getBBox};function b(t){return o?m(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):p(t):u}function v(t,e,n,o){return{x:t,y:e,width:n,height:o}}var g=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=b(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),y=function(t,e){var n,o,i,r,a,s,l,d=(o=(n=e).x,i=n.y,r=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:o,y:i,width:r,height:a,top:i,right:o+r,bottom:a+i,left:o}),l);c(this,{target:t,contentRect:d})},w=function(){function t(t,e,o){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=o}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof d(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new g(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof d(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new y(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),D="undefined"!=typeof WeakMap?new WeakMap:new n,_=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),o=new w(e,n,this);D.set(this,o)};["observe","unobserve","disconnect"].forEach((function(t){_.prototype[t]=function(){var e;return(e=D.get(this))[t].apply(e,arguments)}}));var O=void 0!==i.ResizeObserver?i.ResizeObserver:_;e.a=O}).call(this,n(3))},,function(t,e,n){t.exports=n(6)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n,o,i,r,a,s;n=jQuery,o=window,i=window.document,r="touchstart mousedown",a="touchmove mousemove",s="touchend mouseup",n(i).ready((function(){function t(t){for(var e={},n=t.match(/([^;:]+)/g)||[];n.length;)e[n.shift()]=n.shift().trim();return e}n("table").each((function(){"dnd"===n(this).data("table")&&n(this).tableDnD({onDragStyle:n(this).data("ondragstyle")&&t(n(this).data("ondragstyle"))||null,onDropStyle:n(this).data("ondropstyle")&&t(n(this).data("ondropstyle"))||null,onDragClass:void 0===n(this).data("ondragclass")?"tDnD_whileDrag":n(this).data("ondragclass"),onDrop:n(this).data("ondrop")&&new Function("table","row",n(this).data("ondrop")),onDragStart:n(this).data("ondragstart")&&new Function("table","row",n(this).data("ondragstart")),onDragStop:n(this).data("ondragstop")&&new Function("table","row",n(this).data("ondragstop")),scrollAmount:n(this).data("scrollamount")||5,sensitivity:n(this).data("sensitivity")||10,hierarchyLevel:n(this).data("hierarchylevel")||0,indentArtifact:n(this).data("indentartifact")||'<div class="indent"> </div>',autoWidthAdjust:n(this).data("autowidthadjust")||!0,autoCleanRelations:n(this).data("autocleanrelations")||!0,jsonPretifySeparator:n(this).data("jsonpretifyseparator")||"\t",serializeRegexp:n(this).data("serializeregexp")&&new RegExp(n(this).data("serializeregexp"))||/[^\-]*$/,serializeParamName:n(this).data("serializeparamname")||!1,dragHandle:n(this).data("draghandle")||null})}))})),jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldX:0,oldY:0,build:function(t){return this.each((function(){this.tableDnDConfig=n.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,onDragStop:null,scrollAmount:5,sensitivity:10,hierarchyLevel:0,indentArtifact:'<div class="indent"> </div>',autoWidthAdjust:!0,autoCleanRelations:!0,jsonPretifySeparator:"\t",serializeRegexp:/[^\-]*$/,serializeParamName:!1,dragHandle:null},t||{}),n.tableDnD.makeDraggable(this),this.tableDnDConfig.hierarchyLevel&&n.tableDnD.makeIndented(this)})),this},makeIndented:function(t){var e,o,i=t.tableDnDConfig,r=t.rows,a=n(r).first().find("td:first")[0],s=0,l=0;if(n(t).hasClass("indtd"))return null;o=n(t).addClass("indtd").attr("style"),n(t).css({whiteSpace:"nowrap"});for(var c=0;c<r.length;c++)l<n(r[c]).find("td:first").text().length&&(l=n(r[c]).find("td:first").text().length,e=c);for(n(a).css({width:"auto"}),c=0;c<i.hierarchyLevel;c++)n(r[e]).find("td:first").prepend(i.indentArtifact);for(a&&n(a).css({width:a.offsetWidth}),o&&n(t).css(o),c=0;c<i.hierarchyLevel;c++)n(r[e]).find("td:first").children(":first").remove();return i.hierarchyLevel&&n(r).each((function(){(s=n(this).data("level")||0)<=i.hierarchyLevel&&n(this).data("level",s)||n(this).data("level",0);for(var t=0;t<n(this).data("level");t++)n(this).find("td:first").prepend(i.indentArtifact)})),this},makeDraggable:function(t){var e=t.tableDnDConfig;e.dragHandle&&n(e.dragHandle,t).each((function(){n(this).bind(r,(function(o){return n.tableDnD.initialiseDrag(n(this).parents("tr")[0],t,this,o,e),!1}))}))||n(t.rows).each((function(){n(this).hasClass("nodrag")?n(this).css("cursor",""):n(this).bind(r,(function(o){if("TD"===o.target.tagName)return n.tableDnD.initialiseDrag(this,t,this,o,e),!1})).css("cursor","move")}))},currentOrder:function(){var t=this.currentTable.rows;return n.map(t,(function(t){return(n(t).data("level")+t.id).replace(/\s/g,"")})).join("")},initialiseDrag:function(t,e,o,r,l){this.dragObject=t,this.currentTable=e,this.mouseOffset=this.getMouseOffset(o,r),this.originalOrder=this.currentOrder(),n(i).bind(a,this.mousemove).bind(s,this.mouseup),l.onDragStart&&l.onDragStart(e,o)},updateTables:function(){this.each((function(){this.tableDnDConfig&&n.tableDnD.makeDraggable(this)}))},mouseCoords:function(t){return t.originalEvent.changedTouches?{x:t.originalEvent.changedTouches[0].clientX,y:t.originalEvent.changedTouches[0].clientY}:t.pageX||t.pageY?{x:t.pageX,y:t.pageY}:{x:t.clientX+i.body.scrollLeft-i.body.clientLeft,y:t.clientY+i.body.scrollTop-i.body.clientTop}},getMouseOffset:function(t,e){var n,i;return e=e||o.event,i=this.getPosition(t),{x:(n=this.mouseCoords(e)).x-i.x,y:n.y-i.y}},getPosition:function(t){var e=0,n=0;for(0===t.offsetHeight&&(t=t.firstChild);t.offsetParent;)e+=t.offsetLeft,n+=t.offsetTop,t=t.offsetParent;return{x:e+=t.offsetLeft,y:n+=t.offsetTop}},autoScroll:function(t){var e=this.currentTable.tableDnDConfig,n=o.pageYOffset,r=o.innerHeight?o.innerHeight:i.documentElement.clientHeight?i.documentElement.clientHeight:i.body.clientHeight;i.all&&(void 0!==i.compatMode&&"BackCompat"!==i.compatMode?n=i.documentElement.scrollTop:void 0!==i.body&&(n=i.body.scrollTop)),t.y-n<e.scrollAmount&&o.scrollBy(0,-e.scrollAmount)||r-(t.y-n)<e.scrollAmount&&o.scrollBy(0,e.scrollAmount)},moveVerticle:function(t,e){0!==t.vertical&&e&&this.dragObject!==e&&this.dragObject.parentNode===e.parentNode&&(0>t.vertical&&this.dragObject.parentNode.insertBefore(this.dragObject,e.nextSibling)||0<t.vertical&&this.dragObject.parentNode.insertBefore(this.dragObject,e))},moveHorizontal:function(t,e){var o,i=this.currentTable.tableDnDConfig;if(!i.hierarchyLevel||0===t.horizontal||!e||this.dragObject!==e)return null;o=n(e).data("level"),0<t.horizontal&&o>0&&n(e).find("td:first").children(":first").remove()&&n(e).data("level",--o),0>t.horizontal&&o<i.hierarchyLevel&&n(e).prev().data("level")>=o&&n(e).children(":first").prepend(i.indentArtifact)&&n(e).data("level",++o)},mousemove:function(t){var e,o,i,r,a,s=n(n.tableDnD.dragObject),l=n.tableDnD.currentTable.tableDnDConfig;return t&&t.preventDefault(),!!n.tableDnD.dragObject&&("touchmove"===t.type&&event.preventDefault(),l.onDragClass&&s.addClass(l.onDragClass)||s.css(l.onDragStyle),r=(o=n.tableDnD.mouseCoords(t)).x-n.tableDnD.mouseOffset.x,a=o.y-n.tableDnD.mouseOffset.y,n.tableDnD.autoScroll(o),e=n.tableDnD.findDropTargetRow(s,a),i=n.tableDnD.findDragDirection(r,a),n.tableDnD.moveVerticle(i,e),n.tableDnD.moveHorizontal(i,e),!1)},findDragDirection:function(t,e){var n=this.currentTable.tableDnDConfig.sensitivity,o=this.oldX,i=this.oldY,r={horizontal:t>=o-n&&t<=o+n?0:t>o?-1:1,vertical:e>=i-n&&e<=i+n?0:e>i?-1:1};return 0!==r.horizontal&&(this.oldX=t),0!==r.vertical&&(this.oldY=e),r},findDropTargetRow:function(t,e){for(var o=0,i=this.currentTable.rows,r=this.currentTable.tableDnDConfig,a=0,s=null,l=0;l<i.length;l++)if(s=i[l],a=this.getPosition(s).y,o=parseInt(s.offsetHeight)/2,0===s.offsetHeight&&(a=this.getPosition(s.firstChild).y,o=parseInt(s.firstChild.offsetHeight)/2),e>a-o&&e<a+o)return t.is(s)||r.onAllowDrop&&!r.onAllowDrop(t,s)||n(s).hasClass("nodrop")?null:s;return null},processMouseup:function(){if(!this.currentTable||!this.dragObject)return null;var t=this.currentTable.tableDnDConfig,e=this.dragObject,o=0,r=0;n(i).unbind(a,this.mousemove).unbind(s,this.mouseup),t.hierarchyLevel&&t.autoCleanRelations&&n(this.currentTable.rows).first().find("td:first").children().each((function(){(r=n(this).parents("tr:first").data("level"))&&n(this).parents("tr:first").data("level",--r)&&n(this).remove()}))&&t.hierarchyLevel>1&&n(this.currentTable.rows).each((function(){if((r=n(this).data("level"))>1)for(o=n(this).prev().data("level");r>o+1;)n(this).find("td:first").children(":first").remove(),n(this).data("level",--r)})),t.onDragClass&&n(e).removeClass(t.onDragClass)||n(e).css(t.onDropStyle),this.dragObject=null,t.onDrop&&this.originalOrder!==this.currentOrder()&&n(e).hide().fadeIn("fast")&&t.onDrop(this.currentTable,e),t.onDragStop&&t.onDragStop(this.currentTable,e),this.currentTable=null},mouseup:function(t){return t&&t.preventDefault(),n.tableDnD.processMouseup(),!1},jsonize:function(t){var e=this.currentTable;return t?JSON.stringify(this.tableData(e),null,e.tableDnDConfig.jsonPretifySeparator):JSON.stringify(this.tableData(e))},serialize:function(){return n.param(this.tableData(this.currentTable))},serializeTable:function(t){for(var e="",n=t.tableDnDConfig.serializeParamName||t.id,o=t.rows,i=0;i<o.length;i++){e.length>0&&(e+="&");var r=o[i].id;r&&t.tableDnDConfig&&t.tableDnDConfig.serializeRegexp&&(e+=n+"[]="+(r=r.match(t.tableDnDConfig.serializeRegexp)[0]))}return e},serializeTables:function(){var t=[];return n("table").each((function(){this.id&&t.push(n.param(n.tableDnD.tableData(this)))})),t.join("&")},tableData:function(t){var e,o,i,r,a=t.tableDnDConfig,s=[],l=0,c=0,d=null,u={};if(t||(t=this.currentTable),!t||!t.rows||!t.rows.length)return{error:{code:500,message:"Not a valid table."}};if(!t.id&&!a.serializeParamName)return{error:{code:500,message:"No serializable unique id provided."}};r=a.autoCleanRelations&&t.rows||n.makeArray(t.rows),e=function(t){return t&&a&&a.serializeRegexp?t.match(a.serializeRegexp)[0]:t},u[i=o=a.serializeParamName||t.id]=[],!a.autoCleanRelations&&n(r[0]).data("level")&&r.unshift({id:"undefined"});for(var h=0;h<r.length;h++)if(a.hierarchyLevel){if(0===(c=n(r[h]).data("level")||0))i=o,s=[];else if(c>l)s.push([i,l]),i=e(r[h-1].id);else if(c<l)for(var f=0;f<s.length;f++)s[f][1]===c&&(i=s[f][0]),s[f][1]>=l&&(s[f][1]=0);l=c,n.isArray(u[i])||(u[i]=[]),(d=e(r[h].id))&&u[i].push(d)}else(d=e(r[h].id))&&u[i].push(d);return u}},jQuery.fn.extend({tableDnD:n.tableDnD.build,tableDnDUpdate:n.tableDnD.updateTables,tableDnDSerialize:n.proxy(n.tableDnD.serialize,n.tableDnD),tableDnDSerializeAll:n.tableDnD.serializeTables,tableDnDData:n.proxy(n.tableDnD.tableData,n.tableDnD)})},,function(t,e,n){"use strict";n.r(e);var o={categoryDeleteAction:".js-delete-category-row-action",customerDeleteAction:".js-delete-customer-row-action",linkRowAction:".js-link-row-action",linkRowActionClickableFirst:".js-link-row-action[data-clickable-row=1]:first",clickableTd:"td.clickable"},i=function(t){return"".concat(t,"-grid-confirm-modal")},r=".js-grid-table",a=".js-drag-handle",s="js-drag-handle",l=function(t){return"#".concat(t,"_grid")},c=".js-grid-panel",d=".js-grid-header",u=function(t){return".js-grid-table .js-".concat(t,"-position")},h=function(t){return".js-".concat(t,"-position:first")},f="table.table",p="position-row-while-drag",m=window.$,b=function(){function t(t){this.id=t,this.$container=m(l(this.id))}return t.prototype.getId=function(){return this.id},t.prototype.getContainer=function(){return this.$container},t.prototype.getHeaderContainer=function(){return this.$container.closest(c).find(d)},t.prototype.addExtension=function(t){t.extend(this)},t}(),v=window.$,g=function(){function t(){}return t.prototype.extend=function(t){this.initRowLinks(t),this.initConfirmableActions(t)},t.prototype.initConfirmableActions=function(t){t.getContainer().on("click",o.linkRowAction,(function(t){var e=v(t.currentTarget).data("confirm-message");e.length&&!window.confirm(e)&&t.preventDefault()}))},t.prototype.initRowLinks=function(t){v("tr",t.getContainer()).each((function(){var t=v(this);v(o.linkRowActionClickableFirst,t).each((function(){var e=v(this),n=e.closest("td"),i=v(o.clickableTd,t).not(n),r=!1;i.addClass("cursor-pointer").mousedown((function(){v(window).mousemove((function(){r=!0,v(window).unbind("mousemove")}))})),i.mouseup((function(){var t=r;if(r=!1,v(window).unbind("mousemove"),!t){var n=e.data("confirm-message");(!n.length||window.confirm(n)&&e.attr("href"))&&(document.location.href=e.attr("href"))}}))}))}))},t}(),y=function(){return y=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},y.apply(this,arguments)},w=function(){function t(t){var e=y({id:"confirm-modal",closable:!1},t);this.buildModalContainer(e)}return t.prototype.buildModalContainer=function(t){var e=this;this.container=document.createElement("div"),this.container.classList.add("modal","fade"),this.container.id=t.id,this.dialog=document.createElement("div"),this.dialog.classList.add("modal-dialog"),t.dialogStyle&&Object.keys(t.dialogStyle).forEach((function(n){e.dialog.style[n]=t.dialogStyle[n]})),this.content=document.createElement("div"),this.content.classList.add("modal-content"),this.message=document.createElement("p"),this.message.classList.add("modal-message"),this.header=document.createElement("div"),this.header.classList.add("modal-header"),t.modalTitle&&(this.title=document.createElement("h4"),this.title.classList.add("modal-title"),this.title.innerHTML=t.modalTitle),this.closeIcon=document.createElement("button"),this.closeIcon.classList.add("close"),this.closeIcon.setAttribute("type","button"),this.closeIcon.dataset.dismiss="modal",this.closeIcon.innerHTML="×",this.body=document.createElement("div"),this.body.classList.add("modal-body","text-left","font-weight-normal"),this.title&&this.header.appendChild(this.title),this.header.appendChild(this.closeIcon),this.content.append(this.header,this.body),this.body.appendChild(this.message),this.dialog.appendChild(this.content),this.container.appendChild(this.dialog)},t}(),D=function(){function t(t){var e=y({id:"confirm-modal",closable:!1,dialogStyle:{}},t);this.initContainer(e)}return t.prototype.initContainer=function(t){this.modal||(this.modal=new w(t)),this.$modal=$(this.modal.container);var e=t.id,n=t.closable;this.$modal.modal({backdrop:!!n||"static",keyboard:void 0===n||n,show:!1}),this.$modal.on("hidden.bs.modal",(function(){var n=document.querySelector("#".concat(e));n&&n.remove(),t.closeCallback&&t.closeCallback()})),document.body.appendChild(this.modal.container)},t.prototype.setTitle=function(t){this.modal.title||(this.modal.title=document.createElement("h4"),this.modal.title.classList.add("modal-title"),this.modal.closeIcon?this.modal.header.insertBefore(this.modal.title,this.modal.closeIcon):this.modal.header.appendChild(this.modal.title)),this.modal.title.innerHTML=t},t.prototype.render=function(t){this.modal.message.innerHTML=t},t.prototype.show=function(){this.$modal.modal("show")},t.prototype.hide=function(){var t=this;this.$modal.modal("hide"),this.$modal.on("shown.bs.modal",(function(){t.$modal.modal("hide"),t.$modal.off("shown.bs.modal")}))},t}();function _(t){return void 0===t}var O,C=(O=function(t,e){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},O(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),L=function(){return L=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},L.apply(this,arguments)},T=function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))},E=function(t){function e(e){return t.call(this,e)||this}return C(e,t),e.prototype.buildModalContainer=function(e){var n;t.prototype.buildModalContainer.call(this,e),this.message.classList.add("confirm-message"),this.message.innerHTML=e.confirmMessage,this.footer=document.createElement("div"),this.footer.classList.add("modal-footer"),this.closeButton=document.createElement("button"),this.closeButton.setAttribute("type","button"),this.closeButton.classList.add("btn","btn-outline-secondary","btn-lg"),this.closeButton.dataset.dismiss="modal",this.closeButton.innerHTML=e.closeButtonLabel,this.confirmButton=document.createElement("button"),this.confirmButton.setAttribute("type","button"),this.confirmButton.classList.add("btn",e.confirmButtonClass,"btn-lg","btn-confirm-submit"),this.confirmButton.dataset.dismiss="modal",this.confirmButton.innerHTML=e.confirmButtonLabel,(n=this.footer).append.apply(n,T(T([this.closeButton],e.customButtons,!1),[this.confirmButton],!1)),this.content.append(this.footer)},e}(w),j=function(t){function e(e,n,o){var i,r;r=_(e.confirmCallback)?_(n)?function(){console.error("No confirm callback provided for ConfirmModal component.")}:n:e.confirmCallback;var a=L({id:"confirm-modal",confirmMessage:"Are you sure?",closeButtonLabel:"Close",confirmButtonLabel:"Accept",confirmButtonClass:"btn-primary",customButtons:[],closable:!1,modalTitle:e.confirmTitle,dialogStyle:{},confirmCallback:r,closeCallback:null!==(i=e.closeCallback)&&void 0!==i?i:o},e);return t.call(this,a)||this}return C(e,t),e.prototype.initContainer=function(e){this.modal=new E(e),this.modal.confirmButton.addEventListener("click",e.confirmCallback),t.prototype.initContainer.call(this,e)},e}(D),S=n(0),B=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),A=function(t){function e(n,o){void 0===o&&(o={});var i=t.call(this,e.parentWindowEvent)||this;return i.eventName=n,i.eventParameters=o,i}return B(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this.eventName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parameters",{get:function(){return this.eventParameters},enumerable:!1,configurable:!0}),e.parentWindowEvent="IframeClientEvent",e}(Event),z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),x=function(){return x=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},x.apply(this,arguments)},P=function(t){function e(e){return t.call(this,e)||this}return z(e,t),e.prototype.buildModalContainer=function(e){t.prototype.buildModalContainer.call(this,e),this.container.classList.add("modal-iframe"),this.message.classList.add("d-none"),this.iframe=document.createElement("iframe"),this.iframe.frameBorder="0",this.iframe.scrolling="no",this.iframe.width="100%",e.autoSize||(this.iframe.height="100%"),this.loader=document.createElement("div"),this.loader.classList.add("modal-iframe-loader"),this.spinner=document.createElement("div"),this.spinner.classList.add("spinner"),this.loader.appendChild(this.spinner),this.body.append(this.loader,this.iframe),_(e.closeButtonLabel)&&_(e.confirmButtonLabel)||(this.footer=document.createElement("div"),this.footer.classList.add("modal-footer"),_(e.closeButtonLabel)||(this.closeButton=document.createElement("button"),this.closeButton.setAttribute("type","button"),this.closeButton.classList.add("btn","btn-outline-secondary","btn-lg"),this.closeButton.dataset.dismiss="modal",this.closeButton.innerHTML=e.closeButtonLabel,this.footer.append(this.closeButton)),_(e.confirmButtonLabel)||(this.confirmButton=document.createElement("button"),this.confirmButton.setAttribute("type","button"),this.confirmButton.classList.add("btn","btn-primary","btn-lg","btn-confirm-submit"),e.closeOnConfirm&&(this.confirmButton.dataset.dismiss="modal"),this.confirmButton.innerHTML=e.confirmButtonLabel,this.footer.append(this.confirmButton)),this.content.append(this.footer))},e}(w),M=function(t){function e(e){var n=x({id:"iframe-modal",closable:!1,autoSize:!0,autoSizeContainer:"body",closeOnConfirm:!0,autoScrollUp:!0},e);return t.call(this,n)||this}return z(e,t),e.prototype.initContainer=function(e){var n=this;this.modal=new P(e),t.prototype.initContainer.call(this,e),this.autoSize=e.autoSize,this.autoSizeContainer=e.autoSizeContainer,this.modal.iframe.addEventListener("load",(function(t){n.modal.body.scroll(0,0),n.hideLoading(),e.onLoaded&&e.onLoaded(n.modal.iframe,t),n.modal.iframe.contentWindow&&(n.modal.iframe.contentWindow.addEventListener("beforeunload",(function(t){e.onUnload&&e.onUnload(n.modal.iframe,t),n.showLoading()})),n.initAutoResize())})),this.$modal.on("shown.bs.modal",(function(){n.modal.iframe.src=e.iframeUrl})),window.addEventListener(A.parentWindowEvent,(function(t){e.onIframeEvent&&e.onIframeEvent(t)})),this.modal.confirmButton&&e.confirmCallback&&this.modal.confirmButton.addEventListener("click",(function(t){e.confirmCallback&&e.confirmCallback(n.modal.iframe,t)}))},e.prototype.render=function(t,e){void 0===e&&(e=!0),this.modal.message.innerHTML=t,this.modal.message.classList.remove("d-none"),e&&this.hideIframe(),this.autoResize(),this.hideLoading()},e.prototype.showLoading=function(){var t=this.getOuterHeight(this.modal.body),e=this.getOuterWidth(this.modal.body);this.modal.loader.style.height="".concat(t,"px"),this.modal.loader.style.width="".concat(e,"px"),this.modal.loader.classList.remove("d-none"),this.modal.iframe.classList.remove("invisible"),this.modal.iframe.classList.add("invisible")},e.prototype.hideLoading=function(){this.modal.iframe.classList.remove("invisible"),this.modal.iframe.classList.add("visible"),this.modal.loader.classList.add("d-none")},e.prototype.hide=function(){t.prototype.hide.call(this),this.cleanResizeObserver()},e.prototype.hideIframe=function(){this.modal.iframe.classList.add("d-none")},e.prototype.getResizableContainer=function(){return this.autoSize&&this.modal.iframe.contentWindow?this.modal.iframe.contentWindow.document.querySelector(this.autoSizeContainer):null},e.prototype.initAutoResize=function(){var t=this,e=this.getResizableContainer();e&&(this.cleanResizeObserver(),this.resizeObserver=new S.a((function(){t.autoResize()})),this.resizeObserver.observe(e)),this.autoResize()},e.prototype.cleanResizeObserver=function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},e.prototype.autoResize=function(){var t=this.getResizableContainer();if(t){var e=t.scrollHeight,n=this.getOuterHeight(this.modal.message)+e;n&&(this.modal.iframe.style.height="".concat(n,"px"))}},e.prototype.getOuterHeight=function(t){if(!t.offsetHeight)return 0;var e=t.offsetHeight,n=getComputedStyle(t);return e+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10)},e.prototype.getOuterWidth=function(t){if(!t.offsetWidth)return 0;var e=t.offsetWidth,n=getComputedStyle(t);return e+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10)},e}(D),k=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),R=function(){return R=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},R.apply(this,arguments)},I=(function(t){function e(e){var n=this,o=R({iframeUrl:e.formUrl,onLoaded:function(t,o){var i,r;n.onIframeLoaded(t,o,e.onFormLoaded,null!==(i=e.cancelButtonSelector)&&void 0!==i?i:".cancel-btn",null!==(r=e.formSelector)&&void 0!==r?r:"form")},confirmCallback:function(t,o){var i;n.onConfirmCallback(t,o,e.formConfirmCallback,null!==(i=e.formSelector)&&void 0!==i?i:"form")}},e);return n=t.call(this,o)||this}k(e,t),e.prototype.onIframeLoaded=function(t,e,n,o,i){var r,a=this;if(n){var s=this.getForm(t,i);if(s)s.querySelectorAll(o).forEach((function(t){t.addEventListener("click",(function(){a.hide()}))})),n(s,new FormData(s),null!==(r=s.dataset)&&void 0!==r?r:null,e)}},e.prototype.onConfirmCallback=function(t,e,n,o){if(n){var i=this.getForm(t,o);i&&n(i,t,e)}},e.prototype.getForm=function(t,e){return t.contentWindow?t.contentWindow.document.querySelector(e):null}}(M),window.$),H=function(){function t(){}return t.prototype.extend=function(t){var e=this;t.getContainer().on("click",".js-submit-row-action",(function(n){n.preventDefault();var o=I(n.currentTarget),i=o.data("confirmMessage"),r=o.data("title"),a=o.data("method");if(r)e.showConfirmModal(o,t,i,r,a);else{if(i.length&&!window.confirm(i))return;e.postForm(o,a)}}))},t.prototype.postForm=function(t,e){var n=["GET","POST"].includes(e),o=I("<form>",{action:t.data("url"),method:n?e:"POST"}).appendTo("body");n||o.append(I("<input>",{type:"hidden",name:"_method",value:e})),o.submit()},t.prototype.showConfirmModal=function(t,e,n,o,r){var a=this,s=t.data("confirmButtonLabel"),l=t.data("closeButtonLabel"),c=t.data("confirmButtonClass");new j({id:i(e.getId()),confirmTitle:o,confirmMessage:n,confirmButtonLabel:s,closeButtonLabel:l,confirmButtonClass:c},(function(){return a.postForm(t,r)})).show()},t}(),N=window.$,W=function(){function t(t){var e;this.selector=".ps-sortable-column",this.idTable=null!==(e=t.attr("id"))&&void 0!==e?e:"",this.columns=t.find(this.selector)}return t.prototype.attach=function(){var t=this;this.columns.on("click",(function(e){var n=N(e.delegateTarget);t.sortByColumn(n,t.getToggledSortDirection(n))}))},t.prototype.sortBy=function(t,e){if(!this.columns.is('[data-sort-col-name="'.concat(t,'"]')))throw new Error('Cannot sort by "'.concat(t,'": invalid column'));this.sortByColumn(this.columns,e)},t.prototype.sortByColumn=function(t,e){window.location.href=this.getUrl(t.data("sortColName"),"desc"===e?"desc":"asc",t.data("sortPrefix"))},t.prototype.getToggledSortDirection=function(t){return"asc"===t.data("sortDirection")?"desc":"asc"},t.prototype.getUrl=function(t,e,n){var o=new URL(window.location.href),i=o.searchParams;return n?(i.set("".concat(n,"[orderBy]"),t),i.set("".concat(n,"[sortOrder]"),e)):(i.set("orderBy",t),i.set("sortOrder",e)),o.hash=this.idTable,o.toString()},t}(),F=function(){function t(){}return t.prototype.extend=function(t){var e=t.getContainer().find(f);new W(e).attach()},t}(),q=(n(4),window.$),U=function(){function t(t){this.grid=t}return t.prototype.extend=function(t){var e=this;this.grid=t,this.addIdsToGridTableRows(),t.getContainer().find(r).tableDnD({onDragClass:p,dragHandle:a,onDrop:function(t,n){return e.handlePositionChange(n)}}),t.getContainer().find(".js-drag-handle").hover((function(){q(this).closest("tr").addClass("hover")}),(function(){q(this).closest("tr").removeClass("hover")}))},t.prototype.handlePositionChange=function(t){var e=q(t).find(h(this.grid.getId())),n=e.data("update-url"),o=e.data("update-method"),i={positions:this.getRowsPositions()};this.updatePosition(n,i,o)},t.prototype.getRowsPositions=function(){for(var t,e=JSON.parse(q.tableDnD.jsonize())["".concat(this.grid.getId(),"_grid_table")],n=[],o=0;o<e.length;o+=1)t=this.grid.getContainer().find("#".concat(e[o])),n.push({rowMarker:e[o],offset:t.data("dragAndDropOffset")});return this.computeMappingBetweenOldAndNewPositions(n)},t.prototype.addIdsToGridTableRows=function(){var t=0;this.grid.getContainer().find(u(this.grid.getId())).each((function(e,n){var o=q(n),i=o.data("id"),r=o.data("position"),a="row_".concat(i,"_").concat(r);o.closest("tr").attr("id",a),o.closest("td").addClass(s),o.closest("tr").data("dragAndDropOffset",t),t+=1}))},t.prototype.updatePosition=function(t,e,n){for(var o,i=["GET","POST"].includes(n),r=q("<form>",{action:t,method:i?n:"POST"}).appendTo("body"),a=e.positions.length,s=0;s<a;s+=1)o=e.positions[s],r.append(q("<input>",{type:"hidden",name:"positions[".concat(s,"][rowId]"),value:o.rowId}),q("<input>",{type:"hidden",name:"positions[".concat(s,"][oldPosition]"),value:o.oldPosition}),q("<input>",{type:"hidden",name:"positions[".concat(s,"][newPosition]"),value:o.newPosition}));i||r.append(q("<input>",{type:"hidden",name:"_method",value:n})),r.submit()},t.prototype.computeMappingBetweenOldAndNewPositions=function(t){for(var e,n=/^row_(?<rowId>\d+)_(?<oldPosition>\d+)$/,o=[],i=0;i<t.length;i+=1){var r=n.exec(t[i].rowMarker);if(r&&!_(r.groups)&&!_(r.groups.rowId)&&!_(r.groups.oldPosition)){var a=parseInt(null===(e=null==r?void 0:r.groups)||void 0===e?void 0:e.oldPosition,10);o[i]={rowId:r.groups.rowId,oldPosition:a,newPosition:a}}for(var s=0;s<t.length;s+=1)_(t[s])||_(t[s].offset)||_(o[t[s].offset])||_(o[s])||(o[t[s].offset].newPosition=o[s].oldPosition)}return o},t}();(0,window.$)((()=>{document.querySelectorAll(".js-grid").forEach((t=>{const e=new b(t.dataset.gridId);e.addExtension(new F),e.addExtension(new g),e.addExtension(new H),e.addExtension(new U)}))}))}]);
xxxxx1.0, XXX xxxx