transfer.ues.com Open in urlscan Pro
24.106.94.46  Public Scan

URL: https://transfer.ues.com/js/cftp.upload.min.js
Submission Tags: falconsandbox
Submission: On March 17 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(window.jQuery)}(function(h){h.ui=h.ui||{},h.ui.version="1.12.1",h.expr.pseudos||(h.expr.pseudos=h.expr[":"]),h.uniqueSort||(h.uniqueSort=h.unique);var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;h.cleanData=(n=h.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=h._data(i,"events"))&&e.remove&&h(i).triggerHandler("remove");n(t)}),h.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=h.Widget),h.isArray(e)&&(e=h.extend.apply(null,[{}].concat(e))),h.expr.pseudos[l.toLowerCase()]=function(t){return!!h.data(t,l)},h[r]=h[r]||{},s=h[r][t],n=h[r][t]=function(t,e){if(!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},h.extend(n,s,{version:e.version,_proto:h.extend({},e),_childConstructors:[]}),(o=new i).options=h.widget.extend({},o.options),h.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}h.isFunction(s)?a[e]=function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:a[e]=s}),n.prototype=h.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(h.each(s._childConstructors,function(t,e){var i=e.prototype;h.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),h.widget.bridge(t,n),n},h.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(h.isPlainObject(i)?t[e]=h.isPlainObject(t[e])?h.widget.extend({},t[e],i):h.widget.extend({},i):t[e]=i);return t},h.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;h.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=h.data(this,a);return"instance"===i?(n=e,!1):e?h.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:h.error("no such method '"+i+"' for "+o+" widget instance"):h.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=h.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=h.data(this,a);t?(t.option(i||{}),t._init&&t._init()):h.data(this,a,new e(i,this))})),n}},h.Widget=function(){},h.Widget._childConstructors=[],h.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=h(e||this.defaultElement||this)[0],this.element=h(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=h(),this.hoverable=h(),this.focusable=h(),this.classesElementLookup={},e!==this&&(h.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=h(e.style?e.ownerDocument:e.document||e),this.window=h(this.document[0].defaultView||this.document[0].parentWindow)),this.options=h.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:h.noop,_create:h.noop,_init:h.noop,destroy:function(){var i=this;this._destroy(),h.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:h.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return h.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=h.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=h(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||h(),i=n.add?(n.element.each(function(t,e){h.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||a._on(h(e),{remove:"_untrackClassesElement"})}),h(h.uniqueSort(i.get().concat(n.element.get())))):h(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=h.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;h.each(s.classesElementLookup,function(t,e){-1!==h.inArray(i.target,e)&&(s.classesElementLookup[t]=h(e.not(i.target).get()))}),this._off(h(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(a,r,t){var l,u=this;"boolean"!=typeof a&&(t=r,r=a,a=!1),t?(r=l=h(r),this.bindings=this.bindings.add(r)):(t=r,r=this.element,l=this.widget()),h.each(t,function(t,e){function i(){if(a||!0!==u.options.disabled&&!h(this).hasClass("ui-state-disabled"))return("string"==typeof e?u[e]:e).apply(u,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||h.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),n=s[1]+u.eventNamespace,o=s[2];o?l.on(n,o,i):r.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=h(this.bindings.not(t).get()),this.focusable=h(this.focusable.not(t).get()),this.hoverable=h(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(h(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(h(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(h(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(h(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=h.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!(h.isFunction(o)&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},h.each({show:"fadeIn",hide:"fadeOut"},function(o,a){h.Widget.prototype["_"+o]=function(e,t,i){var s;"string"==typeof t&&(t={effect:t});var n=t?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})&&(t={duration:t}),s=!h.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&h.effects&&h.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){h(this)[o](),i&&i.call(e[0]),t()})}})});
!function(e){"use strict";var r=function(e,n){var t=/[^\w\-.:]/.test(e)?new Function(r.arg+",tmpl","var _e=tmpl.encode"+r.helper+",_s='"+e.replace(r.regexp,r.func)+"';return _s;"):r.cache[e]=r.cache[e]||r(r.load(e));return n?t(n,r):function(e){return t(e,r)}};r.cache={},r.load=function(e){return document.getElementById(e).innerHTML},r.regexp=/([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,r.func=function(e,n,t,r,c,u){return n?{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[n]||"\\"+n:t?"="===t?"'+_e("+r+")+'":"'+("+r+"==null?'':"+r+")+'":c?"';":u?"_s+='":void 0},r.encReg=/[<>&"'\x00]/g,r.encMap={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#39;"},r.encode=function(e){return(null==e?"":""+e).replace(r.encReg,function(e){return r.encMap[e]||""})},r.arg="o",r.helper=",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}","function"==typeof define&&define.amd?define(function(){return r}):"object"==typeof module&&module.exports?module.exports=r:e.tmpl=r}(this);
!function(l){"use strict";var t=l.URL||l.webkitURL;function c(e){return!!t&&t.createObjectURL(e)}function i(e){return!!t&&t.revokeObjectURL(e)}function f(e,t){!e||"blob:"!==e.slice(0,5)||t&&t.noRevoke||i(e)}function u(e,t,i,a){if(!l.FileReader)return!1;var n=new FileReader;n.onload=function(){t.call(n,this.result)},i&&(n.onabort=n.onerror=function(){i.call(n,this.error)});var r=n[a||"readAsDataURL"];return r?(r.call(n,e),n):void 0}function d(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}function g(o,e,s){function t(i,a){var n,r=document.createElement("img");function t(e,t){i!==a?e instanceof Error?a(e):((t=t||{}).image=e,i(t)):i&&i(e,t)}function e(e,t){t&&l.console&&console.log(t),e&&d("Blob",e)?n=c(o=e):(n=o,s&&s.crossOrigin&&(r.crossOrigin=s.crossOrigin)),r.src=n}return r.onerror=function(e){f(n,s),a&&a.call(r,e)},r.onload=function(){f(n,s);var e={originalWidth:r.naturalWidth||r.width,originalHeight:r.naturalHeight||r.height};try{g.transform(r,s,t,o,e)}catch(e){a&&a(e)}},"string"==typeof o?(g.requiresMetaData(s)?g.fetchBlob(o,e,s):e(),r):d("Blob",o)||d("File",o)?(n=c(o))?(r.src=n,r):u(o,function(e){r.src=e},a):void 0}return l.Promise&&"function"!=typeof e?(s=e,new Promise(t)):t(e,e)}g.requiresMetaData=function(e){return e&&e.meta},g.fetchBlob=function(e,t){t()},g.transform=function(e,t,i,a,n){i(e,n)},g.global=l,g.readFile=u,g.isInstanceOf=d,g.createObjectURL=c,g.revokeObjectURL=i,"function"==typeof define&&define.amd?define(function(){return g}):"object"==typeof module&&module.exports?module.exports=g:l.loadImage=g}("undefined"!=typeof window&&window||this),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image"],e):"object"==typeof module&&module.exports?e(require("./load-image")):e(window.loadImage)}(function(E){"use strict";var r=E.transform;E.createCanvas=function(e,t,i){if(i&&E.global.OffscreenCanvas)return new OffscreenCanvas(e,t);var a=document.createElement("canvas");return a.width=e,a.height=t,a},E.transform=function(e,t,i,a,n){r.call(E,E.scale(e,t,n),t,i,a,n)},E.transformCoordinates=function(){},E.getTransformedOptions=function(e,t){var i,a,n,r,o=t.aspectRatio;if(!o)return t;for(a in i={},t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a]);return i.crop=!0,o<(n=e.naturalWidth||e.width)/(r=e.naturalHeight||e.height)?(i.maxWidth=r*o,i.maxHeight=r):(i.maxWidth=n,i.maxHeight=n/o),i},E.drawImage=function(e,t,i,a,n,r,o,s,l){var c=t.getContext("2d");return!1===l.imageSmoothingEnabled?(c.msImageSmoothingEnabled=!1,c.imageSmoothingEnabled=!1):l.imageSmoothingQuality&&(c.imageSmoothingQuality=l.imageSmoothingQuality),c.drawImage(e,i,a,n,r,0,0,o,s),c},E.requiresCanvas=function(e){return e.canvas||e.crop||!!e.aspectRatio},E.scale=function(e,t,i){t=t||{},i=i||{};var a,n,r,o,s,l,c,f,u,d,g,m,h=e.getContext||E.requiresCanvas(t)&&!!E.global.HTMLCanvasElement,p=e.naturalWidth||e.width,A=e.naturalHeight||e.height,b=p,y=A;function S(){var e=Math.max((r||b)/b,(o||y)/y);1<e&&(b*=e,y*=e)}function v(){var e=Math.min((a||b)/b,(n||y)/y);e<1&&(b*=e,y*=e)}if(h&&(c=(t=E.getTransformedOptions(e,t,i)).left||0,f=t.top||0,t.sourceWidth?(s=t.sourceWidth,void 0!==t.right&&void 0===t.left&&(c=p-s-t.right)):s=p-c-(t.right||0),t.sourceHeight?(l=t.sourceHeight,void 0!==t.bottom&&void 0===t.top&&(f=A-l-t.bottom)):l=A-f-(t.bottom||0),b=s,y=l),a=t.maxWidth,n=t.maxHeight,r=t.minWidth,o=t.minHeight,h&&a&&n&&t.crop?(g=s/l-(b=a)/(y=n))<0?(l=n*s/a,void 0===t.top&&void 0===t.bottom&&(f=(A-l)/2)):0<g&&(s=a*l/n,void 0===t.left&&void 0===t.right&&(c=(p-s)/2)):((t.contain||t.cover)&&(r=a=a||r,o=n=n||o),t.cover?(v(),S()):(S(),v())),h){if(1<(u=t.pixelRatio)&&(!e.style.width||Math.floor(parseFloat(e.style.width,10))!==Math.floor(p/u))&&(b*=u,y*=u),E.orientationCropBug&&!e.getContext&&(c||f||s!==p||l!==A)&&(g=e,e=E.createCanvas(p,A,!0),E.drawImage(g,e,0,0,p,A,p,A,t)),0<(d=t.downsamplingRatio)&&d<1&&b<s&&y<l)for(;b<s*d;)m=E.createCanvas(s*d,l*d,!0),E.drawImage(e,m,c,f,s,l,m.width,m.height,t),f=c=0,s=m.width,l=m.height,e=m;return m=E.createCanvas(b,y),E.transformCoordinates(m,t,i),1<u&&(m.style.width=m.width/u+"px"),E.drawImage(e,m,c,f,s,l,b,y,t).setTransform(1,0,0,1,0,0),m}return e.width=b,e.height=y,e}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image"],e):"object"==typeof module&&module.exports?e(require("./load-image")):e(window.loadImage)}(function(o){"use strict";var s=o.global,l=o.transform,a=s.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),m=s.ArrayBuffer&&ArrayBuffer.prototype.slice||function(e,t){t=t||this.byteLength-e;var i=new Uint8Array(this,e,t),a=new Uint8Array(t);return a.set(i),a.buffer},h={jpeg:{65505:[],65517:[]}};function c(t,e,u,d){var g=this;function i(c,f){if(!(s.DataView&&a&&t&&12<=t.size&&"image/jpeg"===t.type))return c(d);var e=u.maxMetaDataSize||262144;o.readFile(a.call(t,0,e),function(e){var t=new DataView(e);if(65496!==t.getUint16(0))return f(new Error("Invalid JPEG file: Missing JPEG marker."));for(var i,a,n,r,o=2,s=t.byteLength-4,l=o;o<s&&(65504<=(i=t.getUint16(o))&&i<=65519||65534===i);){if(o+(a=t.getUint16(o+2)+2)>t.byteLength){console.log("Invalid JPEG metadata: Invalid segment size.");break}if((n=h.jpeg[i])&&!u.disableMetaDataParsers)for(r=0;r<n.length;r+=1)n[r].call(g,t,o,a,d,u);l=o+=a}!u.disableImageHead&&6<l&&(d.imageHead=m.call(e,0,l)),c(d)},f,"readAsArrayBuffer")||c(d)}return u=u||{},s.Promise&&"function"!=typeof e?(d=u=e||{},new Promise(i)):(d=d||{},i(e,e))}function n(e,t,i){return e&&t&&i?new Blob([i,a.call(e,t.byteLength)],{type:"image/jpeg"}):null}o.transform=function(t,i,a,n,r){o.requiresMetaData(i)?c(n,function(e){e!==r&&(s.console&&console.log(e),e=r),l.call(o,t,i,a,n,e)},i,r=r||{}):l.apply(o,arguments)},o.blobSlice=a,o.bufferSlice=m,o.replaceHead=function(t,i,a){var e={maxMetaDataSize:256,disableMetaDataParsers:!0};if(!a&&s.Promise)return c(t,e).then(function(e){return n(t,e.imageHead,i)});c(t,function(e){a(n(t,e.imageHead,i))},e)},o.parseMetaData=c,o.metaDataParsers=h}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image"],e):"object"==typeof module&&module.exports?e(require("./load-image")):e(window.loadImage)}(function(e){"use strict";var r=e.global;r.fetch&&r.Request&&r.Response&&r.Response.prototype.blob?e.fetchBlob=function(e,t,i){function a(e){return e.blob()}if(r.Promise&&"function"!=typeof t)return fetch(new Request(e,t)).then(a);fetch(new Request(e,i)).then(a).then(t).catch(function(e){t(null,e)})}:r.XMLHttpRequest&&""===(new XMLHttpRequest).responseType&&(e.fetchBlob=function(e,t,n){function i(t,i){n=n||{};var a=new XMLHttpRequest;a.open(n.method||"GET",e),n.headers&&Object.keys(n.headers).forEach(function(e){a.setRequestHeader(e,n.headers[e])}),a.withCredentials="include"===n.credentials,a.responseType="blob",a.onload=function(){t(a.response)},a.onerror=a.onabort=a.ontimeout=function(e){t===i?i(null,e):i(e)},a.send(n.body)}return r.Promise&&"function"!=typeof t?(n=t,new Promise(i)):i(t,t)})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-scale","./load-image-meta"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-scale"),require("./load-image-meta")):e(window.loadImage)}(function(h){"use strict";var t,i,n=h.transform,a=h.requiresCanvas,r=h.requiresMetaData,f=h.transformCoordinates,p=h.getTransformedOptions;function o(e,t){var i=e&&e.orientation;return!0===i&&!h.orientation||1===i&&h.orientation||(!t||h.orientation)&&1<i&&i<9}function A(e,t){return e!==t&&(1===e&&1<t&&t<9||1<e&&e<9)}function b(e,t){if(1<t&&t<9)switch(e){case 2:case 4:return 4<t;case 5:case 7:return t%2==0;case 6:case 8:return 2===t||4===t||5===t||7===t}}(t=h).global.document&&((i=document.createElement("img")).onload=function(){var e;t.orientation=2===i.width&&3===i.height,t.orientation&&((e=t.createCanvas(1,1,!0).getContext("2d")).drawImage(i,1,1,1,1,0,0,1,1),t.orientationCropBug="255,255,255,255"!==e.getImageData(0,0,1,1).data.toString())},i.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k="),h.requiresCanvas=function(e){return o(e)||a.call(h,e)},h.requiresMetaData=function(e){return o(e,!0)||r.call(h,e)},h.transform=function(e,t,r,i,a){n.call(h,e,t,function(e,t){var i,a,n;!t||4<(i=h.orientation&&t.exif&&t.exif.get("Orientation"))&&i<9&&(a=t.originalWidth,n=t.originalHeight,t.originalWidth=n,t.originalHeight=a),r(e,t)},i,a)},h.getTransformedOptions=function(e,t,i){var a=p.call(h,e,t),n=i.exif&&i.exif.get("Orientation"),r=a.orientation,o=h.orientation&&n;if(!0===r&&(r=n),!A(r,o))return a;var s,l,c=a.top,f=a.right,u=a.bottom,d=a.left,g={};for(var m in a)Object.prototype.hasOwnProperty.call(a,m)&&(g[m]=a[m]);if((4<(g.orientation=r)&&!(4<o)||r<5&&4<o)&&(g.maxWidth=a.maxHeight,g.maxHeight=a.maxWidth,g.minWidth=a.minHeight,g.minHeight=a.minWidth,g.sourceWidth=a.sourceHeight,g.sourceHeight=a.sourceWidth),1<o){switch(o){case 2:f=a.left,d=a.right;break;case 3:c=a.bottom,f=a.left,u=a.top,d=a.right;break;case 4:c=a.bottom,u=a.top;break;case 5:c=a.left,f=a.bottom,u=a.right,d=a.top;break;case 6:c=a.left,f=a.top,u=a.right,d=a.bottom;break;case 7:c=a.right,f=a.top,u=a.left,d=a.bottom;break;case 8:c=a.right,f=a.bottom,u=a.left,d=a.top}b(r,o)&&(s=c,l=f,c=u,f=d,u=s,d=l)}switch(g.top=c,g.right=f,g.bottom=u,g.left=d,r){case 2:g.right=d,g.left=f;break;case 3:g.top=u,g.right=d,g.bottom=c,g.left=f;break;case 4:g.top=u,g.bottom=c;break;case 5:g.top=d,g.right=u,g.bottom=f,g.left=c;break;case 6:g.top=f,g.right=u,g.bottom=d,g.left=c;break;case 7:g.top=f,g.right=c,g.bottom=d,g.left=u;break;case 8:g.top=d,g.right=c,g.bottom=f,g.left=u}return g},h.transformCoordinates=function(e,t,i){f.call(h,e,t,i);var a=t.orientation,n=h.orientation&&i.exif&&i.exif.get("Orientation");if(A(a,n)){var r=e.getContext("2d"),o=e.width,s=e.height,l=o,c=s;switch((4<a&&!(4<n)||a<5&&4<n)&&(e.width=s,e.height=o),4<a&&(l=s,c=o),n){case 2:r.translate(l,0),r.scale(-1,1);break;case 3:r.translate(l,c),r.rotate(Math.PI);break;case 4:r.translate(0,c),r.scale(1,-1);break;case 5:r.rotate(-.5*Math.PI),r.scale(-1,1);break;case 6:r.rotate(-.5*Math.PI),r.translate(-l,0);break;case 7:r.rotate(-.5*Math.PI),r.translate(-l,c),r.scale(1,-1);break;case 8:r.rotate(.5*Math.PI),r.translate(0,-c)}switch(b(a,n)&&(r.translate(l,c),r.rotate(Math.PI)),a){case 2:r.translate(o,0),r.scale(-1,1);break;case 3:r.translate(o,s),r.rotate(Math.PI);break;case 4:r.translate(0,s),r.scale(1,-1);break;case 5:r.rotate(.5*Math.PI),r.scale(1,-1);break;case 6:r.rotate(.5*Math.PI),r.translate(0,-s);break;case 7:r.rotate(.5*Math.PI),r.translate(o,-s),r.scale(-1,1);break;case 8:r.rotate(-.5*Math.PI),r.translate(-o,0)}}}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-meta"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-meta")):e(window.loadImage)}(function(r){"use strict";function h(e){e&&(Object.defineProperty(this,"map",{value:this.ifds[e].map}),Object.defineProperty(this,"tags",{value:this.tags&&this.tags[e]||{}}))}h.prototype.ifds={ifd1:{name:"Thumbnail",map:h.prototype.map={Orientation:274,Thumbnail:"ifd1",Blob:513,Exif:34665,GPSInfo:34853,Interoperability:40965}},34665:{name:"Exif",map:{}},34853:{name:"GPSInfo",map:{}},40965:{name:"Interoperability",map:{}}},h.prototype.get=function(e){return this[e]||this[this.map[e]]};var m={1:{getValue:function(e,t){return e.getUint8(t)},size:1},2:{getValue:function(e,t){return String.fromCharCode(e.getUint8(t))},size:1,ascii:!0},3:{getValue:function(e,t,i){return e.getUint16(t,i)},size:2},4:{getValue:function(e,t,i){return e.getUint32(t,i)},size:4},5:{getValue:function(e,t,i){return e.getUint32(t,i)/e.getUint32(t+4,i)},size:8},9:{getValue:function(e,t,i){return e.getInt32(t,i)},size:4},10:{getValue:function(e,t,i){return e.getInt32(t,i)/e.getInt32(t+4,i)},size:8}};function p(e,t,i){return(!e||e[i])&&(!t||!0!==t[i])}function A(e,t,i,a,n,r,o,s){var l,c,f,u,d,g;if(i+6>e.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((c=i+2+12*(l=e.getUint16(i,a)))+4>e.byteLength)){for(f=0;f<l;f+=1)u=i+2+12*f,p(o,s,d=e.getUint16(u,a))&&(g=function(e,t,i,a,n,r){var o,s,l,c,f,u,d=m[a];if(d){if(!((s=4<(o=d.size*n)?t+e.getUint32(i+8,r):i+8)+o>e.byteLength)){if(1===n)return d.getValue(e,s,r);for(l=[],c=0;c<n;c+=1)l[c]=d.getValue(e,s+c*d.size,r);if(d.ascii){for(f="",c=0;c<l.length&&"\0"!==(u=l[c]);c+=1)f+=u;return f}return l}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")}(e,t,u,e.getUint16(u+2,a),e.getUint32(u+4,a),a),n[d]=g,r&&(r[d]=u));return e.getUint32(c,a)}console.log("Invalid Exif data: Invalid directory size.")}}m[7]=m[1],r.parseExifData=function(c,e,t,f,i){if(!i.disableExif){var u,a,n,d=i.includeExifTags,g=i.excludeExifTags||{34665:{37500:!0}},m=e+10;if(1165519206===c.getUint32(e+4))if(m+8>c.byteLength)console.log("Invalid Exif data: Invalid segment size.");else if(0===c.getUint16(e+8)){switch(c.getUint16(m)){case 18761:u=!0;break;case 19789:u=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}42===c.getUint16(m+2,u)?(a=c.getUint32(m+4,u),f.exif=new h,i.disableExifOffsets||(f.exifOffsets=new h,f.exifTiffOffset=m,f.exifLittleEndian=u),(a=A(c,m,m+a,u,f.exif,f.exifOffsets,d,g))&&p(d,g,"ifd1")&&(f.exif.ifd1=a,f.exifOffsets&&(f.exifOffsets.ifd1=m+a)),Object.keys(f.exif.ifds).forEach(function(e){var t,i,a=e,n=c,r=m,o=u,s=d,l=g;(i=(t=f).exif[a])&&(t.exif[a]=new h(a),t.exifOffsets&&(t.exifOffsets[a]=new h(a)),A(n,r,r+i,o,t.exif[a],t.exifOffsets&&t.exifOffsets[a],s&&s[a],l&&l[a]))}),(n=f.exif.ifd1)&&n[513]&&(n[513]=function(e,t){if(t){if(!(e+t>c.byteLength))return new Blob([r.bufferSlice.call(c.buffer,e,e+t)],{type:"image/jpeg"});console.log("Invalid Exif data: Invalid thumbnail data.")}}(m+n[513],n[514]))):console.log("Invalid Exif data: Missing TIFF marker.")}else console.log("Invalid Exif data: Missing byte alignment offset.")}},r.metaDataParsers.jpeg[65505].push(r.parseExifData),r.exifWriters={274:function(e,t,i){var a=t.exifOffsets[274];return a&&new DataView(e,a+8,2).setUint16(0,i,t.exifLittleEndian),e}},r.writeExifData=function(e,t,i,a){r.exifWriters[t.exif.map[i]](e,t,a)},r.ExifMap=h}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-exif"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-exif")):e(window.loadImage)}(function(e){"use strict";var n=e.ExifMap.prototype;n.tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",34665:{36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},34853:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},40965:{1:"InteroperabilityIndex"}},n.tags.ifd1=n.tags,n.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"Original",2:"Horizontal flip",3:"Rotate 180° CCW",4:"Vertical flip",5:"Vertical flip + Rotate 90° CW",6:"Rotate 90° CW",7:"Horizontal flip + Rotate 90° CW",8:"Rotate 90° CCW"}},n.getText=function(e){var t=this.get(e);switch(e){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[e][t];case"ExifVersion":case"FlashpixVersion":if(!t)return;return String.fromCharCode(t[0],t[1],t[2],t[3]);case"ComponentsConfiguration":if(!t)return;return this.stringValues[e][t[0]]+this.stringValues[e][t[1]]+this.stringValues[e][t[2]]+this.stringValues[e][t[3]];case"GPSVersionID":if(!t)return;return t[0]+"."+t[1]+"."+t[2]+"."+t[3]}return String(t)},n.getAll=function(){var e,t,i,a={};for(e in this)Object.prototype.hasOwnProperty.call(this,e)&&((t=this[e])&&t.getAll?a[this.ifds[e].name]=t.getAll():(i=this.tags[e])&&(a[i]=this.getText(i)));return a},n.getName=function(e){var t=this.tags[e];return"object"==typeof t?this.ifds[e].name:t},function(){var e,t,i,a=n.tags;for(e in a)if(Object.prototype.hasOwnProperty.call(a,e))if(t=n.ifds[e])for(e in i=a[e])Object.prototype.hasOwnProperty.call(i,e)&&(t.map[i[e]]=Number(e));else n.map[a[e]]=Number(e)}()}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-meta"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-meta")):e(window.loadImage)}(function(e){"use strict";function d(){}function g(e,t,i,a,n,r){for(var o,s,l,c,f,u,d,g,m,h,p=t+i,A=t;A<p;)28===e.getUint8(A)&&2===e.getUint8(A+1)&&(l=e.getUint8(A+2),n&&!n[l]||r&&r[l]||(s=e.getInt16(A+3),u=l,d=a.iptc,g=e,m=A+5,h=s,o="binary"===d.types[u]?new Blob([g.buffer.slice(m,m+h)]):"Uint16"===d.types[u]?g.getUint16(m):function(e){for(var t="",i=m+h,a=m;a<i;a+=1)t+=String.fromCharCode(e.getUint8(a));return t}(g),a.iptc[l]=(f=o,void 0===(c=a.iptc[l])?f:c instanceof Array?(c.push(f),c):[c,f]),a.iptcOffsets&&(a.iptcOffsets[l]=A))),A+=1}d.prototype.map={ObjectName:5},d.prototype.types={0:"Uint16",200:"Uint16",201:"Uint16",202:"binary"},d.prototype.get=function(e){return this[e]||this[this.map[e]]},e.parseIptcData=function(e,t,i,a,n){if(!n.disableIptc)for(var r,o,s,l=t+i;t+8<l;){if(s=t,943868237===(o=e).getUint32(s)&&1028===o.getUint16(s+4)){var c=(r=void 0,(r=e.getUint8(t+7))%2!=0&&(r+=1),0===r&&(r=4),r),f=t+8+c;if(l<f){console.log("Invalid IPTC data: Invalid segment offset.");break}var u=e.getUint16(t+6+c);if(l<t+u){console.log("Invalid IPTC data: Invalid segment size.");break}return a.iptc=new d,n.disableIptcOffsets||(a.iptcOffsets=new d),void g(e,f,u,a,n.includeIptcTags,n.excludeIptcTags||{202:!0})}t+=1}},e.metaDataParsers.jpeg[65517].push(e.parseIptcData),e.IptcMap=d}),function(e){"use strict";"function"==typeof define&&define.amd?define(["./load-image","./load-image-iptc"],e):"object"==typeof module&&module.exports?e(require("./load-image"),require("./load-image-iptc")):e(window.loadImage)}(function(e){"use strict";var a=e.IptcMap.prototype;a.tags={0:"ApplicationRecordVersion",3:"ObjectTypeReference",4:"ObjectAttributeReference",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectReference",15:"Category",20:"SupplementalCategories",22:"FixtureIdentifier",25:"Keywords",26:"ContentLocationCode",27:"ContentLocationName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"ReferenceService",47:"ReferenceDate",50:"ReferenceNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"Country",103:"OriginalTransmissionReference",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",121:"LocalCaption",122:"Writer",125:"RasterizedCaption",130:"ImageType",131:"ImageOrientation",135:"LanguageIdentifier",150:"AudioType",151:"AudioSamplingRate",152:"AudioSamplingResolution",153:"AudioDuration",154:"AudioOutcue",184:"JobID",185:"MasterDocumentID",186:"ShortDocumentID",187:"UniqueDocumentID",188:"OwnerID",200:"ObjectPreviewFileFormat",201:"ObjectPreviewFileVersion",202:"ObjectPreviewData",221:"Prefs",225:"ClassifyState",228:"SimilarityIndex",230:"DocumentNotes",231:"DocumentHistory",232:"ExifCameraInfo",255:"CatalogSets"},a.stringValues={10:{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"},75:{a:"Morning",b:"Both Morning and Evening",p:"Evening"},131:{L:"Landscape",P:"Portrait",S:"Square"}},a.getText=function(e){var t=this.get(e),i=this.map[e],a=this.stringValues[i];return a?a[t]:String(t)},a.getAll=function(){var e,t,i={};for(e in this)Object.prototype.hasOwnProperty.call(this,e)&&(t=this.tags[e])&&(i[t]=this.getText(t));return i},a.getName=function(e){return this.tags[e]},function(){var e,t=a.tags,i=a.map||{};for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(i[t[e]]=Number(e))}()});
!function(t){"use strict";var a=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,b=t.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),f=b&&t.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),B=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,s=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,r=(b||B)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(t){var e,o,n,a,r,i,l,u,c=t.match(s);if(!c)throw new Error("invalid data URI");for(e=c[2]?c[1]:"text/plain"+(c[3]||";charset=US-ASCII"),o=!!c[4],n=t.slice(c[0].length),a=(o?atob:decodeURIComponent)(n),r=new ArrayBuffer(a.length),i=new Uint8Array(r),l=0;l<a.length;l+=1)i[l]=a.charCodeAt(l);return b?new Blob([f?i:r],{type:e}):((u=new B).append(r),u.getBlob(e))};t.HTMLCanvasElement&&!a.toBlob&&(a.mozGetAsFile?a.toBlob=function(t,e,o){var n=this;setTimeout(function(){o&&a.toDataURL&&r?t(r(n.toDataURL(e,o))):t(n.mozGetAsFile("blob",e))})}:a.toDataURL&&r&&(a.msToBlob?a.toBlob=function(t,e,o){var n=this;setTimeout(function(){(e&&"image/png"!==e||o)&&a.toDataURL&&r?t(r(n.toDataURL(e,o))):t(n.msToBlob(e))})}:a.toBlob=function(t,e,o){var n=this;setTimeout(function(){t(r(n.toDataURL(e,o)))})})),"function"==typeof define&&define.amd?define(function(){return r}):"object"==typeof module&&module.exports?module.exports=r:t.dataURLtoBlob=r}(window);
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery)}(function(f){"use strict";var n=0,t=f,r="parseJSON";"JSON"in window&&"parse"in JSON&&(t=JSON,r="parse"),f.ajaxTransport("iframe",function(a){if(a.async){var o,i,t,p=a.initialIframeSrc||"javascript:false;";return{send:function(e,r){(o=f('<form style="display:none;"></form>')).attr("accept-charset",a.formAcceptCharset),t=/\?/.test(a.url)?"&":"?","DELETE"===a.type?(a.url=a.url+t+"_method=DELETE",a.type="POST"):"PUT"===a.type?(a.url=a.url+t+"_method=PUT",a.type="POST"):"PATCH"===a.type&&(a.url=a.url+t+"_method=PATCH",a.type="POST"),i=f('<iframe src="'+p+'" name="iframe-transport-'+(n+=1)+'"></iframe>').on("load",function(){var n,t=f.isArray(a.paramName)?a.paramName:[a.paramName];i.off("load").on("load",function(){var t;try{if(!(t=i.contents()).length||!t[0].firstChild)throw new Error}catch(e){t=void 0}r(200,"success",{iframe:t}),f('<iframe src="'+p+'"></iframe>').appendTo(o),window.setTimeout(function(){o.remove()},0)}),o.prop("target",i.prop("name")).prop("action",a.url).prop("method",a.type),a.formData&&f.each(a.formData,function(e,t){f('<input type="hidden"/>').prop("name",t.name).val(t.value).appendTo(o)}),a.fileInput&&a.fileInput.length&&"POST"===a.type&&(n=a.fileInput.clone(),a.fileInput.after(function(e){return n[e]}),a.paramName&&a.fileInput.each(function(e){f(this).prop("name",t[e]||a.paramName)}),o.append(a.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),a.fileInput.removeAttr("form")),window.setTimeout(function(){o.submit(),n&&n.length&&a.fileInput.each(function(e,t){var r=f(n[e]);f(t).prop("name",r.prop("name")).attr("form",r.attr("form")),r.replaceWith(t)})},0)}),o.append(i).appendTo(document.body)},abort:function(){i&&i.off("load").prop("src",p),o&&o.remove()}}}}),f.ajaxSetup({converters:{"iframe text":function(e){return e&&f(e[0].body).text()},"iframe json":function(e){return e&&t[r](f(e[0].body).text())},"iframe html":function(e){return e&&f(e[0].body).html()},"iframe xml":function(e){var t=e&&e[0];return t&&f.isXMLDoc(t)?t:f.parseXML(t.XMLDocument&&t.XMLDocument.xml||f(t.body).html())},"iframe script":function(e){return e&&f.globalEval(f(e[0].body).text())}}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],e):"object"==typeof exports?e(require("jquery"),require("./vendor/jquery.ui.widget")):e(window.jQuery)}(function(m){"use strict";function e(i){var r="dragover"===i;return function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var t=e.dataTransfer;t&&-1!==m.inArray("Files",t.types)&&!1!==this._trigger(i,m.Event(i,{delegatedEvent:e}))&&(e.preventDefault(),r&&(t.dropEffect="copy"))}}var t;m.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||m('<input type="file"/>').prop("disabled")),m.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),m.support.xhrFormDataFileUpload=!!window.FormData,m.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),m.widget("blueimp.fileupload",{options:{dropZone:m(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,uniqueFilenames:void 0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(i,e){return i=this.messages[i]||i.toString(),e&&m.each(e,function(e,t){i=i.replace("{"+e+"}",t)}),i},formData:function(e){return e.serializeArray()},add:function(e,t){if(e.isDefaultPrevented())return!1;(t.autoUpload||!1!==t.autoUpload&&m(this).fileupload("option","autoUpload"))&&t.process().done(function(){t.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_promisePipe:(t=m.fn.jquery.split("."),1<Number(t[0])||7<Number(t[1])?"then":"pipe"),_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:m.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,i){var r=e-this.timestamp;return this.bitrate&&i&&!(i<r)||(this.bitrate=(t-this.loaded)*(1e3/r)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&m.support.xhrFileUpload||m.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===m.type(e.formData)?e.formData(e.form):m.isArray(e.formData)?e.formData:"object"===m.type(e.formData)?(i=[],m.each(e.formData,function(e,t){i.push({name:e,value:t})}),i):[]},_getTotal:function(e){var i=0;return m.each(e,function(e,t){i+=t.size||1}),i},_initProgressObject:function(e){var t={loaded:0,total:0,bitrate:0};e._progress?m.extend(e._progress,t):e._progress=t},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)Object.prototype.hasOwnProperty.call(e._response,t)&&delete e._response[t];else e._response={}},_onProgress:function(e,t){if(e.lengthComputable){var i,r=Date.now?Date.now():(new Date).getTime();if(t._time&&t.progressInterval&&r-t._time<t.progressInterval&&e.loaded!==e.total)return;t._time=r,i=Math.floor(e.loaded/e.total*(t.chunkSize||t._progress.total))+(t.uploadedBytes||0),this._progress.loaded+=i-t._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(r,this._progress.loaded,t.bitrateInterval),t._progress.loaded=t.loaded=i,t._progress.bitrate=t.bitrate=t._bitrateTimer.getBitrate(r,i,t.bitrateInterval),this._trigger("progress",m.Event("progress",{delegatedEvent:e}),t),this._trigger("progressall",m.Event("progressall",{delegatedEvent:e}),this._progress)}},_initProgressListener:function(i){var r=this,e=i.xhr?i.xhr():m.ajaxSettings.xhr();e.upload&&(m(e.upload).on("progress",function(e){var t=e.originalEvent;e.lengthComputable=t.lengthComputable,e.loaded=t.loaded,e.total=t.total,r._onProgress(e,i)}),i.xhr=function(){return e})},_deinitProgressListener:function(e){var t=e.xhr?e.xhr():m.ajaxSettings.xhr();t.upload&&m(t.upload).off("progress")},_isInstanceOf:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},_getUniqueFilename:function(e,t){return t[e=String(e)]?(e=e.replace(/(?: \(([\d]+)\))?(\.[^.]+)?$/,function(e,t,i){return" ("+(t?Number(t)+1:1)+")"+(i||"")}),this._getUniqueFilename(e,t)):(t[e]=!0,e)},_initXHRData:function(r){var n,o=this,e=r.files[0],t=r.multipart||!m.support.xhrFileUpload,s="array"===m.type(r.paramName)?r.paramName[0]:r.paramName;r.headers=m.extend({},r.headers),r.contentRange&&(r.headers["Content-Range"]=r.contentRange),t&&!r.blob&&this._isInstanceOf("File",e)||(r.headers["Content-Disposition"]='attachment; filename="'+encodeURI(e.uploadName||e.name)+'"'),t?m.support.xhrFormDataFileUpload&&(r.postMessage?(n=this._getFormData(r),r.blob?n.push({name:s,value:r.blob}):m.each(r.files,function(e,t){n.push({name:"array"===m.type(r.paramName)&&r.paramName[e]||s,value:t})})):(o._isInstanceOf("FormData",r.formData)?n=r.formData:(n=new FormData,m.each(this._getFormData(r),function(e,t){n.append(t.name,t.value)})),r.blob?n.append(s,r.blob,e.uploadName||e.name):m.each(r.files,function(e,t){var i;(o._isInstanceOf("File",t)||o._isInstanceOf("Blob",t))&&(i=t.uploadName||t.name,r.uniqueFilenames&&(i=o._getUniqueFilename(i,r.uniqueFilenames)),n.append("array"===m.type(r.paramName)&&r.paramName[e]||s,t,i))})),r.data=n):(r.contentType=e.type||"application/octet-stream",r.data=r.blob||e),r.blob=null},_initIframeSettings:function(e){var t=m("<a></a>").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&t&&t!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(e){var t=m(e.fileInput),r=e.paramName;return r?m.isArray(r)||(r=[r]):(r=[],t.each(function(){for(var e=m(this),t=e.prop("name")||"files[]",i=(e.prop("files")||[1]).length;i;)r.push(t),--i}),r.length||(r=[t.prop("name")||"files[]"])),r},_initFormSettings:function(e){e.form&&e.form.length||(e.form=m(e.fileInput.prop("form")),e.form.length||(e.form=m(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===m.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var t=m.extend({},this.options,e);return this._initFormSettings(t),this._initDataSettings(t),t},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(e,t,i){var r=m.Deferred(),n=r.promise();return t=t||this.options.context||n,!0===e?r.resolveWith(t,i):!1===e&&r.rejectWith(t,i),n.abort=r.promise,this._enhancePromise(n)},_addConvenienceMethods:function(e,i){function r(e){return m.Deferred().resolveWith(n,e).promise()}var n=this;i.process=function(e,t){return(e||t)&&(i._processQueue=this._processQueue=(this._processQueue||r([this]))[n._promisePipe](function(){return i.errorThrown?m.Deferred().rejectWith(n,[i]).promise():r(arguments)})[n._promisePipe](e,t)),this._processQueue||r([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",m.Event("submit",{delegatedEvent:e}),this)&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),i=t&&t.split("-"),r=i&&1<i.length&&parseInt(i[1],10);return r&&r+1},_chunkedUpload:function(o,e){o.uploadedBytes=o.uploadedBytes||0;var t,s,a=this,i=o.files[0],l=i.size,p=o.uploadedBytes,u=o.maxChunkSize||l,d=this._blobSlice,h=m.Deferred(),r=h.promise();return!(!(this._isXHRUpload(o)&&d&&(p||("function"===m.type(u)?u(o):u)<l))||o.data)&&(!!e||(l<=p?(i.error=o.i18n("uploadedBytes"),this._getXHRPromise(!1,o.context,[null,"error",i.error])):(s=function(){var r=m.extend({},o),n=r._progress.loaded;r.blob=d.call(i,p,p+("function"===m.type(u)?u(r):u),i.type),r.chunkSize=r.blob.size,r.contentRange="bytes "+p+"-"+(p+r.chunkSize-1)+"/"+l,a._trigger("chunkbeforesend",null,r),a._initXHRData(r),a._initProgressListener(r),t=(!1!==a._trigger("chunksend",null,r)&&m.ajax(r)||a._getXHRPromise(!1,r.context)).done(function(e,t,i){p=a._getUploadedBytes(i)||p+r.chunkSize,n+r.chunkSize-r._progress.loaded&&a._onProgress(m.Event("progress",{lengthComputable:!0,loaded:p-r.uploadedBytes,total:p-r.uploadedBytes}),r),o.uploadedBytes=r.uploadedBytes=p,r.result=e,r.textStatus=t,r.jqXHR=i,a._trigger("chunkdone",null,r),a._trigger("chunkalways",null,r),p<l?s():h.resolveWith(r.context,[e,t,i])}).fail(function(e,t,i){r.jqXHR=e,r.textStatus=t,r.errorThrown=i,a._trigger("chunkfail",null,r),a._trigger("chunkalways",null,r),h.rejectWith(r.context,[e,t,i])}).always(function(){a._deinitProgressListener(r)})},this._enhancePromise(r),r.abort=function(){return t.abort()},s(),r)))},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(e,t,i,r){var n=r._progress.total,o=r._response;r._progress.loaded<n&&this._onProgress(m.Event("progress",{lengthComputable:!0,loaded:n,total:n}),r),o.result=r.result=e,o.textStatus=r.textStatus=t,o.jqXHR=r.jqXHR=i,this._trigger("done",null,r)},_onFail:function(e,t,i,r){var n=r._response;r.recalculateProgress&&(this._progress.loaded-=r._progress.loaded,this._progress.total-=r._progress.total),n.jqXHR=r.jqXHR=e,n.textStatus=r.textStatus=t,n.errorThrown=r.errorThrown=i,this._trigger("fail",null,r)},_onAlways:function(e,t,i,r){this._trigger("always",null,r)},_onSend:function(e,t){t.submit||this._addConvenienceMethods(e,t);function i(){return a._sending+=1,l._bitrateTimer=new a._BitrateTimer,r=r||((n||!1===a._trigger("send",m.Event("send",{delegatedEvent:e}),l))&&a._getXHRPromise(!1,l.context,n)||a._chunkedUpload(l)||m.ajax(l)).done(function(e,t,i){a._onDone(e,t,i,l)}).fail(function(e,t,i){a._onFail(e,t,i,l)}).always(function(e,t,i){if(a._deinitProgressListener(l),a._onAlways(e,t,i,l),--a._sending,--a._active,l.limitConcurrentUploads&&l.limitConcurrentUploads>a._sending)for(var r=a._slots.shift();r;){if("pending"===a._getDeferredState(r)){r.resolve();break}r=a._slots.shift()}0===a._active&&a._trigger("stop")})}var r,n,o,s,a=this,l=a._getAJAXSettings(t);return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?((s=1<this.options.limitConcurrentUploads?(o=m.Deferred(),this._slots.push(o),o[a._promisePipe](i)):(this._sequence=this._sequence[a._promisePipe](i,i),this._sequence)).abort=function(){return n=[void 0,"abort","abort"],r?r.abort():(o&&o.rejectWith(l.context,n),i())},this._enhancePromise(s)):i()},_onAdd:function(r,n){var o,e,s,t,a=this,l=!0,i=m.extend({},this.options,n),p=n.files,u=p.length,d=i.limitMultiFileUploads,h=i.limitMultiFileUploadSize,c=i.limitMultiFileUploadSizeOverhead,f=0,g=this._getParamName(i),_=0;if(!u)return!1;if(h&&void 0===p[0].size&&(h=void 0),(i.singleFileUploads||d||h)&&this._isXHRUpload(i))if(i.singleFileUploads||h||!d)if(!i.singleFileUploads&&h)for(s=[],o=[],t=0;t<u;t+=1)f+=p[t].size+c,(t+1===u||f+p[t+1].size+c>h||d&&d<=t+1-_)&&(s.push(p.slice(_,t+1)),(e=g.slice(_,t+1)).length||(e=g),o.push(e),_=t+1,f=0);else o=g;else for(s=[],o=[],t=0;t<u;t+=d)s.push(p.slice(t,t+d)),(e=g.slice(t,t+d)).length||(e=g),o.push(e);else s=[p],o=[g];return n.originalFiles=p,m.each(s||p,function(e,t){var i=m.extend({},n);return i.files=s?t:[t],i.paramName=o[e],a._initResponseObject(i),a._initProgressObject(i),a._addConvenienceMethods(r,i),l=a._trigger("add",m.Event("add",{delegatedEvent:r}),i)}),l},_replaceFileInput:function(e){var i=e.fileInput,r=i.clone(!0),t=i.is(document.activeElement);e.fileInputClone=r,m("<form></form>").append(r)[0].reset(),i.after(r).detach(),t&&r.trigger("focus"),m.cleanData(i.off("remove")),this.options.fileInput=this.options.fileInput.map(function(e,t){return t===i[0]?r[0]:t}),i[0]===this.element[0]&&(this.element=r)},_handleFileTreeEntry:function(i,r){function n(e){e&&!e.entry&&(e.entry=i),s.resolve([e])}var e,o=this,s=m.Deferred(),a=[],l=function(){e.readEntries(function(e){var t;e.length?(a=a.concat(e),l()):(t=a,o._handleFileTreeEntries(t,r+i.name+"/").done(function(e){s.resolve(e)}).fail(n))},n)};return r=r||"",i.isFile?i._file?(i._file.relativePath=r,s.resolve(i._file)):i.file(function(e){e.relativePath=r,s.resolve(e)},n):i.isDirectory?(e=i.createReader(),l()):s.resolve([]),s.promise()},_handleFileTreeEntries:function(e,t){var i=this;return m.when.apply(m,m.map(e,function(e){return i._handleFileTreeEntry(e,t)}))[this._promisePipe](function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){var t=(e=e||{}).items;return t&&t.length&&(t[0].webkitGetAsEntry||t[0].getAsEntry)?this._handleFileTreeEntries(m.map(t,function(e){var t;return e.webkitGetAsEntry?((t=e.webkitGetAsEntry())&&(t._file=e.getAsFile()),t):e.getAsEntry()})):m.Deferred().resolve(m.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){var t,i,r=(e=m(e)).prop("webkitEntries")||e.prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if((t=m.makeArray(e.prop("files"))).length)void 0===t[0].name&&t[0].fileName&&m.each(t,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(!(i=e.prop("value")))return m.Deferred().resolve([]).promise();t=[{name:i.replace(/^.*\\/,"")}]}return m.Deferred().resolve(t).promise()},_getFileInputFiles:function(e){return e instanceof m&&1!==e.length?m.when.apply(m,m.map(e,this._getSingleFileInputFiles))[this._promisePipe](function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(t){var i=this,r={fileInput:m(t.target),form:m(t.target.form)};this._getFileInputFiles(r.fileInput).always(function(e){r.files=e,i.options.replaceFileInput&&i._replaceFileInput(r),!1!==i._trigger("change",m.Event("change",{delegatedEvent:t}),r)&&i._onAdd(t,r)})},_onPaste:function(e){var t=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,r={files:[]};t&&t.length&&(m.each(t,function(e,t){var i=t.getAsFile&&t.getAsFile();i&&r.files.push(i)}),!1!==this._trigger("paste",m.Event("paste",{delegatedEvent:e}),r)&&this._onAdd(e,r))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var i=this,e=t.dataTransfer,r={};e&&e.files&&e.files.length&&(t.preventDefault(),this._getDroppedFiles(e).always(function(e){r.files=e,!1!==i._trigger("drop",m.Event("drop",{delegatedEvent:t}),r)&&i._onAdd(t,r)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),m.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,t){var i=-1!==m.inArray(e,this._specialOptions);i&&this._destroyEventHandlers(),this._super(e,t),i&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof m||(e.fileInput=m(e.fileInput)),e.dropZone instanceof m||(e.dropZone=m(e.dropZone)),e.pasteZone instanceof m||(e.pasteZone=m(e.pasteZone))},_getRegExp:function(e){var t=e.split("/"),i=t.pop();return t.shift(),new RegExp(t.join("/"),i)},_isRegExpOption:function(e,t){return"url"!==e&&"string"===m.type(t)&&/^\/.*\/[igm]{0,3}$/.test(t)},_initDataAttributes:function(){var n=this,o=this.options,s=this.element.data();m.each(this.element[0].attributes,function(e,t){var i,r=t.name.toLowerCase();/^data-/.test(r)&&(r=r.slice(5).replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()}),i=s[r],n._isRegExpOption(r,i)&&(i=n._getRegExp(i)),o[r]=i)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var i=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,i._onAdd(null,t)}):(t.files=m.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var i,r,n=this,o=m.Deferred(),e=o.promise();return e.abort=function(){return r=!0,i?i.abort():(o.reject(null,"abort","abort"),e)},this._getFileInputFiles(t.fileInput).always(function(e){r||(e.length?(t.files=e,(i=n._onSend(null,t)).then(function(e,t,i){o.resolve(e,t,i)},function(e,t,i){o.reject(e,t,i)})):o.reject())}),this._enhancePromise(e)}if(t.files=m.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload"],e):"object"==typeof exports?e(require("jquery"),require("./jquery.fileupload")):e(window.jQuery)}(function(n){"use strict";var i=n.blueimp.fileupload.prototype.options.add;n.widget("blueimp.fileupload",n.blueimp.fileupload,{options:{processQueue:[],add:function(e,r){var s=n(this);r.process(function(){return s.fileupload("process",r)}),i.call(this,e,r)}},processActions:{},_processFile:function(e,i){var o=this,t=n.Deferred().resolveWith(o,[e]).promise();return this._trigger("process",null,e),n.each(e.processQueue,function(e,r){function s(e){return i.errorThrown?n.Deferred().rejectWith(o,[i]).promise():o.processActions[r.action].call(o,e,r)}t=t[o._promisePipe](s,r.always&&s)}),t.done(function(){o._trigger("processdone",null,e),o._trigger("processalways",null,e)}).fail(function(){o._trigger("processfail",null,e),o._trigger("processalways",null,e)}),t},_transformProcessQueue:function(o){var r=[];n.each(o.processQueue,function(){var s={},e=this.action,i=!0===this.prefix?e:this.prefix;n.each(this,function(e,r){"string"===n.type(r)&&"@"===r.charAt(0)?s[e]=o[r.slice(1)||(i?i+e.charAt(0).toUpperCase()+e.slice(1):e)]:s[e]=r}),r.push(s)}),o.processQueue=r},processing:function(){return this._processing},process:function(i){var o=this,t=n.extend({},this.options,i);return t.processQueue&&t.processQueue.length&&(this._transformProcessQueue(t),0===this._processing&&this._trigger("processstart"),n.each(i.files,function(e){function r(){return i.errorThrown?n.Deferred().rejectWith(o,[i]).promise():o._processFile(s,i)}var s=e?n.extend({},t):t;s.index=e,o._processing+=1,o._processingQueue=o._processingQueue[o._promisePipe](r,r).always(function(){--o._processing,0===o._processing&&o._trigger("processstop")})})),this._processingQueue},_create:function(){this._super(),this._processing=0,this._processingQueue=n.Deferred().resolveWith(this).promise()}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","load-image","load-image-meta","load-image-scale","load-image-exif","load-image-orientation","canvas-to-blob","./jquery.fileupload-process"],e):"object"==typeof exports?e(require("jquery"),require("blueimp-load-image/js/load-image"),require("blueimp-load-image/js/load-image-meta"),require("blueimp-load-image/js/load-image-scale"),require("blueimp-load-image/js/load-image-exif"),require("blueimp-load-image/js/load-image-orientation"),require("blueimp-canvas-to-blob"),require("./jquery.fileupload-process")):e(window.jQuery,window.loadImage)}(function(l,d){"use strict";l.blueimp.fileupload.prototype.options.processQueue.unshift({action:"loadImageMetaData",maxMetaDataSize:"@",disableImageHead:"@",disableMetaDataParsers:"@",disableExif:"@",disableExifThumbnail:"@",disableExifOffsets:"@",includeExifTags:"@",excludeExifTags:"@",disableIptc:"@",disableIptcOffsets:"@",includeIptcTags:"@",excludeIptcTags:"@",disabled:"@disableImageMetaDataLoad"},{action:"loadImage",prefix:!0,fileTypes:"@",maxFileSize:"@",noRevoke:"@",disabled:"@disableImageLoad"},{action:"resizeImage",prefix:"image",maxWidth:"@",maxHeight:"@",minWidth:"@",minHeight:"@",crop:"@",orientation:"@",forceResize:"@",disabled:"@disableImageResize"},{action:"saveImage",quality:"@imageQuality",type:"@imageType",disabled:"@disableImageResize"},{action:"saveImageMetaData",disabled:"@disableImageMetaDataSave"},{action:"resizeImage",prefix:"preview",maxWidth:"@",maxHeight:"@",minWidth:"@",minHeight:"@",crop:"@",orientation:"@",thumbnail:"@",canvas:"@",disabled:"@disableImagePreview"},{action:"setImage",name:"@imagePreviewName",disabled:"@disableImagePreview"},{action:"deleteImageReferences",disabled:"@disableImageReferencesDeletion"}),l.widget("blueimp.fileupload",l.blueimp.fileupload,{options:{loadImageFileTypes:/^image\/(gif|jpeg|png|svg\+xml)$/,loadImageMaxFileSize:1e7,imageMaxWidth:1920,imageMaxHeight:1080,imageOrientation:!0,imageCrop:!1,disableImageResize:!0,previewMaxWidth:80,previewMaxHeight:80,previewOrientation:!0,previewThumbnail:!0,previewCrop:!1,previewCanvas:!0},processActions:{loadImage:function(i,e){if(e.disabled)return i;var a=this,t=i.files[i.index],n=l.Deferred();return"number"===l.type(e.maxFileSize)&&t.size>e.maxFileSize||e.fileTypes&&!e.fileTypes.test(t.type)||!d(t,function(e){e.src&&(i.img=e),n.resolveWith(a,[i])},e)?i:n.promise()},resizeImage:function(i,a){if(a.disabled||!i.canvas&&!i.img)return i;a=l.extend({canvas:!0},a);function e(e){e&&(e.width!==s.width||e.height!==s.height||a.forceResize)&&(i[e.getContext?"canvas":"img"]=e),i.preview=e,o.resolveWith(r,[i])}var t,n,r=this,o=l.Deferred(),s=a.canvas&&i.canvas||i.img;if(i.exif){if(!0===a.orientation&&(a.orientation=i.exif.get("Orientation")),a.thumbnail&&(n=(t=i.exif.get("Thumbnail"))&&t.get("Blob")))return d(n,e,a),o.promise();d.orientation&&(i.orientation=i.orientation||a.orientation),i.orientation?delete a.orientation:i.orientation=a.orientation}return s?(e(d.scale(s,a)),o.promise()):i},saveImage:function(i,e){if(!i.canvas||e.disabled)return i;var a=this,t=i.files[i.index],n=l.Deferred();return i.canvas.toBlob?(i.canvas.toBlob(function(e){e.name||(t.type===e.type?e.name=t.name:t.name&&(e.name=t.name.replace(/\.\w+$/,"."+e.type.substr(6)))),t.type!==e.type&&delete i.imageHead,i.files[i.index]=e,n.resolveWith(a,[i])},e.type||t.type,e.quality),n.promise()):i},loadImageMetaData:function(i,e){if(e.disabled)return i;var a=this,t=l.Deferred();return d.parseMetaData(i.files[i.index],function(e){l.extend(i,e),t.resolveWith(a,[i])},e),t.promise()},saveImageMetaData:function(i,e){if(!(i.imageHead&&i.canvas&&i.canvas.toBlob)||e.disabled)return i;var a=this,t=i.files[i.index],n=l.Deferred();return i.orientation&&i.exifOffsets&&d.writeExifData(i.imageHead,i,"Orientation",1),d.replaceHead(t,i.imageHead,function(e){e.name=t.name,i.files[i.index]=e,n.resolveWith(a,[i])}),n.promise()},setImage:function(e,i){return e.preview&&!i.disabled&&(e.files[e.index][i.name||"preview"]=e.preview),e},deleteImageReferences:function(e,i){return i.disabled||(delete e.img,delete e.canvas,delete e.preview,delete e.imageHead),e}}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","load-image","./jquery.fileupload-process"],e):"object"==typeof exports?e(require("jquery"),require("blueimp-load-image/js/load-image"),require("./jquery.fileupload-process")):e(window.jQuery,window.loadImage)}(function(a,l){"use strict";a.blueimp.fileupload.prototype.options.processQueue.unshift({action:"loadAudio",prefix:!0,fileTypes:"@",maxFileSize:"@",disabled:"@disableAudioPreview"},{action:"setAudio",name:"@audioPreviewName",disabled:"@disableAudioPreview"}),a.widget("blueimp.fileupload",a.blueimp.fileupload,{options:{loadAudioFileTypes:/^audio\/.*$/},_audioElement:document.createElement("audio"),processActions:{loadAudio:function(e,i){if(i.disabled)return e;var o,d,u=e.files[e.index];return this._audioElement.canPlayType&&this._audioElement.canPlayType(u.type)&&("number"!==a.type(i.maxFileSize)||u.size<=i.maxFileSize)&&(!i.fileTypes||i.fileTypes.test(u.type))&&(o=l.createObjectURL(u))&&((d=this._audioElement.cloneNode(!1)).src=o,d.controls=!0,e.audio=d),e},setAudio:function(e,i){return e.audio&&!i.disabled&&(e.files[e.index][i.name||"preview"]=e.audio),e}}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","load-image","./jquery.fileupload-process"],e):"object"==typeof exports?e(require("jquery"),require("blueimp-load-image/js/load-image"),require("./jquery.fileupload-process")):e(window.jQuery,window.loadImage)}(function(t,n){"use strict";t.blueimp.fileupload.prototype.options.processQueue.unshift({action:"loadVideo",prefix:!0,fileTypes:"@",maxFileSize:"@",disabled:"@disableVideoPreview"},{action:"setVideo",name:"@videoPreviewName",disabled:"@disableVideoPreview"}),t.widget("blueimp.fileupload",t.blueimp.fileupload,{options:{loadVideoFileTypes:/^video\/.*$/},_videoElement:document.createElement("video"),processActions:{loadVideo:function(e,i){if(i.disabled)return e;var o,d,l=e.files[e.index];return this._videoElement.canPlayType&&this._videoElement.canPlayType(l.type)&&("number"!==t.type(i.maxFileSize)||l.size<=i.maxFileSize)&&(!i.fileTypes||i.fileTypes.test(l.type))&&(o=n.createObjectURL(l))&&((d=this._videoElement.cloneNode(!1)).src=o,d.controls=!0,e.video=d),e},setVideo:function(e,i){return e.video&&!i.disabled&&(e.files[e.index][i.name||"preview"]=e.video),e}}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload-process"],e):"object"==typeof exports?e(require("jquery"),require("./jquery.fileupload-process")):e(window.jQuery)}(function(o){"use strict";o.blueimp.fileupload.prototype.options.processQueue.push({action:"validate",always:!0,acceptFileTypes:"@",maxFileSize:"@",minFileSize:"@",maxNumberOfFiles:"@",disabled:"@disableValidation"}),o.widget("blueimp.fileupload",o.blueimp.fileupload,{options:{getNumberOfFiles:o.noop,messages:{maxNumberOfFiles:"Maximum number of files exceeded",acceptFileTypes:"File type not allowed",maxFileSize:"File is too large",minFileSize:"File is too small"}},processActions:{validate:function(e,i){if(i.disabled)return e;var r,l=o.Deferred(),s=this.options,t=e.files[e.index];return(i.minFileSize||i.maxFileSize)&&(r=t.size),"number"===o.type(i.maxNumberOfFiles)&&(s.getNumberOfFiles()||0)+e.files.length>i.maxNumberOfFiles?t.error=s.i18n("maxNumberOfFiles"):!i.acceptFileTypes||i.acceptFileTypes.test(t.type)||i.acceptFileTypes.test(t.name)?r>i.maxFileSize?t.error=s.i18n("maxFileSize"):"number"===o.type(r)&&r<i.minFileSize?t.error=s.i18n("minFileSize"):delete t.error:t.error=s.i18n("acceptFileTypes"),t.error||e.files.error?(e.files.error=!0,l.rejectWith(this,[e])):l.resolveWith(this,[e]),l.promise()}}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","blueimp-tmpl","./jquery.fileupload-image","./jquery.fileupload-audio","./jquery.fileupload-video","./jquery.fileupload-validate"],e):"object"==typeof exports?e(require("jquery"),require("blueimp-tmpl"),require("./jquery.fileupload-image"),require("./jquery.fileupload-audio"),require("./jquery.fileupload-video"),require("./jquery.fileupload-validate")):e(window.jQuery,window.tmpl)}(function(d,t){"use strict";d.blueimp.fileupload.prototype._specialOptions.push("filesContainer","uploadTemplateId","downloadTemplateId"),d.widget("blueimp.fileupload",d.blueimp.fileupload,{options:{autoUpload:!1,showElementClass:"in",uploadTemplateId:"template-upload",downloadTemplateId:"template-download",filesContainer:void 0,prependFiles:!1,dataType:"json",messages:{unknownError:"Unknown error"},getNumberOfFiles:function(){return this.filesContainer.children().not(".processing").length},getFilesFromResponse:function(e){return e.result&&d.isArray(e.result.files)?e.result.files:[]},add:function(e,i){if(e.isDefaultPrevented())return!1;var t=d(this),n=t.data("blueimp-fileupload")||t.data("fileupload"),r=n.options;i.context=n._renderUpload(i.files).data("data",i).addClass("processing"),r.filesContainer[r.prependFiles?"prepend":"append"](i.context),n._forceReflow(i.context),n._transition(i.context),i.process(function(){return t.fileupload("process",i)}).always(function(){i.context.each(function(e){d(this).find(".size").text(n._formatFileSize(i.files[e].size))}).removeClass("processing"),n._renderPreviews(i)}).done(function(){i.context.find(".edit,.start").prop("disabled",!1),!1!==n._trigger("added",e,i)&&(r.autoUpload||i.autoUpload)&&!1!==i.autoUpload&&i.submit()}).fail(function(){i.files.error&&i.context.each(function(e){var t=i.files[e].error;t&&d(this).find(".error").text(t)})})},send:function(e,t){if(e.isDefaultPrevented())return!1;var i=d(this).data("blueimp-fileupload")||d(this).data("fileupload");return t.context&&t.dataType&&"iframe"===t.dataType.substr(0,6)&&t.context.find(".progress").addClass(!d.support.transition&&"progress-animated").attr("aria-valuenow",100).children().first().css("width","100%"),i._trigger("sent",e,t)},done:function(i,n){if(i.isDefaultPrevented())return!1;var r,o,a=d(this).data("blueimp-fileupload")||d(this).data("fileupload"),s=(n.getFilesFromResponse||a.options.getFilesFromResponse)(n);n.context?n.context.each(function(e){var t=s[e]||{error:"Empty file upload result"};o=a._addFinishedDeferreds(),a._transition(d(this)).done(function(){var e=d(this);r=a._renderDownload([t]).replaceAll(e),a._forceReflow(r),a._transition(r).done(function(){n.context=d(this),a._trigger("completed",i,n),a._trigger("finished",i,n),o.resolve()})})}):(r=a._renderDownload(s)[a.options.prependFiles?"prependTo":"appendTo"](a.options.filesContainer),a._forceReflow(r),o=a._addFinishedDeferreds(),a._transition(r).done(function(){n.context=d(this),a._trigger("completed",i,n),a._trigger("finished",i,n),o.resolve()}))},fail:function(i,n){if(i.isDefaultPrevented())return!1;var r,o,a=d(this).data("blueimp-fileupload")||d(this).data("fileupload");n.context?n.context.each(function(e){var t;"abort"!==n.errorThrown?((t=n.files[e]).error=t.error||n.errorThrown||n.i18n("unknownError"),o=a._addFinishedDeferreds(),a._transition(d(this)).done(function(){var e=d(this);r=a._renderDownload([t]).replaceAll(e),a._forceReflow(r),a._transition(r).done(function(){n.context=d(this),a._trigger("failed",i,n),a._trigger("finished",i,n),o.resolve()})})):(o=a._addFinishedDeferreds(),a._transition(d(this)).done(function(){d(this).remove(),a._trigger("failed",i,n),a._trigger("finished",i,n),o.resolve()}))}):"abort"!==n.errorThrown?(n.context=a._renderUpload(n.files)[a.options.prependFiles?"prependTo":"appendTo"](a.options.filesContainer).data("data",n),a._forceReflow(n.context),o=a._addFinishedDeferreds(),a._transition(n.context).done(function(){n.context=d(this),a._trigger("failed",i,n),a._trigger("finished",i,n),o.resolve()})):(a._trigger("failed",i,n),a._trigger("finished",i,n),a._addFinishedDeferreds().resolve())},progress:function(e,t){if(e.isDefaultPrevented())return!1;var i=Math.floor(t.loaded/t.total*100);t.context&&t.context.each(function(){d(this).find(".progress").attr("aria-valuenow",i).children().first().css("width",i+"%")})},progressall:function(e,t){if(e.isDefaultPrevented())return!1;var i=d(this),n=Math.floor(t.loaded/t.total*100),r=i.find(".fileupload-progress"),o=r.find(".progress-extended");o.length&&o.html((i.data("blueimp-fileupload")||i.data("fileupload"))._renderExtendedProgress(t)),r.find(".progress").attr("aria-valuenow",n).children().first().css("width",n+"%")},start:function(e){if(e.isDefaultPrevented())return!1;var t=d(this).data("blueimp-fileupload")||d(this).data("fileupload");t._resetFinishedDeferreds(),t._transition(d(this).find(".fileupload-progress")).done(function(){t._trigger("started",e)})},stop:function(e){if(e.isDefaultPrevented())return!1;var t=d(this).data("blueimp-fileupload")||d(this).data("fileupload"),i=t._addFinishedDeferreds();d.when.apply(d,t._getFinishedDeferreds()).done(function(){t._trigger("stopped",e)}),t._transition(d(this).find(".fileupload-progress")).done(function(){d(this).find(".progress").attr("aria-valuenow","0").children().first().css("width","0%"),d(this).find(".progress-extended").html("&nbsp;"),i.resolve()})},processstart:function(e){if(e.isDefaultPrevented())return!1;d(this).addClass("fileupload-processing")},processstop:function(e){if(e.isDefaultPrevented())return!1;d(this).removeClass("fileupload-processing")},destroy:function(e,t){if(e.isDefaultPrevented())return!1;function i(){n._transition(t.context).done(function(){d(this).remove(),n._trigger("destroyed",e,t)})}var n=d(this).data("blueimp-fileupload")||d(this).data("fileupload");t.url?(t.dataType=t.dataType||n.options.dataType,d.ajax(t).done(i).fail(function(){n._trigger("destroyfailed",e,t)})):i()}},_resetFinishedDeferreds:function(){this._finishedUploads=[]},_addFinishedDeferreds:function(e){var t=e||d.Deferred();return this._finishedUploads.push(t),t},_getFinishedDeferreds:function(){return this._finishedUploads},_enableDragToDesktop:function(){var e=d(this),t=e.prop("href"),i=e.prop("download"),n="application/octet-stream";e.on("dragstart",function(e){try{e.originalEvent.dataTransfer.setData("DownloadURL",[n,i,t].join(":"))}catch(e){}})},_formatFileSize:function(e){return"number"!=typeof e?"":1073741824<=e?(e/1073741824).toFixed(2)+" GB":1048576<=e?(e/1048576).toFixed(2)+" MB":(e/1024).toFixed(2)+" KB"},_formatBitrate:function(e){return"number"!=typeof e?"":1e9<=e?(e/1e9).toFixed(2)+" Gbit/s":1e6<=e?(e/1e6).toFixed(2)+" Mbit/s":1e3<=e?(e/1e3).toFixed(2)+" kbit/s":e.toFixed(2)+" bit/s"},_formatTime:function(e){var t=new Date(1e3*e),i=Math.floor(e/86400);return(i=i?i+"d ":"")+("0"+t.getUTCHours()).slice(-2)+":"+("0"+t.getUTCMinutes()).slice(-2)+":"+("0"+t.getUTCSeconds()).slice(-2)},_formatPercentage:function(e){return(100*e).toFixed(2)+" %"},_renderExtendedProgress:function(e){return this._formatBitrate(e.bitrate)+" | "+this._formatTime(8*(e.total-e.loaded)/e.bitrate)+" | "+this._formatPercentage(e.loaded/e.total)+" | "+this._formatFileSize(e.loaded)+" / "+this._formatFileSize(e.total)},_renderTemplate:function(e,t){if(!e)return d();var i=e({files:t,formatFileSize:this._formatFileSize,options:this.options});return i instanceof d?i:d(this.options.templatesContainer).html(i).children()},_renderPreviews:function(i){i.context.find(".preview").each(function(e,t){d(t).empty().append(i.files[e].preview)})},_renderUpload:function(e){return this._renderTemplate(this.options.uploadTemplate,e)},_renderDownload:function(e){return this._renderTemplate(this.options.downloadTemplate,e).find("a[download]").each(this._enableDragToDesktop).end()},_editHandler:function(e){var t,i,n,r,o;e.preventDefault(),this.options.edit&&(t=this,i=d(e.currentTarget),n=i.closest(".template-upload"),r=n.data("data"),o=i.data().index,this.options.edit(r.files[o]).then(function(e){e&&(r.files[o]=e,r.context.addClass("processing"),n.find(".edit,.start").prop("disabled",!0),d(t.element).fileupload("process",r).always(function(){n.find(".size").text(t._formatFileSize(r.files[o].size)),r.context.removeClass("processing"),t._renderPreviews(r)}).done(function(){n.find(".edit,.start").prop("disabled",!1)}).fail(function(){n.find(".edit").prop("disabled",!1);var e=r.files[o].error;e&&n.find(".error").text(e)}))}))},_startHandler:function(e){e.preventDefault();var t=d(e.currentTarget),i=t.closest(".template-upload").data("data");t.prop("disabled",!0),i&&i.submit&&i.submit()},_cancelHandler:function(e){e.preventDefault();var t=d(e.currentTarget).closest(".template-upload,.template-download"),i=t.data("data")||{};i.context=i.context||t,i.abort?i.abort():(i.errorThrown="abort",this._trigger("fail",e,i))},_deleteHandler:function(e){e.preventDefault();var t=d(e.currentTarget);this._trigger("destroy",e,d.extend({context:t.closest(".template-download"),type:"DELETE"},t.data()))},_forceReflow:function(e){return d.support.transition&&e.length&&e[0].offsetWidth},_transition:function(t){var i,n=d.Deferred();return d.support.transition&&t.hasClass("fade")&&t.is(":visible")?(i=function(e){e.target===t[0]&&(t.off(d.support.transition.end,i),n.resolveWith(t))},t.on(d.support.transition.end,i).toggleClass(this.options.showElementClass)):(t.toggleClass(this.options.showElementClass),n.resolveWith(t)),n},_initButtonBarEventHandlers:function(){var t=this.element.find(".fileupload-buttonbar"),i=this.options.filesContainer;this._on(t.find(".start"),{click:function(e){e.preventDefault(),i.find(".start").trigger("click")}}),this._on(t.find(".cancel"),{click:function(e){e.preventDefault(),i.find(".cancel").trigger("click")}}),this._on(t.find(".delete"),{click:function(e){e.preventDefault(),i.find(".template-download").find(".delete").trigger("click"),t.find(".toggle").prop("checked",!1)}}),this._on(t.find(".toggle"),{change:function(e){i.find(".toggle").prop("checked",d(e.currentTarget).is(":checked"))}})},_destroyButtonBarEventHandlers:function(){this._off(this.element.find(".fileupload-buttonbar").find(".start, .cancel, .delete"),"click"),this._off(this.element.find(".fileupload-buttonbar .toggle"),"change.")},_initEventHandlers:function(){this._super(),this._on(this.options.filesContainer,{"click .edit":this._editHandler,"click .start":this._startHandler,"click .cancel":this._cancelHandler,"click .delete":this._deleteHandler}),this._initButtonBarEventHandlers()},_destroyEventHandlers:function(){this._destroyButtonBarEventHandlers(),this._off(this.options.filesContainer,"click"),this._super()},_enableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",!1).parent().removeClass("disabled")},_disableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",!0).parent().addClass("disabled")},_initTemplates:function(){var e=this.options;e.templatesContainer=this.document[0].createElement(e.filesContainer.prop("nodeName")),t&&(e.uploadTemplateId&&(e.uploadTemplate=t(e.uploadTemplateId)),e.downloadTemplateId&&(e.downloadTemplate=t(e.downloadTemplateId)))},_initFilesContainer:function(){var e=this.options;void 0===e.filesContainer?e.filesContainer=this.element.find(".files"):e.filesContainer instanceof d||(e.filesContainer=d(e.filesContainer))},_initSpecialOptions:function(){this._super(),this._initFilesContainer(),this._initTemplates()},_create:function(){this._super(),this._resetFinishedDeferreds(),d.support.fileInput||this._disableFileInputButton()},enable:function(){var e=!1;this.options.disabled&&(e=!0),this._super(),e&&(this.element.find("input, button").prop("disabled",!1),this._enableFileInputButton())},disable:function(){this.options.disabled||(this.element.find("input, button").prop("disabled",!0),this._disableFileInputButton()),this._super()}})});