EVOLUTION-MANAGER
Edit File: bundle.js
/*! formstone v1.4.16-1 [core.js] 2019-08-06 | GPL-3.0 License | formstone.it */ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(w){"use strict";function e(){this.Version="1.4.16-1",this.Plugins={},this.DontConflict=!1,this.Conflicts={fn:{}},this.ResizeHandlers=[],this.RAFHandlers=[],this.window=i,this.$window=w(i),this.document=r,this.$document=w(r),this.$body=null,this.windowWidth=0,this.windowHeight=0,this.fallbackWidth=1024,this.fallbackHeight=768,this.userAgent=window.navigator.userAgent||window.navigator.vendor||window.opera,this.isFirefox=/Firefox/i.test(this.userAgent),this.isChrome=/Chrome/i.test(this.userAgent),this.isSafari=/Safari/i.test(this.userAgent)&&!this.isChrome,this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(this.userAgent),this.isIEMobile=/IEMobile/i.test(this.userAgent),this.isFirefoxMobile=this.isFirefox&&this.isMobile,this.transform=null,this.transition=null,this.support={file:!!(window.File&&window.FileList&&window.FileReader),history:!!(window.history&&window.history.pushState&&window.history.replaceState),matchMedia:!(!window.matchMedia&&!window.msMatchMedia),pointer:!!window.PointerEvent,raf:!(!window.requestAnimationFrame||!window.cancelAnimationFrame),touch:!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),transition:!1,transform:!1}}var t,n,s,i="undefined"!=typeof window?window:this,r=i.document,o={killEvent:function(e,t){try{e.preventDefault(),e.stopPropagation(),t&&e.stopImmediatePropagation()}catch(e){}},killGesture:function(e){try{e.preventDefault()}catch(e){}},lockViewport:function(e){p[e]=!0,w.isEmptyObject(p)||h||(t.length?t.attr("content",s):t=w("head").append('<meta name="viewport" content="'+s+'">'),c.$body.on(u.gestureChange,o.killGesture).on(u.gestureStart,o.killGesture).on(u.gestureEnd,o.killGesture),h=!0)},unlockViewport:function(e){"undefined"!==w.type(p[e])&&delete p[e],w.isEmptyObject(p)&&h&&(t.length&&(n?t.attr("content",n):t.remove()),c.$body.off(u.gestureChange).off(u.gestureStart).off(u.gestureEnd),h=!1)},startTimer:function(e,t,n,s){return o.clearTimer(e),s?setInterval(n,t):setTimeout(n,t)},clearTimer:function(e,t){e&&(t?clearInterval(e):clearTimeout(e),e=null)},sortAsc:function(e,t){return parseInt(e,10)-parseInt(t,10)},sortDesc:function(e,t){return parseInt(t,10)-parseInt(e,10)},decodeEntities:function(e){var t=c.document.createElement("textarea");return t.innerHTML=e,t.value},parseQueryString:function(e){for(var t={},n=e.slice(e.indexOf("?")+1).split("&"),s=0;s<n.length;s++){var i=n[s].split("=");t[i[0]]=i[1]}return t}},c=new e,a=w.Deferred(),l={base:"{ns}",element:"{ns}-element"},u={namespace:".{ns}",beforeUnload:"beforeunload.{ns}",blur:"blur.{ns}",change:"change.{ns}",click:"click.{ns}",dblClick:"dblclick.{ns}",drag:"drag.{ns}",dragEnd:"dragend.{ns}",dragEnter:"dragenter.{ns}",dragLeave:"dragleave.{ns}",dragOver:"dragover.{ns}",dragStart:"dragstart.{ns}",drop:"drop.{ns}",error:"error.{ns}",focus:"focus.{ns}",focusIn:"focusin.{ns}",focusOut:"focusout.{ns}",gestureChange:"gesturechange.{ns}",gestureStart:"gesturestart.{ns}",gestureEnd:"gestureend.{ns}",input:"input.{ns}",keyDown:"keydown.{ns}",keyPress:"keypress.{ns}",keyUp:"keyup.{ns}",load:"load.{ns}",mouseDown:"mousedown.{ns}",mouseEnter:"mouseenter.{ns}",mouseLeave:"mouseleave.{ns}",mouseMove:"mousemove.{ns}",mouseOut:"mouseout.{ns}",mouseOver:"mouseover.{ns}",mouseUp:"mouseup.{ns}",panStart:"panstart.{ns}",pan:"pan.{ns}",panEnd:"panend.{ns}",resize:"resize.{ns}",scaleStart:"scalestart.{ns}",scaleEnd:"scaleend.{ns}",scale:"scale.{ns}",scroll:"scroll.{ns}",select:"select.{ns}",swipe:"swipe.{ns}",touchCancel:"touchcancel.{ns}",touchEnd:"touchend.{ns}",touchLeave:"touchleave.{ns}",touchMove:"touchmove.{ns}",touchStart:"touchstart.{ns}"},d=null,f=20,p=[],h=!1;function m(e,t,n,s){var i,r={raw:{}};for(i in s=s||{})s.hasOwnProperty(i)&&("classes"===e?(r.raw[s[i]]=t+"-"+s[i],r[s[i]]="."+t+"-"+s[i]):(r.raw[i]=s[i],r[i]=s[i]+"."+t));for(i in n)n.hasOwnProperty(i)&&("classes"===e?(r.raw[i]=n[i].replace(/{ns}/g,t),r[i]=n[i].replace(/{ns}/g,"."+t)):(r.raw[i]=n[i].replace(/.{ns}/g,""),r[i]=n[i].replace(/{ns}/g,t)));return r}function g(){c.windowWidth=c.$window.width(),c.windowHeight=c.$window.height(),d=o.startTimer(d,f,y)}function y(){for(var e in c.ResizeHandlers)c.ResizeHandlers.hasOwnProperty(e)&&c.ResizeHandlers[e].callback.call(window,c.windowWidth,c.windowHeight)}function v(e,t){return parseInt(e.priority)-parseInt(t.priority)}return e.prototype.NoConflict=function(){for(var e in c.DontConflict=!0,c.Plugins)c.Plugins.hasOwnProperty(e)&&(w[e]=c.Conflicts[e],w.fn[e]=c.Conflicts.fn[e])},e.prototype.Ready=function(e){"complete"===c.document.readyState||"loading"!==c.document.readyState&&!c.document.documentElement.doScroll?e():c.document.addEventListener("DOMContentLoaded",e)},e.prototype.Plugin=function(e,t){function d(e){return e.data(h)}var f,p,n,h;return c.Plugins[e]=(p=t,n="fs-"+(f=e),h="fs"+f.replace(/(^|\s)([a-z])/g,function(e,t,n){return t+n.toUpperCase()}),p.initialized=!1,p.priority=p.priority||10,p.classes=m("classes",n,l,p.classes),p.events=m("events",f,u,p.events),p.functions=w.extend({getData:d,iterate:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0,s=this.length;n<s;n++){var i=this.eq(n),r=d(i)||{};"undefined"!==w.type(r.$el)&&e.apply(i,[r].concat(t))}return this}},o,p.functions),p.methods=w.extend(!0,{_construct:w.noop,_postConstruct:w.noop,_destruct:w.noop,_resize:!1,destroy:function(e){p.functions.iterate.apply(this,[p.methods._destruct].concat(Array.prototype.slice.call(arguments,1))),this.removeClass(p.classes.raw.element).removeData(h)}},p.methods),p.utilities=w.extend(!0,{_initialize:!1,_delegate:!1,defaults:function(e){p.defaults=w.extend(!0,p.defaults,e||{})}},p.utilities),p.widget&&(c.Conflicts.fn[f]=w.fn[f],w.fn[h]=function(e){if(this instanceof w){var t=p.methods[e];if("object"===w.type(e)||!e)return function(e){var t,n,s,i="object"===w.type(e),r=Array.prototype.slice.call(arguments,i?1:0),o=w();for(e=w.extend(!0,{},p.defaults||{},i?e:{}),n=0,s=this.length;n<s;n++)if(!d(t=this.eq(n))){p.guid++;var a="__"+p.guid,c=p.classes.raw.base+a,l=t.data(f+"-options"),u=w.extend(!0,{$el:t,guid:a,numGuid:p.guid,rawGuid:c,dotGuid:"."+c},e,"object"===w.type(l)?l:{});t.addClass(p.classes.raw.element).data(h,u),p.methods._construct.apply(t,[u].concat(r)),o=o.add(t)}for(n=0,s=o.length;n<s;n++)t=o.eq(n),p.methods._postConstruct.apply(t,[d(t)]);return this}.apply(this,arguments);if(t&&0!==e.indexOf("_")){var n=[t].concat(Array.prototype.slice.call(arguments,1));return p.functions.iterate.apply(this,n)}return this}},c.DontConflict||(w.fn[f]=w.fn[h])),c.Conflicts[f]=w[f],w[h]=p.utilities._delegate||function(e){var t=p.utilities[e]||p.utilities._initialize||!1;if(t){var n=Array.prototype.slice.call(arguments,"object"===w.type(e)?0:1);return t.apply(window,n)}},c.DontConflict||(w[f]=w[h]),p.namespace=f,p.namespaceClean=h,p.guid=0,p.methods._resize&&(c.ResizeHandlers.push({namespace:f,priority:p.priority,callback:p.methods._resize}),c.ResizeHandlers.sort(v)),p.methods._raf&&(c.RAFHandlers.push({namespace:f,priority:p.priority,callback:p.methods._raf}),c.RAFHandlers.sort(v)),p),c.Plugins[e]},c.$window.on("resize.fs",g),g(),function e(){if(c.support.raf)for(var t in c.window.requestAnimationFrame(e),c.RAFHandlers)c.RAFHandlers.hasOwnProperty(t)&&c.RAFHandlers[t].callback.call(window)}(),c.Ready(function(){c.$body=w("body"),w("html").addClass(c.support.touch?"touchevents":"no-touchevents"),t=w('meta[name="viewport"]'),n=!!t.length&&t.attr("content"),s="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0",a.resolve()}),u.clickTouchStart=u.click+" "+u.touchStart,function(){var e,t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"},n=["transition","-webkit-transition"],s={transform:"transform",MozTransform:"-moz-transform",OTransform:"-o-transform",msTransform:"-ms-transform",webkitTransform:"-webkit-transform"},i="transitionend",r="",o="",a=document.createElement("div");for(e in t)if(t.hasOwnProperty(e)&&e in a.style){i=t[e],c.support.transition=!0;break}for(e in u.transitionEnd=i+".{ns}",n)if(n.hasOwnProperty(e)&&n[e]in a.style){r=n[e];break}for(e in c.transition=r,s)if(s.hasOwnProperty(e)&&s[e]in a.style){c.support.transform=!0,o=s[e];break}c.transform=o}(),window.Formstone=c}); /*! formstone v1.4.16-1 [upload.js] 2019-08-06 | GPL-3.0 License | formstone.it * Customized with this PR https://github.com/Formstone/Formstone/pull/281/files?diff=unified&w=1 * */ !function(e){"function"==typeof define&&define.amd?define(["jquery","./core"],e):e(jQuery,Formstone)}(function(u,r){"use strict";function s(e,t,a){t.error=!0,e.$el.trigger($.fileError,[t,a]),e.aborting||v(e)}function a(e){e.disabled&&(this.removeClass(C.disabled),e.$input.prop("disabled",!1),e.disabled=!1)}function n(e){y.killEvent(e);var t=e.data;t.disabled||t.$input.trigger($.click)}function i(e){e.data.$el.addClass(C.focus)}function l(e){e.data.$el.removeClass(C.focus)}function o(e){y.killEvent(e);var t=e.data,a=t.$input[0].files;!t.disabled&&a.length&&g(t,a)}function c(e){y.killEvent(e),e.data.$el.addClass(C.dropping).trigger($.fileDragEnter)}function d(e){y.killEvent(e),e.data.$el.addClass(C.dropping).trigger($.fileDragOver)}function f(e){y.killEvent(e),e.data.$el.removeClass(C.dropping).trigger($.fileDragLeave)}function p(e){y.killEvent(e);var t=e.data,a=e.originalEvent.dataTransfer.files;t.$el.removeClass(C.dropping),t.disabled||g(t,a)}function g(e,t){var a=[],r=t.length;if(e.maxFiles){var n=e.maxFiles-e.uploaded;0<=n&&t.length>n&&(r=n)}if(0<r){for(var i=0;i<r;i++){var l={index:e.total++,file:t[i],name:t[i].name,size:t[i].size,started:!1,complete:!1,error:!1,transfer:null};a.push(l),e.queue.push(l)}e.$el.trigger($.queued,[a]),e.autoUpload&&h(e)}e.$input.val("")}function h(e){e.uploading||(S.on($.beforeUnload,function(){return e.leave}),e.uploading=!0,e.$el.trigger($.start,[e.queue])),v(e)}function v(e){var t=0,a=[];if(e.uploading){for(var r in e.queue)!e.queue.hasOwnProperty(r)||e.queue[r].complete||e.queue[r].error||a.push(e.queue[r]);for(var n in e.queue=a,e.queue)if(e.queue.hasOwnProperty(n)){if(e.queue[n].started||m(e,e.queue[n]),++t>=e.maxConcurrent)return;r++}0===t&&(S.off($.beforeUnload),e.uploading=!1,e.$el.trigger($.complete))}}function m(n,i){if(i.size>=n.maxSize||!0===i.error)s(n,i,"size");else if(n.chunked)i.started=!0,i.chunkSize=1024*n.chunkSize,i.totalChunks=Math.ceil(i.size/i.chunkSize),i.currentChunk=0,n.$el.trigger($.fileStart,[i]),function n(l,o){var e=o.chunkSize*o.currentChunk,t=e+o.chunkSize;t>o.size&&(t=o.size);var a=o.file[q](e,t),r=new FormData;r.append(l.postKey,a,o.file.name);r.append("chunks",o.totalChunks);r.append("chunk",o.currentChunk);r=k(l,r,o);!1===r?s(l,o,"abort"):o.chunkTransfer=u.ajax({url:l.action,data:r,dataType:l.dataType,headers:l.headers,type:"POST",contentType:!1,processData:!1,cache:!1,beforeSend:function(e,t){l.$el.trigger($.chunkStart,[o,t,e])},success:function(e,t,a){o.currentChunk++,l.$el.trigger($.chunkComplete,[o]);var r=Math.ceil(o.currentChunk/o.totalChunks*100);l.$el.trigger($.fileProgress,[o,r,t,a]),o.currentChunk<o.totalChunks?n(l,o):(o.complete=!0,l.$el.trigger($.fileComplete,[o,e,t,a]),v(l))},error:function(e,t,a){var r,n,i;n=o,i=a,(r=l).$el.trigger($.chunkError,[n,i]),s(r,n,i)}})}(n,i);else{var e=new FormData;e.append(n.postKey,i.file),!1===(e=k(n,e,i))?s(n,i,"abort"):(i.started=!0,i.transfer=u.ajax({url:n.action,data:e,dataType:n.dataType,headers:n.headers,type:"POST",contentType:!1,processData:!1,cache:!1,xhr:function(){var e=u.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,a=e.loaded||e.position,r=e.total;e.lengthComputable&&(t=Math.ceil(a/r*100)),n.$el.trigger($.fileProgress,[i,t,e])},!1),e},beforeSend:function(e,t){n.$el.trigger($.fileStart,[i,t,e])},success:function(e,t,a){i.complete=!0,n.uploaded++,n.$el.trigger($.fileComplete,[i,e,t,a]),v(n)},error:function(e,t,a){s(n,i,a)}}))}}function k(e,t,a){for(var r in e.postData)e.postData.hasOwnProperty(r)&&t.append(r,e.postData[r]);return t=e.beforeSend.call(e.$el,t,a)}var e=r.Plugin("upload",{widget:!0,defaults:{accept:!1,action:"",autoUpload:!0,beforeSend:function(e){return e},chunked:!1,chunkSize:100,customClass:"",dataType:"html",headers:{},label:"Drag and drop files or click to select",leave:"You have uploads pending, are you sure you want to leave this page?",maxConcurrent:2,maxFiles:!1,maxSize:5242880,multiple:!0,postData:{},postKey:"file",theme:"fs-light"},classes:["input","target","multiple","dropping","disabled","focus"],methods:{_construct:function(e){if(r.support.file){var t="";q||(e.chunked=!1),e.maxQueue&&(e.maxConcurrent=e.maxQueue),!1!==e.label&&(t+='<div class="'+C.target+'">',t+=e.label,t+="</div>"),t+='<input class="'+C.input+'" type="file"',e.multiple&&(t+=" multiple"),e.accept&&(t+=' accept="'+e.accept+'"'),t+=">",e.baseClasses=[C.base,e.theme,e.customClass].join(" "),this.addClass(e.baseClasses).append(t),e.$input=this.find(b.input),e.queue=[],e.total=0,e.uploaded=0,e.uploading=!1,e.disabled=!0,e.aborting=!1,this.on($.click,b.target,e,n).on($.dragEnter,e,c).on($.dragOver,e,d).on($.dragLeave,e,f).on($.drop,e,p),e.$input.on($.focus,e,i).on($.blur,e,l).on($.change,e,o),a.call(this,e)}},_destruct:function(e){r.support.file&&(e.$input.off($.namespace),this.off($.namespace).removeClass(e.baseClasses).html(""))},disable:function(e){e.disabled||(this.addClass(C.disabled),e.$input.prop("disabled",!0),e.disabled=!0)},enable:a,abort:function(e,t){var a;for(var r in e.aborting=!0,e.queue)e.queue.hasOwnProperty(r)&&(a=e.queue[r],("undefined"===u.type(t)||0<=t&&a.index===t)&&(a.started&&!a.complete?e.chunked?a.chunkTransfer.abort():a.transfer.abort():s(e,a,"abort")));e.aborting=!1,v(e)},start:h}}),b=e.classes,C=b.raw,$=e.events,y=e.functions,S=(r.window,r.$window),q=!1;r.Ready(function(){var e=["mozSlice","webkitSlice","slice"];if(r.support.file){var t=!1;try{t=new File([""],"f")}catch(e){}if(!t)try{t=new Blob([""],{})}catch(e){}if(t)for(var a in e)if(e.hasOwnProperty(a)&&e[a]in t){q=e[a];break}}}),$.chunkComplete="chunkcomplete",$.chunkError="chunkerror",$.chunkStart="chunkstart",$.complete="complete",$.fileComplete="filecomplete",$.fileDragEnter="filedragenter",$.fileDragLeave="filedragleave",$.fileDragOver="filedragover",$.fileError="fileerror",$.fileProgress="fileprogress",$.fileStart="filestart",$.start="start",$.queued="queued"});