{"version":3,"file":"vendor-5f5f3156.js","sources":["../../../../../web/bootstrap-aunoa/node_modules/get-size/get-size.js","../../../../../web/bootstrap-aunoa/node_modules/ev-emitter/ev-emitter.js","../../../../../web/bootstrap-aunoa/node_modules/desandro-matches-selector/matches-selector.js","../../../../../web/bootstrap-aunoa/node_modules/fizzy-ui-utils/utils.js","../../../../../web/bootstrap-aunoa/node_modules/outlayer/item.js","../../../../../web/bootstrap-aunoa/node_modules/outlayer/outlayer.js","../../../../../web/bootstrap-aunoa/node_modules/unipointer/unipointer.js","../../../../../web/bootstrap-aunoa/node_modules/unidragger/unidragger.js","../../../../../web/bootstrap-aunoa/node_modules/just-extend/index.esm.js","../../../../../web/bootstrap-aunoa/node_modules/dropzone/dist/dropzone.mjs","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/htmlparser.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/reporter.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/alt-require.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-lowercase.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-sorted.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-no-duplication.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-unsafe-chars.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-value-double-quotes.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-value-not-empty.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-value-single-quotes.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-whitespace.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/doctype-first.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/doctype-html5.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/head-script-disabled.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/href-abs-or-rel.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/html-lang-require.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/id-class-ad-disabled.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/id-class-value.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/id-unique.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/inline-script-disabled.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/inline-style-disabled.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/input-requires-label.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/script-disabled.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/space-tab-mixed-disabled.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/spec-char-escape.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/src-not-empty.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/style-disabled.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/tag-pair.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/tag-self-close.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/empty-tag-not-self-closed.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/tagname-lowercase.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/tagname-specialchars.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/title-require.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/tags-check.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/attr-no-unnecessary-whitespace.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/rules/index.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/htmlhint/dist/core/core.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/ms/index.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/debug/src/debug.js","../../../../../web/bootstrap-aunoa-codemirror/node_modules/debug/src/browser.js","../../../../../web/tnt-mate/node_modules/@tnt/tnticons/js/icons.js"],"sourcesContent":["/*!\n * getSize v2.0.3\n * measure size of elements\n * MIT license\n */\n\n/* jshint browser: true, strict: true, undef: true, unused: true */\n/* globals console: false */\n\n( function( window, factory ) {\n /* jshint strict: false */ /* globals define, module */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory();\n } else {\n // browser global\n window.getSize = factory();\n }\n\n})( window, function factory() {\n'use strict';\n\n// -------------------------- helpers -------------------------- //\n\n// get a number from a string, not a percentage\nfunction getStyleSize( value ) {\n var num = parseFloat( value );\n // not a percent like '100%', and a number\n var isValid = value.indexOf('%') == -1 && !isNaN( num );\n return isValid && num;\n}\n\nfunction noop() {}\n\nvar logError = typeof console == 'undefined' ? noop :\n function( message ) {\n console.error( message );\n };\n\n// -------------------------- measurements -------------------------- //\n\nvar measurements = [\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderTopWidth',\n 'borderBottomWidth'\n];\n\nvar measurementsLength = measurements.length;\n\nfunction getZeroSize() {\n var size = {\n width: 0,\n height: 0,\n innerWidth: 0,\n innerHeight: 0,\n outerWidth: 0,\n outerHeight: 0\n };\n for ( var i=0; i < measurementsLength; i++ ) {\n var measurement = measurements[i];\n size[ measurement ] = 0;\n }\n return size;\n}\n\n// -------------------------- getStyle -------------------------- //\n\n/**\n * getStyle, get style of element, check for Firefox bug\n * https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\nfunction getStyle( elem ) {\n var style = getComputedStyle( elem );\n if ( !style ) {\n logError( 'Style returned ' + style +\n '. Are you running this code in a hidden iframe on Firefox? ' +\n 'See https://bit.ly/getsizebug1' );\n }\n return style;\n}\n\n// -------------------------- setup -------------------------- //\n\nvar isSetup = false;\n\nvar isBoxSizeOuter;\n\n/**\n * setup\n * check isBoxSizerOuter\n * do on first getSize() rather than on page load for Firefox bug\n */\nfunction setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}\n\n// -------------------------- getSize -------------------------- //\n\nfunction getSize( elem ) {\n setup();\n\n // use querySeletor if elem is string\n if ( typeof elem == 'string' ) {\n elem = document.querySelector( elem );\n }\n\n // do not proceed on non-objects\n if ( !elem || typeof elem != 'object' || !elem.nodeType ) {\n return;\n }\n\n var style = getStyle( elem );\n\n // if hidden, everything is 0\n if ( style.display == 'none' ) {\n return getZeroSize();\n }\n\n var size = {};\n size.width = elem.offsetWidth;\n size.height = elem.offsetHeight;\n\n var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';\n\n // get all measurements\n for ( var i=0; i < measurementsLength; i++ ) {\n var measurement = measurements[i];\n var value = style[ measurement ];\n var num = parseFloat( value );\n // any 'auto', 'medium' value will be 0\n size[ measurement ] = !isNaN( num ) ? num : 0;\n }\n\n var paddingWidth = size.paddingLeft + size.paddingRight;\n var paddingHeight = size.paddingTop + size.paddingBottom;\n var marginWidth = size.marginLeft + size.marginRight;\n var marginHeight = size.marginTop + size.marginBottom;\n var borderWidth = size.borderLeftWidth + size.borderRightWidth;\n var borderHeight = size.borderTopWidth + size.borderBottomWidth;\n\n var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;\n\n // overwrite width and height if we can get it from style\n var styleWidth = getStyleSize( style.width );\n if ( styleWidth !== false ) {\n size.width = styleWidth +\n // add padding and border unless it's already including it\n ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );\n }\n\n var styleHeight = getStyleSize( style.height );\n if ( styleHeight !== false ) {\n size.height = styleHeight +\n // add padding and border unless it's already including it\n ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );\n }\n\n size.innerWidth = size.width - ( paddingWidth + borderWidth );\n size.innerHeight = size.height - ( paddingHeight + borderHeight );\n\n size.outerWidth = size.width + marginWidth;\n size.outerHeight = size.height + marginHeight;\n\n return size;\n}\n\nreturn getSize;\n\n});\n","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n( function( global, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n\n}( typeof window != 'undefined' ? window : this, function() {\n\n\"use strict\";\n\nfunction EvEmitter() {}\n\nvar proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[ eventName ] = events[ eventName ] || [];\n // only add once\n if ( listeners.indexOf( listener ) == -1 ) {\n listeners.push( listener );\n }\n\n return this;\n};\n\nproto.once = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // add event\n this.on( eventName, listener );\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n // set flag\n onceListeners[ listener ] = true;\n\n return this;\n};\n\nproto.off = function( eventName, listener ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n var index = listeners.indexOf( listener );\n if ( index != -1 ) {\n listeners.splice( index, 1 );\n }\n\n return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n for ( var i=0; i < listeners.length; i++ ) {\n var listener = listeners[i]\n var isOnce = onceListeners && onceListeners[ listener ];\n if ( isOnce ) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off( eventName, listener );\n // unset once flag\n delete onceListeners[ listener ];\n }\n // trigger listener\n listener.apply( this, args );\n }\n\n return this;\n};\n\nproto.allOff = function() {\n delete this._events;\n delete this._onceEvents;\n};\n\nreturn EvEmitter;\n\n}));\n","/**\n * matchesSelector v2.0.2\n * matchesSelector( element, '.selector' )\n * MIT license\n */\n\n/*jshint browser: true, strict: true, undef: true, unused: true */\n\n( function( window, factory ) {\n /*global define: false, module: false */\n 'use strict';\n // universal module definition\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory();\n } else {\n // browser global\n window.matchesSelector = factory();\n }\n\n}( window, function factory() {\n 'use strict';\n\n var matchesMethod = ( function() {\n var ElemProto = window.Element.prototype;\n // check for the standard method name first\n if ( ElemProto.matches ) {\n return 'matches';\n }\n // check un-prefixed\n if ( ElemProto.matchesSelector ) {\n return 'matchesSelector';\n }\n // check vendor prefixes\n var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];\n\n for ( var i=0; i < prefixes.length; i++ ) {\n var prefix = prefixes[i];\n var method = prefix + 'MatchesSelector';\n if ( ElemProto[ method ] ) {\n return method;\n }\n }\n })();\n\n return function matchesSelector( elem, selector ) {\n return elem[ matchesMethod ]( selector );\n };\n\n}));\n","/**\n * Fizzy UI utils v2.0.7\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true, strict: true */\n\n( function( window, factory ) {\n // universal module definition\n /*jshint strict: false */ /*globals define, module, require */\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'desandro-matches-selector/matches-selector'\n ], function( matchesSelector ) {\n return factory( window, matchesSelector );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('desandro-matches-selector')\n );\n } else {\n // browser global\n window.fizzyUIUtils = factory(\n window,\n window.matchesSelector\n );\n }\n\n}( window, function factory( window, matchesSelector ) {\n\n'use strict';\n\nvar utils = {};\n\n// ----- extend ----- //\n\n// extends objects\nutils.extend = function( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n};\n\n// ----- modulo ----- //\n\nutils.modulo = function( num, div ) {\n return ( ( num % div ) + div ) % div;\n};\n\n// ----- makeArray ----- //\n\nvar arraySlice = Array.prototype.slice;\n\n// turn element or nodeList into an array\nutils.makeArray = function( obj ) {\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n return obj;\n }\n // return empty array if undefined or null. #6\n if ( obj === null || obj === undefined ) {\n return [];\n }\n\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if ( isArrayLike ) {\n // convert nodeList to array\n return arraySlice.call( obj );\n }\n\n // array of single index\n return [ obj ];\n};\n\n// ----- removeFrom ----- //\n\nutils.removeFrom = function( ary, obj ) {\n var index = ary.indexOf( obj );\n if ( index != -1 ) {\n ary.splice( index, 1 );\n }\n};\n\n// ----- getParent ----- //\n\nutils.getParent = function( elem, selector ) {\n while ( elem.parentNode && elem != document.body ) {\n elem = elem.parentNode;\n if ( matchesSelector( elem, selector ) ) {\n return elem;\n }\n }\n};\n\n// ----- getQueryElement ----- //\n\n// use element as selector string\nutils.getQueryElement = function( elem ) {\n if ( typeof elem == 'string' ) {\n return document.querySelector( elem );\n }\n return elem;\n};\n\n// ----- handleEvent ----- //\n\n// enable .ontype to trigger from .addEventListener( elem, 'type' )\nutils.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\n// ----- filterFindElements ----- //\n\nutils.filterFindElements = function( elems, selector ) {\n // make array of elems\n elems = utils.makeArray( elems );\n var ffElems = [];\n\n elems.forEach( function( elem ) {\n // check that elem is an actual element\n if ( !( elem instanceof HTMLElement ) ) {\n return;\n }\n // add elem if no selector\n if ( !selector ) {\n ffElems.push( elem );\n return;\n }\n // filter & find items if we have a selector\n // filter\n if ( matchesSelector( elem, selector ) ) {\n ffElems.push( elem );\n }\n // find children\n var childElems = elem.querySelectorAll( selector );\n // concat childElems to filterFound array\n for ( var i=0; i < childElems.length; i++ ) {\n ffElems.push( childElems[i] );\n }\n });\n\n return ffElems;\n};\n\n// ----- debounceMethod ----- //\n\nutils.debounceMethod = function( _class, methodName, threshold ) {\n threshold = threshold || 100;\n // original method\n var method = _class.prototype[ methodName ];\n var timeoutName = methodName + 'Timeout';\n\n _class.prototype[ methodName ] = function() {\n var timeout = this[ timeoutName ];\n clearTimeout( timeout );\n\n var args = arguments;\n var _this = this;\n this[ timeoutName ] = setTimeout( function() {\n method.apply( _this, args );\n delete _this[ timeoutName ];\n }, threshold );\n };\n};\n\n// ----- docReady ----- //\n\nutils.docReady = function( callback ) {\n var readyState = document.readyState;\n if ( readyState == 'complete' || readyState == 'interactive' ) {\n // do async to allow for other scripts to run. metafizzy/flickity#441\n setTimeout( callback );\n } else {\n document.addEventListener( 'DOMContentLoaded', callback );\n }\n};\n\n// ----- htmlInit ----- //\n\n// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/\nutils.toDashed = function( str ) {\n return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {\n return $1 + '-' + $2;\n }).toLowerCase();\n};\n\nvar console = window.console;\n/**\n * allow user to initialize classes via [data-namespace] or .js-namespace class\n * htmlInit( Widget, 'widgetName' )\n * options are parsed from data-namespace-options\n */\nutils.htmlInit = function( WidgetClass, namespace ) {\n utils.docReady( function() {\n var dashedNamespace = utils.toDashed( namespace );\n var dataAttr = 'data-' + dashedNamespace;\n var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );\n var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );\n var elems = utils.makeArray( dataAttrElems )\n .concat( utils.makeArray( jsDashElems ) );\n var dataOptionsAttr = dataAttr + '-options';\n var jQuery = window.jQuery;\n\n elems.forEach( function( elem ) {\n var attr = elem.getAttribute( dataAttr ) ||\n elem.getAttribute( dataOptionsAttr );\n var options;\n try {\n options = attr && JSON.parse( attr );\n } catch ( error ) {\n // log error, do not initialize\n if ( console ) {\n console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +\n ': ' + error );\n }\n return;\n }\n // initialize\n var instance = new WidgetClass( elem, options );\n // make available via $().data('namespace')\n if ( jQuery ) {\n jQuery.data( elem, namespace, instance );\n }\n });\n\n });\n};\n\n// ----- ----- //\n\nreturn utils;\n\n}));\n","/**\n * Outlayer Item\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( [\n 'ev-emitter/ev-emitter',\n 'get-size/get-size'\n ],\n factory\n );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory(\n require('ev-emitter'),\n require('get-size')\n );\n } else {\n // browser global\n window.Outlayer = {};\n window.Outlayer.Item = factory(\n window.EvEmitter,\n window.getSize\n );\n }\n\n}( window, function factory( EvEmitter, getSize ) {\n'use strict';\n\n// ----- helpers ----- //\n\nfunction isEmptyObj( obj ) {\n for ( var prop in obj ) {\n return false;\n }\n prop = null;\n return true;\n}\n\n// -------------------------- CSS3 support -------------------------- //\n\n\nvar docElemStyle = document.documentElement.style;\n\nvar transitionProperty = typeof docElemStyle.transition == 'string' ?\n 'transition' : 'WebkitTransition';\nvar transformProperty = typeof docElemStyle.transform == 'string' ?\n 'transform' : 'WebkitTransform';\n\nvar transitionEndEvent = {\n WebkitTransition: 'webkitTransitionEnd',\n transition: 'transitionend'\n}[ transitionProperty ];\n\n// cache all vendor properties that could have vendor prefix\nvar vendorProperties = {\n transform: transformProperty,\n transition: transitionProperty,\n transitionDuration: transitionProperty + 'Duration',\n transitionProperty: transitionProperty + 'Property',\n transitionDelay: transitionProperty + 'Delay'\n};\n\n// -------------------------- Item -------------------------- //\n\nfunction Item( element, layout ) {\n if ( !element ) {\n return;\n }\n\n this.element = element;\n // parent layout class, i.e. Masonry, Isotope, or Packery\n this.layout = layout;\n this.position = {\n x: 0,\n y: 0\n };\n\n this._create();\n}\n\n// inherit EvEmitter\nvar proto = Item.prototype = Object.create( EvEmitter.prototype );\nproto.constructor = Item;\n\nproto._create = function() {\n // transition objects\n this._transn = {\n ingProperties: {},\n clean: {},\n onEnd: {}\n };\n\n this.css({\n position: 'absolute'\n });\n};\n\n// trigger specified handler for event type\nproto.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\nproto.getSize = function() {\n this.size = getSize( this.element );\n};\n\n/**\n * apply CSS styles to element\n * @param {Object} style\n */\nproto.css = function( style ) {\n var elemStyle = this.element.style;\n\n for ( var prop in style ) {\n // use vendor property if available\n var supportedProp = vendorProperties[ prop ] || prop;\n elemStyle[ supportedProp ] = style[ prop ];\n }\n};\n\n // measure position, and sets it\nproto.getPosition = function() {\n var style = getComputedStyle( this.element );\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n var xValue = style[ isOriginLeft ? 'left' : 'right' ];\n var yValue = style[ isOriginTop ? 'top' : 'bottom' ];\n var x = parseFloat( xValue );\n var y = parseFloat( yValue );\n // convert percent to pixels\n var layoutSize = this.layout.size;\n if ( xValue.indexOf('%') != -1 ) {\n x = ( x / 100 ) * layoutSize.width;\n }\n if ( yValue.indexOf('%') != -1 ) {\n y = ( y / 100 ) * layoutSize.height;\n }\n // clean up 'auto' or other non-integer values\n x = isNaN( x ) ? 0 : x;\n y = isNaN( y ) ? 0 : y;\n // remove padding from measurement\n x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;\n y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;\n\n this.position.x = x;\n this.position.y = y;\n};\n\n// set settled position, apply padding\nproto.layoutPosition = function() {\n var layoutSize = this.layout.size;\n var style = {};\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n\n // x\n var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';\n var xProperty = isOriginLeft ? 'left' : 'right';\n var xResetProperty = isOriginLeft ? 'right' : 'left';\n\n var x = this.position.x + layoutSize[ xPadding ];\n // set in percentage or pixels\n style[ xProperty ] = this.getXValue( x );\n // reset other property\n style[ xResetProperty ] = '';\n\n // y\n var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';\n var yProperty = isOriginTop ? 'top' : 'bottom';\n var yResetProperty = isOriginTop ? 'bottom' : 'top';\n\n var y = this.position.y + layoutSize[ yPadding ];\n // set in percentage or pixels\n style[ yProperty ] = this.getYValue( y );\n // reset other property\n style[ yResetProperty ] = '';\n\n this.css( style );\n this.emitEvent( 'layout', [ this ] );\n};\n\nproto.getXValue = function( x ) {\n var isHorizontal = this.layout._getOption('horizontal');\n return this.layout.options.percentPosition && !isHorizontal ?\n ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';\n};\n\nproto.getYValue = function( y ) {\n var isHorizontal = this.layout._getOption('horizontal');\n return this.layout.options.percentPosition && isHorizontal ?\n ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';\n};\n\nproto._transitionTo = function( x, y ) {\n this.getPosition();\n // get current x & y from top/left\n var curX = this.position.x;\n var curY = this.position.y;\n\n var didNotMove = x == this.position.x && y == this.position.y;\n\n // save end position\n this.setPosition( x, y );\n\n // if did not move and not transitioning, just go to layout\n if ( didNotMove && !this.isTransitioning ) {\n this.layoutPosition();\n return;\n }\n\n var transX = x - curX;\n var transY = y - curY;\n var transitionStyle = {};\n transitionStyle.transform = this.getTranslate( transX, transY );\n\n this.transition({\n to: transitionStyle,\n onTransitionEnd: {\n transform: this.layoutPosition\n },\n isCleaning: true\n });\n};\n\nproto.getTranslate = function( x, y ) {\n // flip cooridinates if origin on right or bottom\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n x = isOriginLeft ? x : -x;\n y = isOriginTop ? y : -y;\n return 'translate3d(' + x + 'px, ' + y + 'px, 0)';\n};\n\n// non transition + transform support\nproto.goTo = function( x, y ) {\n this.setPosition( x, y );\n this.layoutPosition();\n};\n\nproto.moveTo = proto._transitionTo;\n\nproto.setPosition = function( x, y ) {\n this.position.x = parseFloat( x );\n this.position.y = parseFloat( y );\n};\n\n// ----- transition ----- //\n\n/**\n * @param {Object} style - CSS\n * @param {Function} onTransitionEnd\n */\n\n// non transition, just trigger callback\nproto._nonTransition = function( args ) {\n this.css( args.to );\n if ( args.isCleaning ) {\n this._removeStyles( args.to );\n }\n for ( var prop in args.onTransitionEnd ) {\n args.onTransitionEnd[ prop ].call( this );\n }\n};\n\n/**\n * proper transition\n * @param {Object} args - arguments\n * @param {Object} to - style to transition to\n * @param {Object} from - style to start transition from\n * @param {Boolean} isCleaning - removes transition styles after transition\n * @param {Function} onTransitionEnd - callback\n */\nproto.transition = function( args ) {\n // redirect to nonTransition if no transition duration\n if ( !parseFloat( this.layout.options.transitionDuration ) ) {\n this._nonTransition( args );\n return;\n }\n\n var _transition = this._transn;\n // keep track of onTransitionEnd callback by css property\n for ( var prop in args.onTransitionEnd ) {\n _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];\n }\n // keep track of properties that are transitioning\n for ( prop in args.to ) {\n _transition.ingProperties[ prop ] = true;\n // keep track of properties to clean up when transition is done\n if ( args.isCleaning ) {\n _transition.clean[ prop ] = true;\n }\n }\n\n // set from styles\n if ( args.from ) {\n this.css( args.from );\n // force redraw. http://blog.alexmaccaw.com/css-transitions\n var h = this.element.offsetHeight;\n // hack for JSHint to hush about unused var\n h = null;\n }\n // enable transition\n this.enableTransition( args.to );\n // set styles that are transitioning\n this.css( args.to );\n\n this.isTransitioning = true;\n\n};\n\n// dash before all cap letters, including first for\n// WebkitTransform => -webkit-transform\nfunction toDashedAll( str ) {\n return str.replace( /([A-Z])/g, function( $1 ) {\n return '-' + $1.toLowerCase();\n });\n}\n\nvar transitionProps = 'opacity,' + toDashedAll( transformProperty );\n\nproto.enableTransition = function(/* style */) {\n // HACK changing transitionProperty during a transition\n // will cause transition to jump\n if ( this.isTransitioning ) {\n return;\n }\n\n // make `transition: foo, bar, baz` from style object\n // HACK un-comment this when enableTransition can work\n // while a transition is happening\n // var transitionValues = [];\n // for ( var prop in style ) {\n // // dash-ify camelCased properties like WebkitTransition\n // prop = vendorProperties[ prop ] || prop;\n // transitionValues.push( toDashedAll( prop ) );\n // }\n // munge number to millisecond, to match stagger\n var duration = this.layout.options.transitionDuration;\n duration = typeof duration == 'number' ? duration + 'ms' : duration;\n // enable transition styles\n this.css({\n transitionProperty: transitionProps,\n transitionDuration: duration,\n transitionDelay: this.staggerDelay || 0\n });\n // listen for transition end event\n this.element.addEventListener( transitionEndEvent, this, false );\n};\n\n// ----- events ----- //\n\nproto.onwebkitTransitionEnd = function( event ) {\n this.ontransitionend( event );\n};\n\nproto.onotransitionend = function( event ) {\n this.ontransitionend( event );\n};\n\n// properties that I munge to make my life easier\nvar dashedVendorProperties = {\n '-webkit-transform': 'transform'\n};\n\nproto.ontransitionend = function( event ) {\n // disregard bubbled events from children\n if ( event.target !== this.element ) {\n return;\n }\n var _transition = this._transn;\n // get property name of transitioned property, convert to prefix-free\n var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;\n\n // remove property that has completed transitioning\n delete _transition.ingProperties[ propertyName ];\n // check if any properties are still transitioning\n if ( isEmptyObj( _transition.ingProperties ) ) {\n // all properties have completed transitioning\n this.disableTransition();\n }\n // clean style\n if ( propertyName in _transition.clean ) {\n // clean up style\n this.element.style[ event.propertyName ] = '';\n delete _transition.clean[ propertyName ];\n }\n // trigger onTransitionEnd callback\n if ( propertyName in _transition.onEnd ) {\n var onTransitionEnd = _transition.onEnd[ propertyName ];\n onTransitionEnd.call( this );\n delete _transition.onEnd[ propertyName ];\n }\n\n this.emitEvent( 'transitionEnd', [ this ] );\n};\n\nproto.disableTransition = function() {\n this.removeTransitionStyles();\n this.element.removeEventListener( transitionEndEvent, this, false );\n this.isTransitioning = false;\n};\n\n/**\n * removes style property from element\n * @param {Object} style\n**/\nproto._removeStyles = function( style ) {\n // clean up transition styles\n var cleanStyle = {};\n for ( var prop in style ) {\n cleanStyle[ prop ] = '';\n }\n this.css( cleanStyle );\n};\n\nvar cleanTransitionStyle = {\n transitionProperty: '',\n transitionDuration: '',\n transitionDelay: ''\n};\n\nproto.removeTransitionStyles = function() {\n // remove transition\n this.css( cleanTransitionStyle );\n};\n\n// ----- stagger ----- //\n\nproto.stagger = function( delay ) {\n delay = isNaN( delay ) ? 0 : delay;\n this.staggerDelay = delay + 'ms';\n};\n\n// ----- show/hide/remove ----- //\n\n// remove element from DOM\nproto.removeElem = function() {\n this.element.parentNode.removeChild( this.element );\n // remove display: none\n this.css({ display: '' });\n this.emitEvent( 'remove', [ this ] );\n};\n\nproto.remove = function() {\n // just remove element if no transition support or no transition\n if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {\n this.removeElem();\n return;\n }\n\n // start transition\n this.once( 'transitionEnd', function() {\n this.removeElem();\n });\n this.hide();\n};\n\nproto.reveal = function() {\n delete this.isHidden;\n // remove display: none\n this.css({ display: '' });\n\n var options = this.layout.options;\n\n var onTransitionEnd = {};\n var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');\n onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;\n\n this.transition({\n from: options.hiddenStyle,\n to: options.visibleStyle,\n isCleaning: true,\n onTransitionEnd: onTransitionEnd\n });\n};\n\nproto.onRevealTransitionEnd = function() {\n // check if still visible\n // during transition, item may have been hidden\n if ( !this.isHidden ) {\n this.emitEvent('reveal');\n }\n};\n\n/**\n * get style property use for hide/reveal transition end\n * @param {String} styleProperty - hiddenStyle/visibleStyle\n * @returns {String}\n */\nproto.getHideRevealTransitionEndProperty = function( styleProperty ) {\n var optionStyle = this.layout.options[ styleProperty ];\n // use opacity\n if ( optionStyle.opacity ) {\n return 'opacity';\n }\n // get first property\n for ( var prop in optionStyle ) {\n return prop;\n }\n};\n\nproto.hide = function() {\n // set flag\n this.isHidden = true;\n // remove display: none\n this.css({ display: '' });\n\n var options = this.layout.options;\n\n var onTransitionEnd = {};\n var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');\n onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;\n\n this.transition({\n from: options.visibleStyle,\n to: options.hiddenStyle,\n // keep hidden stuff hidden\n isCleaning: true,\n onTransitionEnd: onTransitionEnd\n });\n};\n\nproto.onHideTransitionEnd = function() {\n // check if still hidden\n // during transition, item may have been un-hidden\n if ( this.isHidden ) {\n this.css({ display: 'none' });\n this.emitEvent('hide');\n }\n};\n\nproto.destroy = function() {\n this.css({\n position: '',\n left: '',\n right: '',\n top: '',\n bottom: '',\n transition: '',\n transform: ''\n });\n};\n\nreturn Item;\n\n}));\n","/*!\n * Outlayer v2.1.1\n * the brains and guts of a layout library\n * MIT license\n */\n\n( function( window, factory ) {\n 'use strict';\n // universal module definition\n /* jshint strict: false */ /* globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( [\n 'ev-emitter/ev-emitter',\n 'get-size/get-size',\n 'fizzy-ui-utils/utils',\n './item'\n ],\n function( EvEmitter, getSize, utils, Item ) {\n return factory( window, EvEmitter, getSize, utils, Item);\n }\n );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory(\n window,\n require('ev-emitter'),\n require('get-size'),\n require('fizzy-ui-utils'),\n require('./item')\n );\n } else {\n // browser global\n window.Outlayer = factory(\n window,\n window.EvEmitter,\n window.getSize,\n window.fizzyUIUtils,\n window.Outlayer.Item\n );\n }\n\n}( window, function factory( window, EvEmitter, getSize, utils, Item ) {\n'use strict';\n\n// ----- vars ----- //\n\nvar console = window.console;\nvar jQuery = window.jQuery;\nvar noop = function() {};\n\n// -------------------------- Outlayer -------------------------- //\n\n// globally unique identifiers\nvar GUID = 0;\n// internal store of all Outlayer intances\nvar instances = {};\n\n\n/**\n * @param {Element, String} element\n * @param {Object} options\n * @constructor\n */\nfunction Outlayer( element, options ) {\n var queryElement = utils.getQueryElement( element );\n if ( !queryElement ) {\n if ( console ) {\n console.error( 'Bad element for ' + this.constructor.namespace +\n ': ' + ( queryElement || element ) );\n }\n return;\n }\n this.element = queryElement;\n // add jQuery\n if ( jQuery ) {\n this.$element = jQuery( this.element );\n }\n\n // options\n this.options = utils.extend( {}, this.constructor.defaults );\n this.option( options );\n\n // add id for Outlayer.getFromElement\n var id = ++GUID;\n this.element.outlayerGUID = id; // expando\n instances[ id ] = this; // associate via id\n\n // kick it off\n this._create();\n\n var isInitLayout = this._getOption('initLayout');\n if ( isInitLayout ) {\n this.layout();\n }\n}\n\n// settings are for internal use only\nOutlayer.namespace = 'outlayer';\nOutlayer.Item = Item;\n\n// default options\nOutlayer.defaults = {\n containerStyle: {\n position: 'relative'\n },\n initLayout: true,\n originLeft: true,\n originTop: true,\n resize: true,\n resizeContainer: true,\n // item options\n transitionDuration: '0.4s',\n hiddenStyle: {\n opacity: 0,\n transform: 'scale(0.001)'\n },\n visibleStyle: {\n opacity: 1,\n transform: 'scale(1)'\n }\n};\n\nvar proto = Outlayer.prototype;\n// inherit EvEmitter\nutils.extend( proto, EvEmitter.prototype );\n\n/**\n * set options\n * @param {Object} opts\n */\nproto.option = function( opts ) {\n utils.extend( this.options, opts );\n};\n\n/**\n * get backwards compatible option value, check old name\n */\nproto._getOption = function( option ) {\n var oldOption = this.constructor.compatOptions[ option ];\n return oldOption && this.options[ oldOption ] !== undefined ?\n this.options[ oldOption ] : this.options[ option ];\n};\n\nOutlayer.compatOptions = {\n // currentName: oldName\n initLayout: 'isInitLayout',\n horizontal: 'isHorizontal',\n layoutInstant: 'isLayoutInstant',\n originLeft: 'isOriginLeft',\n originTop: 'isOriginTop',\n resize: 'isResizeBound',\n resizeContainer: 'isResizingContainer'\n};\n\nproto._create = function() {\n // get items from children\n this.reloadItems();\n // elements that affect layout, but are not laid out\n this.stamps = [];\n this.stamp( this.options.stamp );\n // set container style\n utils.extend( this.element.style, this.options.containerStyle );\n\n // bind resize method\n var canBindResize = this._getOption('resize');\n if ( canBindResize ) {\n this.bindResize();\n }\n};\n\n// goes through all children again and gets bricks in proper order\nproto.reloadItems = function() {\n // collection of item elements\n this.items = this._itemize( this.element.children );\n};\n\n\n/**\n * turn elements into Outlayer.Items to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - collection of new Outlayer Items\n */\nproto._itemize = function( elems ) {\n\n var itemElems = this._filterFindItemElements( elems );\n var Item = this.constructor.Item;\n\n // create new Outlayer Items for collection\n var items = [];\n for ( var i=0; i < itemElems.length; i++ ) {\n var elem = itemElems[i];\n var item = new Item( elem, this );\n items.push( item );\n }\n\n return items;\n};\n\n/**\n * get item elements to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - item elements\n */\nproto._filterFindItemElements = function( elems ) {\n return utils.filterFindElements( elems, this.options.itemSelector );\n};\n\n/**\n * getter method for getting item elements\n * @returns {Array} elems - collection of item elements\n */\nproto.getItemElements = function() {\n return this.items.map( function( item ) {\n return item.element;\n });\n};\n\n// ----- init & layout ----- //\n\n/**\n * lays out all items\n */\nproto.layout = function() {\n this._resetLayout();\n this._manageStamps();\n\n // don't animate first layout\n var layoutInstant = this._getOption('layoutInstant');\n var isInstant = layoutInstant !== undefined ?\n layoutInstant : !this._isLayoutInited;\n this.layoutItems( this.items, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n};\n\n// _init is alias for layout\nproto._init = proto.layout;\n\n/**\n * logic before any new layout\n */\nproto._resetLayout = function() {\n this.getSize();\n};\n\n\nproto.getSize = function() {\n this.size = getSize( this.element );\n};\n\n/**\n * get measurement from option, for columnWidth, rowHeight, gutter\n * if option is String -> get element from selector string, & get size of element\n * if option is Element -> get size of element\n * else use option as a number\n *\n * @param {String} measurement\n * @param {String} size - width or height\n * @private\n */\nproto._getMeasurement = function( measurement, size ) {\n var option = this.options[ measurement ];\n var elem;\n if ( !option ) {\n // default to 0\n this[ measurement ] = 0;\n } else {\n // use option as an element\n if ( typeof option == 'string' ) {\n elem = this.element.querySelector( option );\n } else if ( option instanceof HTMLElement ) {\n elem = option;\n }\n // use size of element, if element\n this[ measurement ] = elem ? getSize( elem )[ size ] : option;\n }\n};\n\n/**\n * layout a collection of item elements\n * @api public\n */\nproto.layoutItems = function( items, isInstant ) {\n items = this._getItemsForLayout( items );\n\n this._layoutItems( items, isInstant );\n\n this._postLayout();\n};\n\n/**\n * get the items to be laid out\n * you may want to skip over some items\n * @param {Array} items\n * @returns {Array} items\n */\nproto._getItemsForLayout = function( items ) {\n return items.filter( function( item ) {\n return !item.isIgnored;\n });\n};\n\n/**\n * layout items\n * @param {Array} items\n * @param {Boolean} isInstant\n */\nproto._layoutItems = function( items, isInstant ) {\n this._emitCompleteOnItems( 'layout', items );\n\n if ( !items || !items.length ) {\n // no items, emit event with empty array\n return;\n }\n\n var queue = [];\n\n items.forEach( function( item ) {\n // get x/y object from method\n var position = this._getItemLayoutPosition( item );\n // enqueue\n position.item = item;\n position.isInstant = isInstant || item.isLayoutInstant;\n queue.push( position );\n }, this );\n\n this._processLayoutQueue( queue );\n};\n\n/**\n * get item layout position\n * @param {Outlayer.Item} item\n * @returns {Object} x and y position\n */\nproto._getItemLayoutPosition = function( /* item */ ) {\n return {\n x: 0,\n y: 0\n };\n};\n\n/**\n * iterate over array and position each item\n * Reason being - separating this logic prevents 'layout invalidation'\n * thx @paul_irish\n * @param {Array} queue\n */\nproto._processLayoutQueue = function( queue ) {\n this.updateStagger();\n queue.forEach( function( obj, i ) {\n this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );\n }, this );\n};\n\n// set stagger from option in milliseconds number\nproto.updateStagger = function() {\n var stagger = this.options.stagger;\n if ( stagger === null || stagger === undefined ) {\n this.stagger = 0;\n return;\n }\n this.stagger = getMilliseconds( stagger );\n return this.stagger;\n};\n\n/**\n * Sets position of item in DOM\n * @param {Outlayer.Item} item\n * @param {Number} x - horizontal position\n * @param {Number} y - vertical position\n * @param {Boolean} isInstant - disables transitions\n */\nproto._positionItem = function( item, x, y, isInstant, i ) {\n if ( isInstant ) {\n // if not transition, just set CSS\n item.goTo( x, y );\n } else {\n item.stagger( i * this.stagger );\n item.moveTo( x, y );\n }\n};\n\n/**\n * Any logic you want to do after each layout,\n * i.e. size the container\n */\nproto._postLayout = function() {\n this.resizeContainer();\n};\n\nproto.resizeContainer = function() {\n var isResizingContainer = this._getOption('resizeContainer');\n if ( !isResizingContainer ) {\n return;\n }\n var size = this._getContainerSize();\n if ( size ) {\n this._setContainerMeasure( size.width, true );\n this._setContainerMeasure( size.height, false );\n }\n};\n\n/**\n * Sets width or height of container if returned\n * @returns {Object} size\n * @param {Number} width\n * @param {Number} height\n */\nproto._getContainerSize = noop;\n\n/**\n * @param {Number} measure - size of width or height\n * @param {Boolean} isWidth\n */\nproto._setContainerMeasure = function( measure, isWidth ) {\n if ( measure === undefined ) {\n return;\n }\n\n var elemSize = this.size;\n // add padding and border width if border box\n if ( elemSize.isBorderBox ) {\n measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +\n elemSize.borderLeftWidth + elemSize.borderRightWidth :\n elemSize.paddingBottom + elemSize.paddingTop +\n elemSize.borderTopWidth + elemSize.borderBottomWidth;\n }\n\n measure = Math.max( measure, 0 );\n this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';\n};\n\n/**\n * emit eventComplete on a collection of items events\n * @param {String} eventName\n * @param {Array} items - Outlayer.Items\n */\nproto._emitCompleteOnItems = function( eventName, items ) {\n var _this = this;\n function onComplete() {\n _this.dispatchEvent( eventName + 'Complete', null, [ items ] );\n }\n\n var count = items.length;\n if ( !items || !count ) {\n onComplete();\n return;\n }\n\n var doneCount = 0;\n function tick() {\n doneCount++;\n if ( doneCount == count ) {\n onComplete();\n }\n }\n\n // bind callback\n items.forEach( function( item ) {\n item.once( eventName, tick );\n });\n};\n\n/**\n * emits events via EvEmitter and jQuery events\n * @param {String} type - name of event\n * @param {Event} event - original event\n * @param {Array} args - extra arguments\n */\nproto.dispatchEvent = function( type, event, args ) {\n // add original event to arguments\n var emitArgs = event ? [ event ].concat( args ) : args;\n this.emitEvent( type, emitArgs );\n\n if ( jQuery ) {\n // set this.$element\n this.$element = this.$element || jQuery( this.element );\n if ( event ) {\n // create jQuery event\n var $event = jQuery.Event( event );\n $event.type = type;\n this.$element.trigger( $event, args );\n } else {\n // just trigger with type if no event available\n this.$element.trigger( type, args );\n }\n }\n};\n\n// -------------------------- ignore & stamps -------------------------- //\n\n\n/**\n * keep item in collection, but do not lay it out\n * ignored items do not get skipped in layout\n * @param {Element} elem\n */\nproto.ignore = function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n item.isIgnored = true;\n }\n};\n\n/**\n * return item to layout collection\n * @param {Element} elem\n */\nproto.unignore = function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n delete item.isIgnored;\n }\n};\n\n/**\n * adds elements to stamps\n * @param {NodeList, Array, Element, or String} elems\n */\nproto.stamp = function( elems ) {\n elems = this._find( elems );\n if ( !elems ) {\n return;\n }\n\n this.stamps = this.stamps.concat( elems );\n // ignore\n elems.forEach( this.ignore, this );\n};\n\n/**\n * removes elements to stamps\n * @param {NodeList, Array, or Element} elems\n */\nproto.unstamp = function( elems ) {\n elems = this._find( elems );\n if ( !elems ){\n return;\n }\n\n elems.forEach( function( elem ) {\n // filter out removed stamp elements\n utils.removeFrom( this.stamps, elem );\n this.unignore( elem );\n }, this );\n};\n\n/**\n * finds child elements\n * @param {NodeList, Array, Element, or String} elems\n * @returns {Array} elems\n */\nproto._find = function( elems ) {\n if ( !elems ) {\n return;\n }\n // if string, use argument as selector string\n if ( typeof elems == 'string' ) {\n elems = this.element.querySelectorAll( elems );\n }\n elems = utils.makeArray( elems );\n return elems;\n};\n\nproto._manageStamps = function() {\n if ( !this.stamps || !this.stamps.length ) {\n return;\n }\n\n this._getBoundingRect();\n\n this.stamps.forEach( this._manageStamp, this );\n};\n\n// update boundingLeft / Top\nproto._getBoundingRect = function() {\n // get bounding rect for container element\n var boundingRect = this.element.getBoundingClientRect();\n var size = this.size;\n this._boundingRect = {\n left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,\n top: boundingRect.top + size.paddingTop + size.borderTopWidth,\n right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),\n bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )\n };\n};\n\n/**\n * @param {Element} stamp\n**/\nproto._manageStamp = noop;\n\n/**\n * get x/y position of element relative to container element\n * @param {Element} elem\n * @returns {Object} offset - has left, top, right, bottom\n */\nproto._getElementOffset = function( elem ) {\n var boundingRect = elem.getBoundingClientRect();\n var thisRect = this._boundingRect;\n var size = getSize( elem );\n var offset = {\n left: boundingRect.left - thisRect.left - size.marginLeft,\n top: boundingRect.top - thisRect.top - size.marginTop,\n right: thisRect.right - boundingRect.right - size.marginRight,\n bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom\n };\n return offset;\n};\n\n// -------------------------- resize -------------------------- //\n\n// enable event handlers for listeners\n// i.e. resize -> onresize\nproto.handleEvent = utils.handleEvent;\n\n/**\n * Bind layout to window resizing\n */\nproto.bindResize = function() {\n window.addEventListener( 'resize', this );\n this.isResizeBound = true;\n};\n\n/**\n * Unbind layout to window resizing\n */\nproto.unbindResize = function() {\n window.removeEventListener( 'resize', this );\n this.isResizeBound = false;\n};\n\nproto.onresize = function() {\n this.resize();\n};\n\nutils.debounceMethod( Outlayer, 'onresize', 100 );\n\nproto.resize = function() {\n // don't trigger if size did not change\n // or if resize was unbound. See #9\n if ( !this.isResizeBound || !this.needsResizeLayout() ) {\n return;\n }\n\n this.layout();\n};\n\n/**\n * check if layout is needed post layout\n * @returns Boolean\n */\nproto.needsResizeLayout = function() {\n var size = getSize( this.element );\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var hasSizes = this.size && size;\n return hasSizes && size.innerWidth !== this.size.innerWidth;\n};\n\n// -------------------------- methods -------------------------- //\n\n/**\n * add items to Outlayer instance\n * @param {Array or NodeList or Element} elems\n * @returns {Array} items - Outlayer.Items\n**/\nproto.addItems = function( elems ) {\n var items = this._itemize( elems );\n // add items to collection\n if ( items.length ) {\n this.items = this.items.concat( items );\n }\n return items;\n};\n\n/**\n * Layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\nproto.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // layout and reveal just the new items\n this.layoutItems( items, true );\n this.reveal( items );\n};\n\n/**\n * Layout prepended elements\n * @param {Array or NodeList or Element} elems\n */\nproto.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n this.layoutItems( items, true );\n this.reveal( items );\n // layout previous items\n this.layoutItems( previousItems );\n};\n\n/**\n * reveal a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.reveal = function( items ) {\n this._emitCompleteOnItems( 'reveal', items );\n if ( !items || !items.length ) {\n return;\n }\n var stagger = this.updateStagger();\n items.forEach( function( item, i ) {\n item.stagger( i * stagger );\n item.reveal();\n });\n};\n\n/**\n * hide a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.hide = function( items ) {\n this._emitCompleteOnItems( 'hide', items );\n if ( !items || !items.length ) {\n return;\n }\n var stagger = this.updateStagger();\n items.forEach( function( item, i ) {\n item.stagger( i * stagger );\n item.hide();\n });\n};\n\n/**\n * reveal item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.revealItemElements = function( elems ) {\n var items = this.getItems( elems );\n this.reveal( items );\n};\n\n/**\n * hide item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.hideItemElements = function( elems ) {\n var items = this.getItems( elems );\n this.hide( items );\n};\n\n/**\n * get Outlayer.Item, given an Element\n * @param {Element} elem\n * @param {Function} callback\n * @returns {Outlayer.Item} item\n */\nproto.getItem = function( elem ) {\n // loop through items to get the one that matches\n for ( var i=0; i < this.items.length; i++ ) {\n var item = this.items[i];\n if ( item.element == elem ) {\n // return item\n return item;\n }\n }\n};\n\n/**\n * get collection of Outlayer.Items, given Elements\n * @param {Array} elems\n * @returns {Array} items - Outlayer.Items\n */\nproto.getItems = function( elems ) {\n elems = utils.makeArray( elems );\n var items = [];\n elems.forEach( function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n items.push( item );\n }\n }, this );\n\n return items;\n};\n\n/**\n * remove element(s) from instance and DOM\n * @param {Array or NodeList or Element} elems\n */\nproto.remove = function( elems ) {\n var removeItems = this.getItems( elems );\n\n this._emitCompleteOnItems( 'remove', removeItems );\n\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n\n removeItems.forEach( function( item ) {\n item.remove();\n // remove item from collection\n utils.removeFrom( this.items, item );\n }, this );\n};\n\n// ----- destroy ----- //\n\n// remove and disable Outlayer instance\nproto.destroy = function() {\n // clean up dynamic styles\n var style = this.element.style;\n style.height = '';\n style.position = '';\n style.width = '';\n // destroy items\n this.items.forEach( function( item ) {\n item.destroy();\n });\n\n this.unbindResize();\n\n var id = this.element.outlayerGUID;\n delete instances[ id ]; // remove reference to instance by id\n delete this.element.outlayerGUID;\n // remove data for jQuery\n if ( jQuery ) {\n jQuery.removeData( this.element, this.constructor.namespace );\n }\n\n};\n\n// -------------------------- data -------------------------- //\n\n/**\n * get Outlayer instance from element\n * @param {Element} elem\n * @returns {Outlayer}\n */\nOutlayer.data = function( elem ) {\n elem = utils.getQueryElement( elem );\n var id = elem && elem.outlayerGUID;\n return id && instances[ id ];\n};\n\n\n// -------------------------- create Outlayer class -------------------------- //\n\n/**\n * create a layout class\n * @param {String} namespace\n */\nOutlayer.create = function( namespace, options ) {\n // sub-class Outlayer\n var Layout = subclass( Outlayer );\n // apply new options and compatOptions\n Layout.defaults = utils.extend( {}, Outlayer.defaults );\n utils.extend( Layout.defaults, options );\n Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );\n\n Layout.namespace = namespace;\n\n Layout.data = Outlayer.data;\n\n // sub-class Item\n Layout.Item = subclass( Item );\n\n // -------------------------- declarative -------------------------- //\n\n utils.htmlInit( Layout, namespace );\n\n // -------------------------- jQuery bridge -------------------------- //\n\n // make into jQuery plugin\n if ( jQuery && jQuery.bridget ) {\n jQuery.bridget( namespace, Layout );\n }\n\n return Layout;\n};\n\nfunction subclass( Parent ) {\n function SubClass() {\n Parent.apply( this, arguments );\n }\n\n SubClass.prototype = Object.create( Parent.prototype );\n SubClass.prototype.constructor = SubClass;\n\n return SubClass;\n}\n\n// ----- helpers ----- //\n\n// how many milliseconds are in each unit\nvar msUnits = {\n ms: 1,\n s: 1000\n};\n\n// munge time-like parameter into millisecond number\n// '0.4s' -> 40\nfunction getMilliseconds( time ) {\n if ( typeof time == 'number' ) {\n return time;\n }\n var matches = time.match( /(^\\d*\\.?\\d*)(\\w*)/ );\n var num = matches && matches[1];\n var unit = matches && matches[2];\n if ( !num.length ) {\n return 0;\n }\n num = parseFloat( num );\n var mult = msUnits[ unit ] || 1;\n return num * mult;\n}\n\n// ----- fin ----- //\n\n// back in global\nOutlayer.Item = Item;\n\nreturn Outlayer;\n\n}));\n","/*!\n * Unipointer v2.3.0\n * base class for doing one thing with pointer event\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true, strict: true */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*global define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'ev-emitter/ev-emitter'\n ], function( EvEmitter ) {\n return factory( window, EvEmitter );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('ev-emitter')\n );\n } else {\n // browser global\n window.Unipointer = factory(\n window,\n window.EvEmitter\n );\n }\n\n}( window, function factory( window, EvEmitter ) {\n\n'use strict';\n\nfunction noop() {}\n\nfunction Unipointer() {}\n\n// inherit EvEmitter\nvar proto = Unipointer.prototype = Object.create( EvEmitter.prototype );\n\nproto.bindStartEvent = function( elem ) {\n this._bindStartEvent( elem, true );\n};\n\nproto.unbindStartEvent = function( elem ) {\n this._bindStartEvent( elem, false );\n};\n\n/**\n * Add or remove start event\n * @param {Boolean} isAdd - remove if falsey\n */\nproto._bindStartEvent = function( elem, isAdd ) {\n // munge isAdd, default to true\n isAdd = isAdd === undefined ? true : isAdd;\n var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';\n\n // default to mouse events\n var startEvent = 'mousedown';\n if ( window.PointerEvent ) {\n // Pointer Events\n startEvent = 'pointerdown';\n } else if ( 'ontouchstart' in window ) {\n // Touch Events. iOS Safari\n startEvent = 'touchstart';\n }\n elem[ bindMethod ]( startEvent, this );\n};\n\n// trigger handler methods for events\nproto.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\n// returns the touch that we're keeping track of\nproto.getTouch = function( touches ) {\n for ( var i=0; i < touches.length; i++ ) {\n var touch = touches[i];\n if ( touch.identifier == this.pointerIdentifier ) {\n return touch;\n }\n }\n};\n\n// ----- start event ----- //\n\nproto.onmousedown = function( event ) {\n // dismiss clicks from right or middle buttons\n var button = event.button;\n if ( button && ( button !== 0 && button !== 1 ) ) {\n return;\n }\n this._pointerDown( event, event );\n};\n\nproto.ontouchstart = function( event ) {\n this._pointerDown( event, event.changedTouches[0] );\n};\n\nproto.onpointerdown = function( event ) {\n this._pointerDown( event, event );\n};\n\n/**\n * pointer start\n * @param {Event} event\n * @param {Event or Touch} pointer\n */\nproto._pointerDown = function( event, pointer ) {\n // dismiss right click and other pointers\n // button = 0 is okay, 1-4 not\n if ( event.button || this.isPointerDown ) {\n return;\n }\n\n this.isPointerDown = true;\n // save pointer identifier to match up touch events\n this.pointerIdentifier = pointer.pointerId !== undefined ?\n // pointerId for pointer events, touch.indentifier for touch events\n pointer.pointerId : pointer.identifier;\n\n this.pointerDown( event, pointer );\n};\n\nproto.pointerDown = function( event, pointer ) {\n this._bindPostStartEvents( event );\n this.emitEvent( 'pointerDown', [ event, pointer ] );\n};\n\n// hash of events to be bound after start event\nvar postStartEvents = {\n mousedown: [ 'mousemove', 'mouseup' ],\n touchstart: [ 'touchmove', 'touchend', 'touchcancel' ],\n pointerdown: [ 'pointermove', 'pointerup', 'pointercancel' ],\n};\n\nproto._bindPostStartEvents = function( event ) {\n if ( !event ) {\n return;\n }\n // get proper events to match start event\n var events = postStartEvents[ event.type ];\n // bind events to node\n events.forEach( function( eventName ) {\n window.addEventListener( eventName, this );\n }, this );\n // save these arguments\n this._boundPointerEvents = events;\n};\n\nproto._unbindPostStartEvents = function() {\n // check for _boundEvents, in case dragEnd triggered twice (old IE8 bug)\n if ( !this._boundPointerEvents ) {\n return;\n }\n this._boundPointerEvents.forEach( function( eventName ) {\n window.removeEventListener( eventName, this );\n }, this );\n\n delete this._boundPointerEvents;\n};\n\n// ----- move event ----- //\n\nproto.onmousemove = function( event ) {\n this._pointerMove( event, event );\n};\n\nproto.onpointermove = function( event ) {\n if ( event.pointerId == this.pointerIdentifier ) {\n this._pointerMove( event, event );\n }\n};\n\nproto.ontouchmove = function( event ) {\n var touch = this.getTouch( event.changedTouches );\n if ( touch ) {\n this._pointerMove( event, touch );\n }\n};\n\n/**\n * pointer move\n * @param {Event} event\n * @param {Event or Touch} pointer\n * @private\n */\nproto._pointerMove = function( event, pointer ) {\n this.pointerMove( event, pointer );\n};\n\n// public\nproto.pointerMove = function( event, pointer ) {\n this.emitEvent( 'pointerMove', [ event, pointer ] );\n};\n\n// ----- end event ----- //\n\n\nproto.onmouseup = function( event ) {\n this._pointerUp( event, event );\n};\n\nproto.onpointerup = function( event ) {\n if ( event.pointerId == this.pointerIdentifier ) {\n this._pointerUp( event, event );\n }\n};\n\nproto.ontouchend = function( event ) {\n var touch = this.getTouch( event.changedTouches );\n if ( touch ) {\n this._pointerUp( event, touch );\n }\n};\n\n/**\n * pointer up\n * @param {Event} event\n * @param {Event or Touch} pointer\n * @private\n */\nproto._pointerUp = function( event, pointer ) {\n this._pointerDone();\n this.pointerUp( event, pointer );\n};\n\n// public\nproto.pointerUp = function( event, pointer ) {\n this.emitEvent( 'pointerUp', [ event, pointer ] );\n};\n\n// ----- pointer done ----- //\n\n// triggered on pointer up & pointer cancel\nproto._pointerDone = function() {\n this._pointerReset();\n this._unbindPostStartEvents();\n this.pointerDone();\n};\n\nproto._pointerReset = function() {\n // reset properties\n this.isPointerDown = false;\n delete this.pointerIdentifier;\n};\n\nproto.pointerDone = noop;\n\n// ----- pointer cancel ----- //\n\nproto.onpointercancel = function( event ) {\n if ( event.pointerId == this.pointerIdentifier ) {\n this._pointerCancel( event, event );\n }\n};\n\nproto.ontouchcancel = function( event ) {\n var touch = this.getTouch( event.changedTouches );\n if ( touch ) {\n this._pointerCancel( event, touch );\n }\n};\n\n/**\n * pointer cancel\n * @param {Event} event\n * @param {Event or Touch} pointer\n * @private\n */\nproto._pointerCancel = function( event, pointer ) {\n this._pointerDone();\n this.pointerCancel( event, pointer );\n};\n\n// public\nproto.pointerCancel = function( event, pointer ) {\n this.emitEvent( 'pointerCancel', [ event, pointer ] );\n};\n\n// ----- ----- //\n\n// utility function for getting x/y coords from event\nUnipointer.getPointerPoint = function( pointer ) {\n return {\n x: pointer.pageX,\n y: pointer.pageY\n };\n};\n\n// ----- ----- //\n\nreturn Unipointer;\n\n}));\n","/*!\n * Unidragger v2.3.1\n * Draggable base class\n * MIT license\n */\n\n/*jshint browser: true, unused: true, undef: true, strict: true */\n\n( function( window, factory ) {\n // universal module definition\n /*jshint strict: false */ /*globals define, module, require */\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'unipointer/unipointer'\n ], function( Unipointer ) {\n return factory( window, Unipointer );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('unipointer')\n );\n } else {\n // browser global\n window.Unidragger = factory(\n window,\n window.Unipointer\n );\n }\n\n}( window, function factory( window, Unipointer ) {\n\n'use strict';\n\n// -------------------------- Unidragger -------------------------- //\n\nfunction Unidragger() {}\n\n// inherit Unipointer & EvEmitter\nvar proto = Unidragger.prototype = Object.create( Unipointer.prototype );\n\n// ----- bind start ----- //\n\nproto.bindHandles = function() {\n this._bindHandles( true );\n};\n\nproto.unbindHandles = function() {\n this._bindHandles( false );\n};\n\n/**\n * Add or remove start event\n * @param {Boolean} isAdd\n */\nproto._bindHandles = function( isAdd ) {\n // munge isAdd, default to true\n isAdd = isAdd === undefined ? true : isAdd;\n // bind each handle\n var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';\n var touchAction = isAdd ? this._touchActionValue : '';\n for ( var i=0; i < this.handles.length; i++ ) {\n var handle = this.handles[i];\n this._bindStartEvent( handle, isAdd );\n handle[ bindMethod ]( 'click', this );\n // touch-action: none to override browser touch gestures. metafizzy/flickity#540\n if ( window.PointerEvent ) {\n handle.style.touchAction = touchAction;\n }\n }\n};\n\n// prototype so it can be overwriteable by Flickity\nproto._touchActionValue = 'none';\n\n// ----- start event ----- //\n\n/**\n * pointer start\n * @param {Event} event\n * @param {Event or Touch} pointer\n */\nproto.pointerDown = function( event, pointer ) {\n var isOkay = this.okayPointerDown( event );\n if ( !isOkay ) {\n return;\n }\n // track start event position\n // Safari 9 overrides pageX and pageY. These values needs to be copied. flickity#842\n this.pointerDownPointer = {\n pageX: pointer.pageX,\n pageY: pointer.pageY,\n };\n\n event.preventDefault();\n this.pointerDownBlur();\n // bind move and end events\n this._bindPostStartEvents( event );\n this.emitEvent( 'pointerDown', [ event, pointer ] );\n};\n\n// nodes that have text fields\nvar cursorNodes = {\n TEXTAREA: true,\n INPUT: true,\n SELECT: true,\n OPTION: true,\n};\n\n// input types that do not have text fields\nvar clickTypes = {\n radio: true,\n checkbox: true,\n button: true,\n submit: true,\n image: true,\n file: true,\n};\n\n// dismiss inputs with text fields. flickity#403, flickity#404\nproto.okayPointerDown = function( event ) {\n var isCursorNode = cursorNodes[ event.target.nodeName ];\n var isClickType = clickTypes[ event.target.type ];\n var isOkay = !isCursorNode || isClickType;\n if ( !isOkay ) {\n this._pointerReset();\n }\n return isOkay;\n};\n\n// kludge to blur previously focused input\nproto.pointerDownBlur = function() {\n var focused = document.activeElement;\n // do not blur body for IE10, metafizzy/flickity#117\n var canBlur = focused && focused.blur && focused != document.body;\n if ( canBlur ) {\n focused.blur();\n }\n};\n\n// ----- move event ----- //\n\n/**\n * drag move\n * @param {Event} event\n * @param {Event or Touch} pointer\n */\nproto.pointerMove = function( event, pointer ) {\n var moveVector = this._dragPointerMove( event, pointer );\n this.emitEvent( 'pointerMove', [ event, pointer, moveVector ] );\n this._dragMove( event, pointer, moveVector );\n};\n\n// base pointer move logic\nproto._dragPointerMove = function( event, pointer ) {\n var moveVector = {\n x: pointer.pageX - this.pointerDownPointer.pageX,\n y: pointer.pageY - this.pointerDownPointer.pageY\n };\n // start drag if pointer has moved far enough to start drag\n if ( !this.isDragging && this.hasDragStarted( moveVector ) ) {\n this._dragStart( event, pointer );\n }\n return moveVector;\n};\n\n// condition if pointer has moved far enough to start drag\nproto.hasDragStarted = function( moveVector ) {\n return Math.abs( moveVector.x ) > 3 || Math.abs( moveVector.y ) > 3;\n};\n\n// ----- end event ----- //\n\n/**\n * pointer up\n * @param {Event} event\n * @param {Event or Touch} pointer\n */\nproto.pointerUp = function( event, pointer ) {\n this.emitEvent( 'pointerUp', [ event, pointer ] );\n this._dragPointerUp( event, pointer );\n};\n\nproto._dragPointerUp = function( event, pointer ) {\n if ( this.isDragging ) {\n this._dragEnd( event, pointer );\n } else {\n // pointer didn't move enough for drag to start\n this._staticClick( event, pointer );\n }\n};\n\n// -------------------------- drag -------------------------- //\n\n// dragStart\nproto._dragStart = function( event, pointer ) {\n this.isDragging = true;\n // prevent clicks\n this.isPreventingClicks = true;\n this.dragStart( event, pointer );\n};\n\nproto.dragStart = function( event, pointer ) {\n this.emitEvent( 'dragStart', [ event, pointer ] );\n};\n\n// dragMove\nproto._dragMove = function( event, pointer, moveVector ) {\n // do not drag if not dragging yet\n if ( !this.isDragging ) {\n return;\n }\n\n this.dragMove( event, pointer, moveVector );\n};\n\nproto.dragMove = function( event, pointer, moveVector ) {\n event.preventDefault();\n this.emitEvent( 'dragMove', [ event, pointer, moveVector ] );\n};\n\n// dragEnd\nproto._dragEnd = function( event, pointer ) {\n // set flags\n this.isDragging = false;\n // re-enable clicking async\n setTimeout( function() {\n delete this.isPreventingClicks;\n }.bind( this ) );\n\n this.dragEnd( event, pointer );\n};\n\nproto.dragEnd = function( event, pointer ) {\n this.emitEvent( 'dragEnd', [ event, pointer ] );\n};\n\n// ----- onclick ----- //\n\n// handle all clicks and prevent clicks when dragging\nproto.onclick = function( event ) {\n if ( this.isPreventingClicks ) {\n event.preventDefault();\n }\n};\n\n// ----- staticClick ----- //\n\n// triggered after pointer down & up with no/tiny movement\nproto._staticClick = function( event, pointer ) {\n // ignore emulated mouse up clicks\n if ( this.isIgnoringMouseUp && event.type == 'mouseup' ) {\n return;\n }\n\n this.staticClick( event, pointer );\n\n // set flag for emulated clicks 300ms after touchend\n if ( event.type != 'mouseup' ) {\n this.isIgnoringMouseUp = true;\n // reset flag after 300ms\n setTimeout( function() {\n delete this.isIgnoringMouseUp;\n }.bind( this ), 400 );\n }\n};\n\nproto.staticClick = function( event, pointer ) {\n this.emitEvent( 'staticClick', [ event, pointer ] );\n};\n\n// ----- utils ----- //\n\nUnidragger.getPointerPoint = Unipointer.getPointerPoint;\n\n// ----- ----- //\n\nreturn Unidragger;\n\n}));\n","var objectExtend = extend;\n\n/*\n var obj = {a: 3, b: 5};\n extend(obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}\n obj; // {a: 4, b: 5, c: 8}\n\n var obj = {a: 3, b: 5};\n extend({}, obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}\n obj; // {a: 3, b: 5}\n\n var arr = [1, 2, 3];\n var obj = {a: 3, b: 5};\n extend(obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}\n arr.push(4);\n obj; // {a: 3, b: 5, c: [1, 2, 3, 4]}\n\n var arr = [1, 2, 3];\n var obj = {a: 3, b: 5};\n extend(true, obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}\n arr.push(4);\n obj; // {a: 3, b: 5, c: [1, 2, 3]}\n\n extend({a: 4, b: 5}); // {a: 4, b: 5}\n extend({a: 4, b: 5}, 3); {a: 4, b: 5}\n extend({a: 4, b: 5}, true); {a: 4, b: 5}\n extend('hello', {a: 4, b: 5}); // throws\n extend(3, {a: 4, b: 5}); // throws\n*/\n\nfunction extend(/* [deep], obj1, obj2, [objn] */) {\n var args = [].slice.call(arguments);\n var deep = false;\n if (typeof args[0] == 'boolean') {\n deep = args.shift();\n }\n var result = args[0];\n if (isUnextendable(result)) {\n throw new Error('extendee must be an object');\n }\n var extenders = args.slice(1);\n var len = extenders.length;\n for (var i = 0; i < len; i++) {\n var extender = extenders[i];\n for (var key in extender) {\n if (Object.prototype.hasOwnProperty.call(extender, key)) {\n var value = extender[key];\n if (deep && isCloneable(value)) {\n var base = Array.isArray(value) ? [] : {};\n result[key] = extend(\n true,\n Object.prototype.hasOwnProperty.call(result, key) && !isUnextendable(result[key])\n ? result[key]\n : base,\n value\n );\n } else {\n result[key] = value;\n }\n }\n }\n }\n return result;\n}\n\nfunction isCloneable(obj) {\n return Array.isArray(obj) || {}.toString.call(obj) == '[object Object]';\n}\n\nfunction isUnextendable(val) {\n return !val || (typeof val != 'object' && typeof val != 'function');\n}\n\nexport {objectExtend as default};\n","import $ewBKy$justextend from \"just-extend\";\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nclass $4040acfd8584338d$export$2e2bcd8739ae039 {\n // Add an event listener for given event\n on(event, fn) {\n this._callbacks = this._callbacks || {\n };\n // Create namespace for this event\n if (!this._callbacks[event]) this._callbacks[event] = [];\n this._callbacks[event].push(fn);\n return this;\n }\n emit(event, ...args) {\n this._callbacks = this._callbacks || {\n };\n let callbacks = this._callbacks[event];\n if (callbacks) for (let callback of callbacks)callback.apply(this, args);\n // trigger a corresponding DOM event\n if (this.element) this.element.dispatchEvent(this.makeEvent(\"dropzone:\" + event, {\n args: args\n }));\n return this;\n }\n makeEvent(eventName, detail) {\n let params = {\n bubbles: true,\n cancelable: true,\n detail: detail\n };\n if (typeof window.CustomEvent === \"function\") return new CustomEvent(eventName, params);\n else {\n // IE 11 support\n // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent\n var evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n }\n // Remove event listener for given event. If fn is not provided, all event\n // listeners for that event will be removed. If neither is provided, all\n // event listeners will be removed.\n off(event, fn) {\n if (!this._callbacks || arguments.length === 0) {\n this._callbacks = {\n };\n return this;\n }\n // specific event\n let callbacks = this._callbacks[event];\n if (!callbacks) return this;\n // remove all handlers\n if (arguments.length === 1) {\n delete this._callbacks[event];\n return this;\n }\n // remove specific handler\n for(let i = 0; i < callbacks.length; i++){\n let callback = callbacks[i];\n if (callback === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n }\n}\n\n\n\nvar $fd6031f88dce2e32$exports = {};\n$fd6031f88dce2e32$exports = \"
\\n
\\n
\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n \\n \\n \\n
\\n
\\n \\n \\n \\n
\\n
\\n\";\n\n\nlet $4ca367182776f80b$var$defaultOptions = {\n /**\n * Has to be specified on elements other than form (or when the form doesn't\n * have an `action` attribute).\n *\n * You can also provide a function that will be called with `files` and\n * `dataBlocks` and must return the url as string.\n */ url: null,\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method (since `v3.12.0`).\n */ method: \"post\",\n /**\n * Will be set on the XHRequest.\n */ withCredentials: false,\n /**\n * The timeout for the XHR requests in milliseconds (since `v4.4.0`).\n * If set to null or 0, no timeout is going to be set.\n */ timeout: null,\n /**\n * How many file uploads to process in parallel (See the\n * Enqueuing file uploads documentation section for more info)\n */ parallelUploads: 2,\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `processingmultiple`). See the events\n * documentation section for more information.\n */ uploadMultiple: false,\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.\n */ chunking: false,\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */ forceChunking: false,\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */ chunkSize: 2097152,\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */ parallelChunkUploads: false,\n /**\n * Whether a chunk should be retried if it fails.\n */ retryChunks: false,\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */ retryChunksLimit: 3,\n /**\n * The maximum filesize (in MiB) that is allowed to be uploaded.\n */ maxFilesize: 256,\n /**\n * The name of the file param that gets transferred.\n * **NOTE**: If you have the option `uploadMultiple` set to `true`, then\n * Dropzone will append `[]` to the name.\n */ paramName: \"file\",\n /**\n * Whether thumbnails for images should be generated\n */ createImageThumbnails: true,\n /**\n * In MB. When the filename exceeds this limit, the thumbnail will not be generated.\n */ maxThumbnailFilesize: 10,\n /**\n * If `null`, the ratio of the image will be used to calculate it.\n */ thumbnailWidth: 120,\n /**\n * The same as `thumbnailWidth`. If both are null, images will not be resized.\n */ thumbnailHeight: 120,\n /**\n * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.\n * Can be either `contain` or `crop`.\n */ thumbnailMethod: \"crop\",\n /**\n * If set, images will be resized to these dimensions before being **uploaded**.\n * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect\n * ratio of the file will be preserved.\n *\n * The `options.transformFile` function uses these options, so if the `transformFile` function\n * is overridden, these options don't do anything.\n */ resizeWidth: null,\n /**\n * See `resizeWidth`.\n */ resizeHeight: null,\n /**\n * The mime type of the resized image (before it gets uploaded to the server).\n * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.\n * See `resizeWidth` for more information.\n */ resizeMimeType: null,\n /**\n * The quality of the resized images. See `resizeWidth`.\n */ resizeQuality: 0.8,\n /**\n * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.\n * Can be either `contain` or `crop`.\n */ resizeMethod: \"contain\",\n /**\n * The base that is used to calculate the **displayed** filesize. You can\n * change this to 1024 if you would rather display kibibytes, mebibytes,\n * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`\n * not `1 kilobyte`. You can change this to `1024` if you don't care about\n * validity.\n */ filesizeBase: 1000,\n /**\n * If not `null` defines how many files this Dropzone handles. If it exceeds,\n * the event `maxfilesexceeded` will be called. The dropzone element gets the\n * class `dz-max-files-reached` accordingly so you can provide visual\n * feedback.\n */ maxFiles: null,\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n */ headers: null,\n /**\n * Should the default headers be set or not?\n * Accept: application/json <- for requesting json response\n * Cache-Control: no-cache <- Request shouldnt be cached\n * X-Requested-With: XMLHttpRequest <- We sent the request via XMLHttpRequest\n */ defaultHeaders: true,\n /**\n * If `true`, the dropzone element itself will be clickable, if `false`\n * nothing will be clickable.\n *\n * You can also pass an HTML element, a CSS selector (for multiple elements)\n * or an array of those. In that case, all of those elements will trigger an\n * upload when clicked.\n */ clickable: true,\n /**\n * Whether hidden files in directories should be ignored.\n */ ignoreHiddenFiles: true,\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * If the Dropzone is `clickable` this option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */ acceptedFiles: null,\n /**\n * **Deprecated!**\n * Use acceptedFiles instead.\n */ acceptedMimeTypes: null,\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `myDropzone.processQueue()`.\n *\n * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation\n * section for more information.\n */ autoProcessQueue: true,\n /**\n * If false, files added to the dropzone will not be queued by default.\n * You'll have to call `enqueueFile(file)` manually.\n */ autoQueue: true,\n /**\n * If `true`, this will add a link to every file preview to remove or cancel (if\n * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`\n * and `dictRemoveFile` options are used for the wording.\n */ addRemoveLinks: false,\n /**\n * Defines where to display the file previews – if `null` the\n * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS\n * selector. The element should have the `dropzone-previews` class so\n * the previews are displayed properly.\n */ previewsContainer: null,\n /**\n * Set this to `true` if you don't want previews to be shown.\n */ disablePreviews: false,\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n *\n * Can be a selector string, or an element directly.\n */ hiddenInputContainer: \"body\",\n /**\n * If null, no capture type will be specified\n * If camera, mobile devices will skip the file selection and choose camera\n * If microphone, mobile devices will skip the file selection and choose the microphone\n * If camcorder, mobile devices will skip the file selection and choose the camera in video mode\n * On apple devices multiple must be set to false. AcceptedFiles may need to\n * be set to an appropriate mime type (e.g. \"image/*\", \"audio/*\", or \"video/*\").\n */ capture: null,\n /**\n * **Deprecated**. Use `renameFile` instead.\n */ renameFilename: null,\n /**\n * A function that is invoked before the file is uploaded to the server and renames the file.\n * This function gets the `File` as argument and can use the `file.name`. The actual name of the\n * file that gets used during the upload can be accessed through `file.upload.filename`.\n */ renameFile: null,\n /**\n * If `true` the fallback will be forced. This is very useful to test your server\n * implementations first and make sure that everything works as\n * expected without dropzone if you experience problems, and to test\n * how your fallbacks will look.\n */ forceFallback: false,\n /**\n * The text used before any files are dropped.\n */ dictDefaultMessage: \"Drop files here to upload\",\n /**\n * The text that replaces the default message text it the browser is not supported.\n */ dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\n /**\n * The text that will be added before the fallback form.\n * If you provide a fallback element yourself, or if this option is `null` this will\n * be ignored.\n */ dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\n /**\n * If the filesize is too big.\n * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.\n */ dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\n /**\n * If the file doesn't match the file type.\n */ dictInvalidFileType: \"You can't upload files of this type.\",\n /**\n * If the server response was invalid.\n * `{{statusCode}}` will be replaced with the servers status code.\n */ dictResponseError: \"Server responded with {{statusCode}} code.\",\n /**\n * If `addRemoveLinks` is true, the text to be used for the cancel upload link.\n */ dictCancelUpload: \"Cancel upload\",\n /**\n * The text that is displayed if an upload was manually canceled\n */ dictUploadCanceled: \"Upload canceled.\",\n /**\n * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.\n */ dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n /**\n * If `addRemoveLinks` is true, the text to be used to remove a file.\n */ dictRemoveFile: \"Remove file\",\n /**\n * If this is not null, then the user will be prompted before removing a file.\n */ dictRemoveFileConfirmation: null,\n /**\n * Displayed if `maxFiles` is st and exceeded.\n * The string `{{maxFiles}}` will be replaced by the configuration value.\n */ dictMaxFilesExceeded: \"You can not upload any more files.\",\n /**\n * Allows you to translate the different units. Starting with `tb` for terabytes and going down to\n * `b` for bytes.\n */ dictFileSizeUnits: {\n tb: \"TB\",\n gb: \"GB\",\n mb: \"MB\",\n kb: \"KB\",\n b: \"b\"\n },\n /**\n * Called when dropzone initialized\n * You can add event listeners here\n */ init () {\n },\n /**\n * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`\n * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case\n * of a function, this needs to return a map.\n *\n * The default implementation does nothing for normal uploads, but adds relevant information for\n * chunked uploads.\n *\n * This is the same as adding hidden input fields in the form element.\n */ params (files, xhr, chunk) {\n if (chunk) return {\n dzuuid: chunk.file.upload.uuid,\n dzchunkindex: chunk.index,\n dztotalfilesize: chunk.file.size,\n dzchunksize: this.options.chunkSize,\n dztotalchunkcount: chunk.file.upload.totalChunkCount,\n dzchunkbyteoffset: chunk.index * this.options.chunkSize\n };\n },\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */ accept (file, done) {\n return done();\n },\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */ chunksUploaded: function(file, done) {\n done();\n },\n /**\n * Sends the file as binary blob in body instead of form data.\n * If this is set, the `params` option will be ignored.\n * It's an error to set this to `true` along with `uploadMultiple` since\n * multiple files cannot be in a single binary body.\n */ binaryBody: false,\n /**\n * Gets called when the browser is not supported.\n * The default implementation shows the fallback input field and adds\n * a text.\n */ fallback () {\n // This code should pass in IE7... :(\n let messageElement;\n this.element.className = `${this.element.className} dz-browser-not-supported`;\n for (let child of this.element.getElementsByTagName(\"div\"))if (/(^| )dz-message($| )/.test(child.className)) {\n messageElement = child;\n child.className = \"dz-message\"; // Removes the 'dz-default' class\n break;\n }\n if (!messageElement) {\n messageElement = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement('
');\n this.element.appendChild(messageElement);\n }\n let span = messageElement.getElementsByTagName(\"span\")[0];\n if (span) {\n if (span.textContent != null) span.textContent = this.options.dictFallbackMessage;\n else if (span.innerText != null) span.innerText = this.options.dictFallbackMessage;\n }\n return this.element.appendChild(this.getFallbackForm());\n },\n /**\n * Gets called to calculate the thumbnail dimensions.\n *\n * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:\n *\n * - `srcWidth` & `srcHeight` (required)\n * - `trgWidth` & `trgHeight` (required)\n * - `srcX` & `srcY` (optional, default `0`)\n * - `trgX` & `trgY` (optional, default `0`)\n *\n * Those values are going to be used by `ctx.drawImage()`.\n */ resize (file, width, height, resizeMethod) {\n let info = {\n srcX: 0,\n srcY: 0,\n srcWidth: file.width,\n srcHeight: file.height\n };\n let srcRatio = file.width / file.height;\n // Automatically calculate dimensions if not specified\n if (width == null && height == null) {\n width = info.srcWidth;\n height = info.srcHeight;\n } else if (width == null) width = height * srcRatio;\n else if (height == null) height = width / srcRatio;\n // Make sure images aren't upscaled\n width = Math.min(width, info.srcWidth);\n height = Math.min(height, info.srcHeight);\n let trgRatio = width / height;\n if (info.srcWidth > width || info.srcHeight > height) {\n // Image is bigger and needs rescaling\n if (resizeMethod === \"crop\") {\n if (srcRatio > trgRatio) {\n info.srcHeight = file.height;\n info.srcWidth = info.srcHeight * trgRatio;\n } else {\n info.srcWidth = file.width;\n info.srcHeight = info.srcWidth / trgRatio;\n }\n } else if (resizeMethod === \"contain\") {\n // Method 'contain'\n if (srcRatio > trgRatio) height = width / srcRatio;\n else width = height * srcRatio;\n } else throw new Error(`Unknown resizeMethod '${resizeMethod}'`);\n }\n info.srcX = (file.width - info.srcWidth) / 2;\n info.srcY = (file.height - info.srcHeight) / 2;\n info.trgWidth = width;\n info.trgHeight = height;\n return info;\n },\n /**\n * Can be used to transform the file (for example, resize an image if necessary).\n *\n * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes\n * images according to those dimensions.\n *\n * Gets the `file` as the first parameter, and a `done()` function as the second, that needs\n * to be invoked with the file when the transformation is done.\n */ transformFile (file, done) {\n if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);\n else return done(file);\n },\n /**\n * A string that contains the template used for each dropped\n * file. Change it to fulfill your needs but make sure to properly\n * provide all elements.\n *\n * If you want to use an actual HTML element instead of providing a String\n * as a config option, you could create a div with the id `tpl`,\n * put the template inside it and provide the element like this:\n *\n * document\n * .querySelector('#tpl')\n * .innerHTML\n *\n */ previewTemplate: (/*@__PURE__*/$parcel$interopDefault($fd6031f88dce2e32$exports)),\n /*\n Those functions register themselves to the events on init and handle all\n the user interface specific stuff. Overwriting them won't break the upload\n but can break the way it's displayed.\n You can overwrite them if you don't like the default behavior. If you just\n want to add an additional event handler, register it on the dropzone object\n and don't overwrite those options.\n */ // Those are self explanatory and simply concern the DragnDrop.\n drop (e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragstart (e) {\n },\n dragend (e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragenter (e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragover (e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragleave (e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n paste (e) {\n },\n // Called whenever there are no files left in the dropzone anymore, and the\n // dropzone should be displayed as if in the initial state.\n reset () {\n return this.element.classList.remove(\"dz-started\");\n },\n // Called when a file is added to the queue\n // Receives `file`\n addedfile (file) {\n if (this.element === this.previewsContainer) this.element.classList.add(\"dz-started\");\n if (this.previewsContainer && !this.options.disablePreviews) {\n file.previewElement = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(this.options.previewTemplate.trim());\n file.previewTemplate = file.previewElement; // Backwards compatibility\n this.previewsContainer.appendChild(file.previewElement);\n for (var node of file.previewElement.querySelectorAll(\"[data-dz-name]\"))node.textContent = file.name;\n for (node of file.previewElement.querySelectorAll(\"[data-dz-size]\"))node.innerHTML = this.filesize(file.size);\n if (this.options.addRemoveLinks) {\n file._removeLink = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(`${this.options.dictRemoveFile}`);\n file.previewElement.appendChild(file._removeLink);\n }\n let removeFileEvent = (e)=>{\n e.preventDefault();\n e.stopPropagation();\n if (file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING) return $3ed269f2f0fb224b$export$2e2bcd8739ae039.confirm(this.options.dictCancelUploadConfirmation, ()=>this.removeFile(file)\n );\n else {\n if (this.options.dictRemoveFileConfirmation) return $3ed269f2f0fb224b$export$2e2bcd8739ae039.confirm(this.options.dictRemoveFileConfirmation, ()=>this.removeFile(file)\n );\n else return this.removeFile(file);\n }\n };\n for (let removeLink of file.previewElement.querySelectorAll(\"[data-dz-remove]\"))removeLink.addEventListener(\"click\", removeFileEvent);\n }\n },\n // Called whenever a file is removed.\n removedfile (file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) file.previewElement.parentNode.removeChild(file.previewElement);\n return this._updateMaxFilesReachedClass();\n },\n // Called when a thumbnail has been generated\n // Receives `file` and `dataUrl`\n thumbnail (file, dataUrl) {\n if (file.previewElement) {\n file.previewElement.classList.remove(\"dz-file-preview\");\n for (let thumbnailElement of file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\")){\n thumbnailElement.alt = file.name;\n thumbnailElement.src = dataUrl;\n }\n return setTimeout(()=>file.previewElement.classList.add(\"dz-image-preview\")\n , 1);\n }\n },\n // Called whenever an error occurs\n // Receives `file` and `message`\n error (file, message) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n if (typeof message !== \"string\" && message.error) message = message.error;\n for (let node of file.previewElement.querySelectorAll(\"[data-dz-errormessage]\"))node.textContent = message;\n }\n },\n errormultiple () {\n },\n // Called when a file gets processed. Since there is a cue, not all added\n // files are processed immediately.\n // Receives `file`\n processing (file) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-processing\");\n if (file._removeLink) return file._removeLink.innerHTML = this.options.dictCancelUpload;\n }\n },\n processingmultiple () {\n },\n // Called whenever the upload progress gets updated.\n // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.\n // To get the total number of bytes of the file, use `file.size`\n uploadprogress (file, progress, bytesSent) {\n if (file.previewElement) for (let node of file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\"))node.nodeName === \"PROGRESS\" ? node.value = progress : node.style.width = `${progress}%`;\n },\n // Called whenever the total upload progress gets updated.\n // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent\n totaluploadprogress () {\n },\n // Called just before the file is sent. Gets the `xhr` object as second\n // parameter, so you can modify it (for example to add a CSRF token) and a\n // `formData` object to add additional information.\n sending () {\n },\n sendingmultiple () {\n },\n // When the complete upload is finished and successful\n // Receives `file`\n success (file) {\n if (file.previewElement) return file.previewElement.classList.add(\"dz-success\");\n },\n successmultiple () {\n },\n // When the upload is canceled.\n canceled (file) {\n return this.emit(\"error\", file, this.options.dictUploadCanceled);\n },\n canceledmultiple () {\n },\n // When the upload is finished, either with success or an error.\n // Receives `file`\n complete (file) {\n if (file._removeLink) file._removeLink.innerHTML = this.options.dictRemoveFile;\n if (file.previewElement) return file.previewElement.classList.add(\"dz-complete\");\n },\n completemultiple () {\n },\n maxfilesexceeded () {\n },\n maxfilesreached () {\n },\n queuecomplete () {\n },\n addedfiles () {\n }\n};\nvar $4ca367182776f80b$export$2e2bcd8739ae039 = $4ca367182776f80b$var$defaultOptions;\n\n\nclass $3ed269f2f0fb224b$export$2e2bcd8739ae039 extends $4040acfd8584338d$export$2e2bcd8739ae039 {\n static initClass() {\n // Exposing the emitter class, mainly for tests\n this.prototype.Emitter = $4040acfd8584338d$export$2e2bcd8739ae039;\n /*\n This is a list of all available events you can register on a dropzone object.\n\n You can register an event handler like this:\n\n dropzone.on(\"dragEnter\", function() { });\n\n */ this.prototype.events = [\n \"drop\",\n \"dragstart\",\n \"dragend\",\n \"dragenter\",\n \"dragover\",\n \"dragleave\",\n \"addedfile\",\n \"addedfiles\",\n \"removedfile\",\n \"thumbnail\",\n \"error\",\n \"errormultiple\",\n \"processing\",\n \"processingmultiple\",\n \"uploadprogress\",\n \"totaluploadprogress\",\n \"sending\",\n \"sendingmultiple\",\n \"success\",\n \"successmultiple\",\n \"canceled\",\n \"canceledmultiple\",\n \"complete\",\n \"completemultiple\",\n \"reset\",\n \"maxfilesexceeded\",\n \"maxfilesreached\",\n \"queuecomplete\", \n ];\n this.prototype._thumbnailQueue = [];\n this.prototype._processingThumbnail = false;\n }\n // Returns all files that have been accepted\n getAcceptedFiles() {\n return this.files.filter((file)=>file.accepted\n ).map((file)=>file\n );\n }\n // Returns all files that have been rejected\n // Not sure when that's going to be useful, but added for completeness.\n getRejectedFiles() {\n return this.files.filter((file)=>!file.accepted\n ).map((file)=>file\n );\n }\n getFilesWithStatus(status) {\n return this.files.filter((file)=>file.status === status\n ).map((file)=>file\n );\n }\n // Returns all files that are in the queue\n getQueuedFiles() {\n return this.getFilesWithStatus($3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED);\n }\n getUploadingFiles() {\n return this.getFilesWithStatus($3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING);\n }\n getAddedFiles() {\n return this.getFilesWithStatus($3ed269f2f0fb224b$export$2e2bcd8739ae039.ADDED);\n }\n // Files that are either queued or uploading\n getActiveFiles() {\n return this.files.filter((file)=>file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING || file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED\n ).map((file)=>file\n );\n }\n // The function that gets called when Dropzone is initialized. You\n // can (and should) setup event listeners inside this function.\n init() {\n // In case it isn't set already\n if (this.element.tagName === \"form\") this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) this.element.appendChild($3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(`
`));\n if (this.clickableElements.length) {\n let setupHiddenFileInput = ()=>{\n if (this.hiddenFileInput) this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n this.hiddenFileInput = document.createElement(\"input\");\n this.hiddenFileInput.setAttribute(\"type\", \"file\");\n if (this.options.maxFiles === null || this.options.maxFiles > 1) this.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\n this.hiddenFileInput.className = \"dz-hidden-input\";\n if (this.options.acceptedFiles !== null) this.hiddenFileInput.setAttribute(\"accept\", this.options.acceptedFiles);\n if (this.options.capture !== null) this.hiddenFileInput.setAttribute(\"capture\", this.options.capture);\n // Making sure that no one can \"tab\" into this field.\n this.hiddenFileInput.setAttribute(\"tabindex\", \"-1\");\n // Not setting `display=\"none\"` because some browsers don't accept clicks\n // on elements that aren't displayed.\n this.hiddenFileInput.style.visibility = \"hidden\";\n this.hiddenFileInput.style.position = \"absolute\";\n this.hiddenFileInput.style.top = \"0\";\n this.hiddenFileInput.style.left = \"0\";\n this.hiddenFileInput.style.height = \"0\";\n this.hiddenFileInput.style.width = \"0\";\n $3ed269f2f0fb224b$export$2e2bcd8739ae039.getElement(this.options.hiddenInputContainer, \"hiddenInputContainer\").appendChild(this.hiddenFileInput);\n this.hiddenFileInput.addEventListener(\"change\", ()=>{\n let { files: files } = this.hiddenFileInput;\n if (files.length) for (let file of files)this.addFile(file);\n this.emit(\"addedfiles\", files);\n setupHiddenFileInput();\n });\n };\n setupHiddenFileInput();\n }\n this.URL = window.URL !== null ? window.URL : window.webkitURL;\n // Setup all event listeners on the Dropzone object itself.\n // They're not in @setupEventListeners() because they shouldn't be removed\n // again when the dropzone gets disabled.\n for (let eventName of this.events)this.on(eventName, this.options[eventName]);\n this.on(\"uploadprogress\", ()=>this.updateTotalUploadProgress()\n );\n this.on(\"removedfile\", ()=>this.updateTotalUploadProgress()\n );\n this.on(\"canceled\", (file)=>this.emit(\"complete\", file)\n );\n // Emit a `queuecomplete` event if all files finished uploading.\n this.on(\"complete\", (file)=>{\n if (this.getAddedFiles().length === 0 && this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) // This needs to be deferred so that `queuecomplete` really triggers after `complete`\n return setTimeout(()=>this.emit(\"queuecomplete\")\n , 0);\n });\n const containsFiles = function(e) {\n if (e.dataTransfer.types) // Because e.dataTransfer.types is an Object in\n // IE, we need to iterate like this instead of\n // using e.dataTransfer.types.some()\n for(var i = 0; i < e.dataTransfer.types.length; i++){\n if (e.dataTransfer.types[i] === \"Files\") return true;\n }\n return false;\n };\n let noPropagation = function(e) {\n // If there are no files, we don't want to stop\n // propagation so we don't interfere with other\n // drag and drop behaviour.\n if (!containsFiles(e)) return;\n e.stopPropagation();\n if (e.preventDefault) return e.preventDefault();\n else return e.returnValue = false;\n };\n // Create the listeners\n this.listeners = [\n {\n element: this.element,\n events: {\n dragstart: (e)=>{\n return this.emit(\"dragstart\", e);\n },\n dragenter: (e)=>{\n noPropagation(e);\n return this.emit(\"dragenter\", e);\n },\n dragover: (e)=>{\n // Makes it possible to drag files from chrome's download bar\n // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar\n // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)\n let efct;\n try {\n efct = e.dataTransfer.effectAllowed;\n } catch (error) {\n }\n e.dataTransfer.dropEffect = \"move\" === efct || \"linkMove\" === efct ? \"move\" : \"copy\";\n noPropagation(e);\n return this.emit(\"dragover\", e);\n },\n dragleave: (e)=>{\n return this.emit(\"dragleave\", e);\n },\n drop: (e)=>{\n noPropagation(e);\n return this.drop(e);\n },\n dragend: (e)=>{\n return this.emit(\"dragend\", e);\n }\n }\n }, \n ];\n this.clickableElements.forEach((clickableElement)=>{\n return this.listeners.push({\n element: clickableElement,\n events: {\n click: (evt)=>{\n // Only the actual dropzone or the message element should trigger file selection\n if (clickableElement !== this.element || evt.target === this.element || $3ed269f2f0fb224b$export$2e2bcd8739ae039.elementInside(evt.target, this.element.querySelector(\".dz-message\"))) this.hiddenFileInput.click(); // Forward the click\n return true;\n }\n }\n });\n });\n this.enable();\n return this.options.init.call(this);\n }\n // Not fully tested yet\n destroy() {\n this.disable();\n this.removeAllFiles(true);\n if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {\n this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n this.hiddenFileInput = null;\n }\n delete this.element.dropzone;\n return $3ed269f2f0fb224b$export$2e2bcd8739ae039.instances.splice($3ed269f2f0fb224b$export$2e2bcd8739ae039.instances.indexOf(this), 1);\n }\n updateTotalUploadProgress() {\n let totalUploadProgress;\n let totalBytesSent = 0;\n let totalBytes = 0;\n let activeFiles = this.getActiveFiles();\n if (activeFiles.length) {\n for (let file of this.getActiveFiles()){\n totalBytesSent += file.upload.bytesSent;\n totalBytes += file.upload.total;\n }\n totalUploadProgress = 100 * totalBytesSent / totalBytes;\n } else totalUploadProgress = 100;\n return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\n }\n // @options.paramName can be a function taking one parameter rather than a string.\n // A parameter name for a file is obtained simply by calling this with an index number.\n _getParamName(n) {\n if (typeof this.options.paramName === \"function\") return this.options.paramName(n);\n else return `${this.options.paramName}${this.options.uploadMultiple ? `[${n}]` : \"\"}`;\n }\n // If @options.renameFile is a function,\n // the function will be used to rename the file.name before appending it to the formData\n _renameFile(file) {\n if (typeof this.options.renameFile !== \"function\") return file.name;\n return this.options.renameFile(file);\n }\n // Returns a form that can be used as fallback if the browser does not support DragnDrop\n //\n // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.\n // This code has to pass in IE7 :(\n getFallbackForm() {\n let existingFallback, form;\n if (existingFallback = this.getExistingFallback()) return existingFallback;\n let fieldsString = '
';\n if (this.options.dictFallbackText) fieldsString += `

${this.options.dictFallbackText}

`;\n fieldsString += `
`;\n let fields = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(fieldsString);\n if (this.element.tagName !== \"FORM\") {\n form = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(`
`);\n form.appendChild(fields);\n } else {\n // Make sure that the enctype and method attributes are set properly\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n this.element.setAttribute(\"method\", this.options.method);\n }\n return form != null ? form : fields;\n }\n // Returns the fallback elements if they exist already\n //\n // This code has to pass in IE7 :(\n getExistingFallback() {\n let getFallback = function(elements) {\n for (let el of elements){\n if (/(^| )fallback($| )/.test(el.className)) return el;\n }\n };\n for (let tagName of [\n \"div\",\n \"form\"\n ]){\n var fallback;\n if (fallback = getFallback(this.element.getElementsByTagName(tagName))) return fallback;\n }\n }\n // Activates all listeners stored in @listeners\n setupEventListeners() {\n return this.listeners.map((elementListeners)=>(()=>{\n let result = [];\n for(let event in elementListeners.events){\n let listener = elementListeners.events[event];\n result.push(elementListeners.element.addEventListener(event, listener, false));\n }\n return result;\n })()\n );\n }\n // Deactivates all listeners stored in @listeners\n removeEventListeners() {\n return this.listeners.map((elementListeners)=>(()=>{\n let result = [];\n for(let event in elementListeners.events){\n let listener = elementListeners.events[event];\n result.push(elementListeners.element.removeEventListener(event, listener, false));\n }\n return result;\n })()\n );\n }\n // Removes all event listeners and cancels all files in the queue or being processed.\n disable() {\n this.clickableElements.forEach((element)=>element.classList.remove(\"dz-clickable\")\n );\n this.removeEventListeners();\n this.disabled = true;\n return this.files.map((file)=>this.cancelUpload(file)\n );\n }\n enable() {\n delete this.disabled;\n this.clickableElements.forEach((element)=>element.classList.add(\"dz-clickable\")\n );\n return this.setupEventListeners();\n }\n // Returns a nicely formatted filesize\n filesize(size) {\n let selectedSize = 0;\n let selectedUnit = \"b\";\n if (size > 0) {\n let units = [\n \"tb\",\n \"gb\",\n \"mb\",\n \"kb\",\n \"b\"\n ];\n for(let i = 0; i < units.length; i++){\n let unit = units[i];\n let cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits\n }\n return `${selectedSize} ${this.options.dictFileSizeUnits[selectedUnit]}`;\n }\n // Adds or removes the `dz-max-files-reached` class from the form.\n _updateMaxFilesReachedClass() {\n if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n if (this.getAcceptedFiles().length === this.options.maxFiles) this.emit(\"maxfilesreached\", this.files);\n return this.element.classList.add(\"dz-max-files-reached\");\n } else return this.element.classList.remove(\"dz-max-files-reached\");\n }\n drop(e) {\n if (!e.dataTransfer) return;\n this.emit(\"drop\", e);\n // Convert the FileList to an Array\n // This is necessary for IE11\n let files = [];\n for(let i = 0; i < e.dataTransfer.files.length; i++)files[i] = e.dataTransfer.files[i];\n // Even if it's a folder, files.length will contain the folders.\n if (files.length) {\n let { items: items } = e.dataTransfer;\n if (items && items.length && items[0].webkitGetAsEntry != null) // The browser supports dropping of folders, so handle items instead of files\n this._addFilesFromItems(items);\n else this.handleFiles(files);\n }\n this.emit(\"addedfiles\", files);\n }\n paste(e) {\n if ($3ed269f2f0fb224b$var$__guard__(e != null ? e.clipboardData : undefined, (x)=>x.items\n ) == null) return;\n this.emit(\"paste\", e);\n let { items: items } = e.clipboardData;\n if (items.length) return this._addFilesFromItems(items);\n }\n handleFiles(files) {\n for (let file of files)this.addFile(file);\n }\n // When a folder is dropped (or files are pasted), items must be handled\n // instead of files.\n _addFilesFromItems(items) {\n return (()=>{\n let result = [];\n for (let item of items){\n var entry;\n if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {\n if (entry.isFile) result.push(this.addFile(item.getAsFile()));\n else if (entry.isDirectory) // Append all files from that directory to files\n result.push(this._addFilesFromDirectory(entry, entry.name));\n else result.push(undefined);\n } else if (item.getAsFile != null) {\n if (item.kind == null || item.kind === \"file\") result.push(this.addFile(item.getAsFile()));\n else result.push(undefined);\n } else result.push(undefined);\n }\n return result;\n })();\n }\n // Goes through the directory, and adds each file it finds recursively\n _addFilesFromDirectory(directory, path) {\n let dirReader = directory.createReader();\n let errorHandler = (error)=>$3ed269f2f0fb224b$var$__guardMethod__(console, \"log\", (o)=>o.log(error)\n )\n ;\n var readEntries = ()=>{\n return dirReader.readEntries((entries)=>{\n if (entries.length > 0) {\n for (let entry of entries){\n if (entry.isFile) entry.file((file)=>{\n if (this.options.ignoreHiddenFiles && file.name.substring(0, 1) === \".\") return;\n file.fullPath = `${path}/${file.name}`;\n return this.addFile(file);\n });\n else if (entry.isDirectory) this._addFilesFromDirectory(entry, `${path}/${entry.name}`);\n }\n // Recursively call readEntries() again, since browser only handle\n // the first 100 entries.\n // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries\n readEntries();\n }\n return null;\n }, errorHandler);\n };\n return readEntries();\n }\n // If `done()` is called without argument the file is accepted\n // If you call it with an error message, the file is rejected\n // (This allows for asynchronous validation)\n //\n // This function checks the filesize, and if the file.type passes the\n // `acceptedFiles` check.\n accept(file, done) {\n if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1048576) done(this.options.dictFileTooBig.replace(\"{{filesize}}\", Math.round(file.size / 1024 / 10.24) / 100).replace(\"{{maxFilesize}}\", this.options.maxFilesize));\n else if (!$3ed269f2f0fb224b$export$2e2bcd8739ae039.isValidFile(file, this.options.acceptedFiles)) done(this.options.dictInvalidFileType);\n else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n done(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\", this.options.maxFiles));\n this.emit(\"maxfilesexceeded\", file);\n } else this.options.accept.call(this, file, done);\n }\n addFile(file) {\n file.upload = {\n uuid: $3ed269f2f0fb224b$export$2e2bcd8739ae039.uuidv4(),\n progress: 0,\n // Setting the total upload size to file.size for the beginning\n // It's actual different than the size to be transmitted.\n total: file.size,\n bytesSent: 0,\n filename: this._renameFile(file)\n };\n this.files.push(file);\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.ADDED;\n this.emit(\"addedfile\", file);\n this._enqueueThumbnail(file);\n this.accept(file, (error)=>{\n if (error) {\n file.accepted = false;\n this._errorProcessing([\n file\n ], error); // Will set the file.status\n } else {\n file.accepted = true;\n if (this.options.autoQueue) this.enqueueFile(file);\n // Will set .accepted = true\n }\n this._updateMaxFilesReachedClass();\n });\n }\n // Wrapper for enqueueFile\n enqueueFiles(files) {\n for (let file of files)this.enqueueFile(file);\n return null;\n }\n enqueueFile(file) {\n if (file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.ADDED && file.accepted === true) {\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED;\n if (this.options.autoProcessQueue) return setTimeout(()=>this.processQueue()\n , 0); // Deferring the call\n } else throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");\n }\n _enqueueThumbnail(file) {\n if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1048576) {\n this._thumbnailQueue.push(file);\n return setTimeout(()=>this._processThumbnailQueue()\n , 0); // Deferring the call\n }\n }\n _processThumbnailQueue() {\n if (this._processingThumbnail || this._thumbnailQueue.length === 0) return;\n this._processingThumbnail = true;\n let file = this._thumbnailQueue.shift();\n return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, (dataUrl)=>{\n this.emit(\"thumbnail\", file, dataUrl);\n this._processingThumbnail = false;\n return this._processThumbnailQueue();\n });\n }\n // Can be called by the user to remove a file\n removeFile(file) {\n if (file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING) this.cancelUpload(file);\n this.files = $3ed269f2f0fb224b$var$without(this.files, file);\n this.emit(\"removedfile\", file);\n if (this.files.length === 0) return this.emit(\"reset\");\n }\n // Removes all files that aren't currently processed from the list\n removeAllFiles(cancelIfNecessary) {\n // Create a copy of files since removeFile() changes the @files array.\n if (cancelIfNecessary == null) cancelIfNecessary = false;\n for (let file of this.files.slice())if (file.status !== $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING || cancelIfNecessary) this.removeFile(file);\n return null;\n }\n // Resizes an image before it gets sent to the server. This function is the default behavior of\n // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with\n // the resized blob.\n resizeImage(file, width, height, resizeMethod, callback) {\n return this.createThumbnail(file, width, height, resizeMethod, true, (dataUrl, canvas)=>{\n if (canvas == null) // The image has not been resized\n return callback(file);\n else {\n let { resizeMimeType: resizeMimeType } = this.options;\n if (resizeMimeType == null) resizeMimeType = file.type;\n let resizedDataURL = canvas.toDataURL(resizeMimeType, this.options.resizeQuality);\n if (resizeMimeType === \"image/jpeg\" || resizeMimeType === \"image/jpg\") // Now add the original EXIF information\n resizedDataURL = $3ed269f2f0fb224b$var$ExifRestore.restore(file.dataURL, resizedDataURL);\n return callback($3ed269f2f0fb224b$export$2e2bcd8739ae039.dataURItoBlob(resizedDataURL));\n }\n });\n }\n createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {\n let fileReader = new FileReader();\n fileReader.onload = ()=>{\n file.dataURL = fileReader.result;\n // Don't bother creating a thumbnail for SVG images since they're vector\n if (file.type === \"image/svg+xml\") {\n if (callback != null) callback(fileReader.result);\n return;\n }\n this.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);\n };\n fileReader.readAsDataURL(file);\n }\n // `mockFile` needs to have these attributes:\n //\n // { name: 'name', size: 12345, imageUrl: '' }\n //\n // `callback` will be invoked when the image has been downloaded and displayed.\n // `crossOrigin` will be added to the `img` tag when accessing the file.\n displayExistingFile(mockFile, imageUrl, callback, crossOrigin, resizeThumbnail = true) {\n this.emit(\"addedfile\", mockFile);\n this.emit(\"complete\", mockFile);\n if (!resizeThumbnail) {\n this.emit(\"thumbnail\", mockFile, imageUrl);\n if (callback) callback();\n } else {\n let onDone = (thumbnail)=>{\n this.emit(\"thumbnail\", mockFile, thumbnail);\n if (callback) callback();\n };\n mockFile.dataURL = imageUrl;\n this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, this.options.fixOrientation, onDone, crossOrigin);\n }\n }\n createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {\n // Not using `new Image` here because of a bug in latest Chrome versions.\n // See https://github.com/enyo/dropzone/pull/226\n let img = document.createElement(\"img\");\n if (crossOrigin) img.crossOrigin = crossOrigin;\n // fixOrientation is not needed anymore with browsers handling imageOrientation\n fixOrientation = getComputedStyle(document.body)[\"imageOrientation\"] == \"from-image\" ? false : fixOrientation;\n img.onload = ()=>{\n let loadExif = (callback)=>callback(1)\n ;\n if (typeof EXIF !== \"undefined\" && EXIF !== null && fixOrientation) loadExif = (callback)=>EXIF.getData(img, function() {\n return callback(EXIF.getTag(this, \"Orientation\"));\n })\n ;\n return loadExif((orientation)=>{\n file.width = img.width;\n file.height = img.height;\n let resizeInfo = this.options.resize.call(this, file, width, height, resizeMethod);\n let canvas = document.createElement(\"canvas\");\n let ctx = canvas.getContext(\"2d\");\n canvas.width = resizeInfo.trgWidth;\n canvas.height = resizeInfo.trgHeight;\n if (orientation > 4) {\n canvas.width = resizeInfo.trgHeight;\n canvas.height = resizeInfo.trgWidth;\n }\n switch(orientation){\n case 2:\n // horizontal flip\n ctx.translate(canvas.width, 0);\n ctx.scale(-1, 1);\n break;\n case 3:\n // 180° rotate left\n ctx.translate(canvas.width, canvas.height);\n ctx.rotate(Math.PI);\n break;\n case 4:\n // vertical flip\n ctx.translate(0, canvas.height);\n ctx.scale(1, -1);\n break;\n case 5:\n // vertical flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.scale(1, -1);\n break;\n case 6:\n // 90° rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(0, -canvas.width);\n break;\n case 7:\n // horizontal flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(canvas.height, -canvas.width);\n ctx.scale(-1, 1);\n break;\n case 8:\n // 90° rotate left\n ctx.rotate(-0.5 * Math.PI);\n ctx.translate(-canvas.height, 0);\n break;\n }\n // This is a bugfix for iOS' scaling bug.\n $3ed269f2f0fb224b$var$drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);\n let thumbnail = canvas.toDataURL(\"image/png\");\n if (callback != null) return callback(thumbnail, canvas);\n });\n };\n if (callback != null) img.onerror = callback;\n return img.src = file.dataURL;\n }\n // Goes through the queue and processes files if there aren't too many already.\n processQueue() {\n let { parallelUploads: parallelUploads } = this.options;\n let processingLength = this.getUploadingFiles().length;\n let i = processingLength;\n // There are already at least as many files uploading than should be\n if (processingLength >= parallelUploads) return;\n let queuedFiles = this.getQueuedFiles();\n if (!(queuedFiles.length > 0)) return;\n if (this.options.uploadMultiple) // The files should be uploaded in one request\n return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\n else while(i < parallelUploads){\n if (!queuedFiles.length) return;\n // Nothing left to process\n this.processFile(queuedFiles.shift());\n i++;\n }\n }\n // Wrapper for `processFiles`\n processFile(file) {\n return this.processFiles([\n file\n ]);\n }\n // Loads the file, then calls finishedLoading()\n processFiles(files) {\n for (let file of files){\n file.processing = true; // Backwards compatibility\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING;\n this.emit(\"processing\", file);\n }\n if (this.options.uploadMultiple) this.emit(\"processingmultiple\", files);\n return this.uploadFiles(files);\n }\n _getFilesWithXhr(xhr) {\n let files;\n return files = this.files.filter((file)=>file.xhr === xhr\n ).map((file)=>file\n );\n }\n // Cancels the file upload and sets the status to CANCELED\n // **if** the file is actually being uploaded.\n // If it's still in the queue, the file is being removed from it and the status\n // set to CANCELED.\n cancelUpload(file) {\n if (file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING) {\n let groupedFiles = this._getFilesWithXhr(file.xhr);\n for (let groupedFile of groupedFiles)groupedFile.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.CANCELED;\n if (typeof file.xhr !== \"undefined\") file.xhr.abort();\n for (let groupedFile1 of groupedFiles)this.emit(\"canceled\", groupedFile1);\n if (this.options.uploadMultiple) this.emit(\"canceledmultiple\", groupedFiles);\n } else if (file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.ADDED || file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED) {\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.CANCELED;\n this.emit(\"canceled\", file);\n if (this.options.uploadMultiple) this.emit(\"canceledmultiple\", [\n file\n ]);\n }\n if (this.options.autoProcessQueue) return this.processQueue();\n }\n resolveOption(option, ...args) {\n if (typeof option === \"function\") return option.apply(this, args);\n return option;\n }\n uploadFile(file) {\n return this.uploadFiles([\n file\n ]);\n }\n uploadFiles(files) {\n this._transformFiles(files, (transformedFiles)=>{\n if (this.options.chunking) {\n // Chunking is not allowed to be used with `uploadMultiple` so we know\n // that there is only __one__file.\n let transformedFile = transformedFiles[0];\n files[0].upload.chunked = this.options.chunking && (this.options.forceChunking || transformedFile.size > this.options.chunkSize);\n files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / this.options.chunkSize);\n }\n if (files[0].upload.chunked) {\n // This file should be sent in chunks!\n // If the chunking option is set, we **know** that there can only be **one** file, since\n // uploadMultiple is not allowed with this option.\n let file = files[0];\n let transformedFile = transformedFiles[0];\n let startedChunkCount = 0;\n file.upload.chunks = [];\n let handleNextChunk = ()=>{\n let chunkIndex = 0;\n // Find the next item in file.upload.chunks that is not defined yet.\n while(file.upload.chunks[chunkIndex] !== undefined)chunkIndex++;\n // This means, that all chunks have already been started.\n if (chunkIndex >= file.upload.totalChunkCount) return;\n startedChunkCount++;\n let start = chunkIndex * this.options.chunkSize;\n let end = Math.min(start + this.options.chunkSize, transformedFile.size);\n let dataBlock = {\n name: this._getParamName(0),\n data: transformedFile.webkitSlice ? transformedFile.webkitSlice(start, end) : transformedFile.slice(start, end),\n filename: file.upload.filename,\n chunkIndex: chunkIndex\n };\n file.upload.chunks[chunkIndex] = {\n file: file,\n index: chunkIndex,\n dataBlock: dataBlock,\n status: $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING,\n progress: 0,\n retries: 0\n };\n this._uploadData(files, [\n dataBlock\n ]);\n };\n file.upload.finishedChunkUpload = (chunk, response)=>{\n let allFinished = true;\n chunk.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.SUCCESS;\n // Clear the data from the chunk\n chunk.dataBlock = null;\n chunk.response = chunk.xhr.responseText;\n chunk.responseHeaders = chunk.xhr.getAllResponseHeaders();\n // Leaving this reference to xhr will cause memory leaks.\n chunk.xhr = null;\n for(let i = 0; i < file.upload.totalChunkCount; i++){\n if (file.upload.chunks[i] === undefined) return handleNextChunk();\n if (file.upload.chunks[i].status !== $3ed269f2f0fb224b$export$2e2bcd8739ae039.SUCCESS) allFinished = false;\n }\n if (allFinished) this.options.chunksUploaded(file, ()=>{\n this._finished(files, response, null);\n });\n };\n if (this.options.parallelChunkUploads) for(let i = 0; i < file.upload.totalChunkCount; i++)handleNextChunk();\n else handleNextChunk();\n } else {\n let dataBlocks = [];\n for(let i = 0; i < files.length; i++)dataBlocks[i] = {\n name: this._getParamName(i),\n data: transformedFiles[i],\n filename: files[i].upload.filename\n };\n this._uploadData(files, dataBlocks);\n }\n });\n }\n /// Returns the right chunk for given file and xhr\n _getChunk(file, xhr) {\n for(let i = 0; i < file.upload.totalChunkCount; i++){\n if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) return file.upload.chunks[i];\n }\n }\n // This function actually uploads the file(s) to the server.\n //\n // If dataBlocks contains the actual data to upload (meaning, that this could\n // either be transformed files, or individual chunks for chunked upload) then\n // they will be used for the actual data to upload.\n _uploadData(files, dataBlocks) {\n let xhr = new XMLHttpRequest();\n // Put the xhr object in the file objects to be able to reference it later.\n for (let file of files)file.xhr = xhr;\n if (files[0].upload.chunked) // Put the xhr object in the right chunk object, so it can be associated\n // later, and found with _getChunk.\n files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;\n let method = this.resolveOption(this.options.method, files, dataBlocks);\n let url = this.resolveOption(this.options.url, files, dataBlocks);\n xhr.open(method, url, true);\n // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8\n let timeout = this.resolveOption(this.options.timeout, files);\n if (timeout) xhr.timeout = this.resolveOption(this.options.timeout, files);\n // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179\n xhr.withCredentials = !!this.options.withCredentials;\n xhr.onload = (e)=>{\n this._finishedUploading(files, xhr, e);\n };\n xhr.ontimeout = ()=>{\n this._handleUploadError(files, xhr, `Request timedout after ${this.options.timeout / 1000} seconds`);\n };\n xhr.onerror = ()=>{\n this._handleUploadError(files, xhr);\n };\n // Some browsers do not have the .upload property\n let progressObj = xhr.upload != null ? xhr.upload : xhr;\n progressObj.onprogress = (e)=>this._updateFilesUploadProgress(files, xhr, e)\n ;\n let headers = this.options.defaultHeaders ? {\n Accept: \"application/json\",\n \"Cache-Control\": \"no-cache\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n } : {\n };\n if (this.options.binaryBody) headers[\"Content-Type\"] = files[0].type;\n if (this.options.headers) $ewBKy$justextend(headers, this.options.headers);\n for(let headerName in headers){\n let headerValue = headers[headerName];\n if (headerValue) xhr.setRequestHeader(headerName, headerValue);\n }\n if (this.options.binaryBody) {\n // Since the file is going to be sent as binary body, it doesn't make\n // any sense to generate `FormData` for it.\n for (let file of files)this.emit(\"sending\", file, xhr);\n if (this.options.uploadMultiple) this.emit(\"sendingmultiple\", files, xhr);\n this.submitRequest(xhr, null, files);\n } else {\n let formData = new FormData();\n // Adding all @options parameters\n if (this.options.params) {\n let additionalParams = this.options.params;\n if (typeof additionalParams === \"function\") additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);\n for(let key in additionalParams){\n let value = additionalParams[key];\n if (Array.isArray(value)) // The additional parameter contains an array,\n // so lets iterate over it to attach each value\n // individually.\n for(let i = 0; i < value.length; i++)formData.append(key, value[i]);\n else formData.append(key, value);\n }\n }\n // Let the user add additional data if necessary\n for (let file of files)this.emit(\"sending\", file, xhr, formData);\n if (this.options.uploadMultiple) this.emit(\"sendingmultiple\", files, xhr, formData);\n this._addFormElementData(formData);\n // Finally add the files\n // Has to be last because some servers (eg: S3) expect the file to be the last parameter\n for(let i = 0; i < dataBlocks.length; i++){\n let dataBlock = dataBlocks[i];\n formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);\n }\n this.submitRequest(xhr, formData, files);\n }\n }\n // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.\n _transformFiles(files, done) {\n let transformedFiles = [];\n // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.\n let doneCounter = 0;\n for(let i = 0; i < files.length; i++)this.options.transformFile.call(this, files[i], (transformedFile)=>{\n transformedFiles[i] = transformedFile;\n if (++doneCounter === files.length) done(transformedFiles);\n });\n }\n // Takes care of adding other input elements of the form to the AJAX request\n _addFormElementData(formData) {\n // Take care of other input elements\n if (this.element.tagName === \"FORM\") for (let input of this.element.querySelectorAll(\"input, textarea, select, button\")){\n let inputName = input.getAttribute(\"name\");\n let inputType = input.getAttribute(\"type\");\n if (inputType) inputType = inputType.toLowerCase();\n // If the input doesn't have a name, we can't use it.\n if (typeof inputName === \"undefined\" || inputName === null) continue;\n if (input.tagName === \"SELECT\" && input.hasAttribute(\"multiple\")) {\n // Possibly multiple values\n for (let option of input.options)if (option.selected) formData.append(inputName, option.value);\n } else if (!inputType || inputType !== \"checkbox\" && inputType !== \"radio\" || input.checked) formData.append(inputName, input.value);\n }\n }\n // Invoked when there is new progress information about given files.\n // If e is not provided, it is assumed that the upload is finished.\n _updateFilesUploadProgress(files, xhr, e) {\n if (!files[0].upload.chunked) // Handle file uploads without chunking\n for (let file of files){\n if (file.upload.total && file.upload.bytesSent && file.upload.bytesSent == file.upload.total) continue;\n if (e) {\n file.upload.progress = 100 * e.loaded / e.total;\n file.upload.total = e.total;\n file.upload.bytesSent = e.loaded;\n } else {\n // No event, so we're at 100%\n file.upload.progress = 100;\n file.upload.bytesSent = file.upload.total;\n }\n this.emit(\"uploadprogress\", file, file.upload.progress, file.upload.bytesSent);\n }\n else {\n // Handle chunked file uploads\n // Chunked upload is not compatible with uploading multiple files in one\n // request, so we know there's only one file.\n let file = files[0];\n // Since this is a chunked upload, we need to update the appropriate chunk\n // progress.\n let chunk = this._getChunk(file, xhr);\n if (e) {\n chunk.progress = 100 * e.loaded / e.total;\n chunk.total = e.total;\n chunk.bytesSent = e.loaded;\n } else {\n // No event, so we're at 100%\n chunk.progress = 100;\n chunk.bytesSent = chunk.total;\n }\n // Now tally the *file* upload progress from its individual chunks\n file.upload.progress = 0;\n file.upload.total = 0;\n file.upload.bytesSent = 0;\n for(let i = 0; i < file.upload.totalChunkCount; i++)if (file.upload.chunks[i] && typeof file.upload.chunks[i].progress !== \"undefined\") {\n file.upload.progress += file.upload.chunks[i].progress;\n file.upload.total += file.upload.chunks[i].total;\n file.upload.bytesSent += file.upload.chunks[i].bytesSent;\n }\n // Since the process is a percentage, we need to divide by the amount of\n // chunks we've used.\n file.upload.progress = file.upload.progress / file.upload.totalChunkCount;\n this.emit(\"uploadprogress\", file, file.upload.progress, file.upload.bytesSent);\n }\n }\n _finishedUploading(files, xhr, e) {\n let response;\n if (files[0].status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.CANCELED) return;\n if (xhr.readyState !== 4) return;\n if (xhr.responseType !== \"arraybuffer\" && xhr.responseType !== \"blob\") {\n response = xhr.responseText;\n if (xhr.getResponseHeader(\"content-type\") && ~xhr.getResponseHeader(\"content-type\").indexOf(\"application/json\")) try {\n response = JSON.parse(response);\n } catch (error) {\n e = error;\n response = \"Invalid JSON response from server.\";\n }\n }\n this._updateFilesUploadProgress(files, xhr);\n if (!(200 <= xhr.status && xhr.status < 300)) this._handleUploadError(files, xhr, response);\n else if (files[0].upload.chunked) files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr), response);\n else this._finished(files, response, e);\n }\n _handleUploadError(files, xhr, response) {\n if (files[0].status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.CANCELED) return;\n if (files[0].upload.chunked && this.options.retryChunks) {\n let chunk = this._getChunk(files[0], xhr);\n if ((chunk.retries++) < this.options.retryChunksLimit) {\n this._uploadData(files, [\n chunk.dataBlock\n ]);\n return;\n } else console.warn(\"Retried this chunk too often. Giving up.\");\n }\n this._errorProcessing(files, response || this.options.dictResponseError.replace(\"{{statusCode}}\", xhr.status), xhr);\n }\n submitRequest(xhr, formData, files) {\n if (xhr.readyState != 1) {\n console.warn(\"Cannot send this request because the XMLHttpRequest.readyState is not OPENED.\");\n return;\n }\n if (this.options.binaryBody) {\n if (files[0].upload.chunked) {\n const chunk = this._getChunk(files[0], xhr);\n xhr.send(chunk.dataBlock.data);\n } else xhr.send(files[0]);\n } else xhr.send(formData);\n }\n // Called internally when processing is finished.\n // Individual callbacks have to be called in the appropriate sections.\n _finished(files, responseText, e) {\n for (let file of files){\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.SUCCESS;\n this.emit(\"success\", file, responseText, e);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"successmultiple\", files, responseText, e);\n this.emit(\"completemultiple\", files);\n }\n if (this.options.autoProcessQueue) return this.processQueue();\n }\n // Called internally when processing is finished.\n // Individual callbacks have to be called in the appropriate sections.\n _errorProcessing(files, message, xhr) {\n for (let file of files){\n file.status = $3ed269f2f0fb224b$export$2e2bcd8739ae039.ERROR;\n this.emit(\"error\", file, message, xhr);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"errormultiple\", files, message, xhr);\n this.emit(\"completemultiple\", files);\n }\n if (this.options.autoProcessQueue) return this.processQueue();\n }\n static uuidv4() {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function(c) {\n let r = Math.random() * 16 | 0, v = c === \"x\" ? r : r & 3 | 8;\n return v.toString(16);\n });\n }\n constructor(el, options){\n super();\n let fallback, left;\n this.element = el;\n this.clickableElements = [];\n this.listeners = [];\n this.files = []; // All files\n if (typeof this.element === \"string\") this.element = document.querySelector(this.element);\n // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.\n if (!this.element || this.element.nodeType == null) throw new Error(\"Invalid dropzone element.\");\n if (this.element.dropzone) throw new Error(\"Dropzone already attached.\");\n // Now add this dropzone to the instances.\n $3ed269f2f0fb224b$export$2e2bcd8739ae039.instances.push(this);\n // Put the dropzone inside the element itself.\n this.element.dropzone = this;\n let elementOptions = (left = $3ed269f2f0fb224b$export$2e2bcd8739ae039.optionsForElement(this.element)) != null ? left : {\n };\n this.options = $ewBKy$justextend(true, {\n }, $4ca367182776f80b$export$2e2bcd8739ae039, elementOptions, options != null ? options : {\n });\n this.options.previewTemplate = this.options.previewTemplate.replace(/\\n*/g, \"\");\n // If the browser failed, just call the fallback and leave\n if (this.options.forceFallback || !$3ed269f2f0fb224b$export$2e2bcd8739ae039.isBrowserSupported()) return this.options.fallback.call(this);\n // @options.url = @element.getAttribute \"action\" unless @options.url?\n if (this.options.url == null) this.options.url = this.element.getAttribute(\"action\");\n if (!this.options.url) throw new Error(\"No URL provided.\");\n if (this.options.acceptedFiles && this.options.acceptedMimeTypes) throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n if (this.options.uploadMultiple && this.options.chunking) throw new Error(\"You cannot set both: uploadMultiple and chunking.\");\n if (this.options.binaryBody && this.options.uploadMultiple) throw new Error(\"You cannot set both: binaryBody and uploadMultiple.\");\n // Backwards compatibility\n if (this.options.acceptedMimeTypes) {\n this.options.acceptedFiles = this.options.acceptedMimeTypes;\n delete this.options.acceptedMimeTypes;\n }\n // Backwards compatibility\n if (this.options.renameFilename != null) this.options.renameFile = (file)=>this.options.renameFilename.call(this, file.name, file)\n ;\n if (typeof this.options.method === \"string\") this.options.method = this.options.method.toUpperCase();\n if ((fallback = this.getExistingFallback()) && fallback.parentNode) // Remove the fallback\n fallback.parentNode.removeChild(fallback);\n // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false\n if (this.options.previewsContainer !== false) {\n if (this.options.previewsContainer) this.previewsContainer = $3ed269f2f0fb224b$export$2e2bcd8739ae039.getElement(this.options.previewsContainer, \"previewsContainer\");\n else this.previewsContainer = this.element;\n }\n if (this.options.clickable) {\n if (this.options.clickable === true) this.clickableElements = [\n this.element\n ];\n else this.clickableElements = $3ed269f2f0fb224b$export$2e2bcd8739ae039.getElements(this.options.clickable, \"clickable\");\n }\n this.init();\n }\n}\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.initClass();\n// This is a map of options for your different dropzones. Add configurations\n// to this object for your different dropzone elemens.\n//\n// Example:\n//\n// Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };\n//\n// And in html:\n//\n//
\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.options = {\n};\n// Returns the options for an element or undefined if none available.\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.optionsForElement = function(element) {\n // Get the `Dropzone.options.elementId` for this element if it exists\n if (element.getAttribute(\"id\")) return $3ed269f2f0fb224b$export$2e2bcd8739ae039.options[$3ed269f2f0fb224b$var$camelize(element.getAttribute(\"id\"))];\n else return undefined;\n};\n// Holds a list of all dropzone instances\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.instances = [];\n// Returns the dropzone for given element if any\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.forElement = function(element) {\n if (typeof element === \"string\") element = document.querySelector(element);\n if ((element != null ? element.dropzone : undefined) == null) throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");\n return element.dropzone;\n};\n// Looks for all .dropzone elements and creates a dropzone for them\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.discover = function() {\n let dropzones;\n if (document.querySelectorAll) dropzones = document.querySelectorAll(\".dropzone\");\n else {\n dropzones = [];\n // IE :(\n let checkElements = (elements)=>(()=>{\n let result = [];\n for (let el of elements)if (/(^| )dropzone($| )/.test(el.className)) result.push(dropzones.push(el));\n else result.push(undefined);\n return result;\n })()\n ;\n checkElements(document.getElementsByTagName(\"div\"));\n checkElements(document.getElementsByTagName(\"form\"));\n }\n return (()=>{\n let result = [];\n for (let dropzone of dropzones)// Create a dropzone unless auto discover has been disabled for specific element\n if ($3ed269f2f0fb224b$export$2e2bcd8739ae039.optionsForElement(dropzone) !== false) result.push(new $3ed269f2f0fb224b$export$2e2bcd8739ae039(dropzone));\n else result.push(undefined);\n return result;\n })();\n};\n// Some browsers support drag and drog functionality, but not correctly.\n//\n// So I created a blocklist of userAgents. Yes, yes. Browser sniffing, I know.\n// But what to do when browsers *theoretically* support an API, but crash\n// when using it.\n//\n// This is a list of regular expressions tested against navigator.userAgent\n//\n// ** It should only be used on browser that *do* support the API, but\n// incorrectly **\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.blockedBrowsers = [\n // The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.\n /opera.*(Macintosh|Windows Phone).*version\\/12/i, \n];\n// Checks if the browser is supported\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.isBrowserSupported = function() {\n let capableBrowser = true;\n if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {\n if (!(\"classList\" in document.createElement(\"a\"))) capableBrowser = false;\n else {\n if ($3ed269f2f0fb224b$export$2e2bcd8739ae039.blacklistedBrowsers !== undefined) // Since this has been renamed, this makes sure we don't break older\n // configuration.\n $3ed269f2f0fb224b$export$2e2bcd8739ae039.blockedBrowsers = $3ed269f2f0fb224b$export$2e2bcd8739ae039.blacklistedBrowsers;\n // The browser supports the API, but may be blocked.\n for (let regex of $3ed269f2f0fb224b$export$2e2bcd8739ae039.blockedBrowsers)if (regex.test(navigator.userAgent)) {\n capableBrowser = false;\n continue;\n }\n }\n } else capableBrowser = false;\n return capableBrowser;\n};\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.dataURItoBlob = function(dataURI) {\n // convert base64 to raw binary data held in a string\n // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this\n let byteString = atob(dataURI.split(\",\")[1]);\n // separate out the mime component\n let mimeString = dataURI.split(\",\")[0].split(\":\")[1].split(\";\")[0];\n // write the bytes of the string to an ArrayBuffer\n let ab = new ArrayBuffer(byteString.length);\n let ia = new Uint8Array(ab);\n for(let i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--)ia[i] = byteString.charCodeAt(i);\n // write the ArrayBuffer to a blob\n return new Blob([\n ab\n ], {\n type: mimeString\n });\n};\n// Returns an array without the rejected item\nconst $3ed269f2f0fb224b$var$without = (list, rejectedItem)=>list.filter((item)=>item !== rejectedItem\n ).map((item)=>item\n )\n;\n// abc-def_ghi -> abcDefGhi\nconst $3ed269f2f0fb224b$var$camelize = (str)=>str.replace(/[\\-_](\\w)/g, (match)=>match.charAt(1).toUpperCase()\n )\n;\n// Creates an element from string\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement = function(string) {\n let div = document.createElement(\"div\");\n div.innerHTML = string;\n return div.childNodes[0];\n};\n// Tests if given element is inside (or simply is) the container\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.elementInside = function(element, container) {\n if (element === container) return true;\n // Coffeescript doesn't support do/while loops\n while(element = element.parentNode){\n if (element === container) return true;\n }\n return false;\n};\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.getElement = function(el, name) {\n let element;\n if (typeof el === \"string\") element = document.querySelector(el);\n else if (el.nodeType != null) element = el;\n if (element == null) throw new Error(`Invalid \\`${name}\\` option provided. Please provide a CSS selector or a plain HTML element.`);\n return element;\n};\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.getElements = function(els, name) {\n let el, elements;\n if (els instanceof Array) {\n elements = [];\n try {\n for (el of els)elements.push(this.getElement(el, name));\n } catch (e) {\n elements = null;\n }\n } else if (typeof els === \"string\") {\n elements = [];\n for (el of document.querySelectorAll(els))elements.push(el);\n } else if (els.nodeType != null) elements = [\n els\n ];\n if (elements == null || !elements.length) throw new Error(`Invalid \\`${name}\\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);\n return elements;\n};\n// Asks the user the question and calls accepted or rejected accordingly\n//\n// The default implementation just uses `window.confirm` and then calls the\n// appropriate callback.\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.confirm = function(question, accepted, rejected) {\n if (window.confirm(question)) return accepted();\n else if (rejected != null) return rejected();\n};\n// Validates the mime type like this:\n//\n// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.isValidFile = function(file, acceptedFiles) {\n if (!acceptedFiles) return true;\n // If there are no accepted mime types, it's OK\n acceptedFiles = acceptedFiles.split(\",\");\n let mimeType = file.type;\n let baseMimeType = mimeType.replace(/\\/.*$/, \"\");\n for (let validType of acceptedFiles){\n validType = validType.trim();\n if (validType.charAt(0) === \".\") {\n if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) return true;\n } else if (/\\/\\*$/.test(validType)) {\n // This is something like a image/* mime type\n if (baseMimeType === validType.replace(/\\/.*$/, \"\")) return true;\n } else {\n if (mimeType === validType) return true;\n }\n }\n return false;\n};\n// Augment jQuery\nif (typeof jQuery !== \"undefined\" && jQuery !== null) jQuery.fn.dropzone = function(options) {\n return this.each(function() {\n return new $3ed269f2f0fb224b$export$2e2bcd8739ae039(this, options);\n });\n};\n// Dropzone file status codes\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.ADDED = \"added\";\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED = \"queued\";\n// For backwards compatibility. Now, if a file is accepted, it's either queued\n// or uploading.\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.ACCEPTED = $3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED;\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING = \"uploading\";\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.PROCESSING = $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING; // alias\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.CANCELED = \"canceled\";\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.ERROR = \"error\";\n$3ed269f2f0fb224b$export$2e2bcd8739ae039.SUCCESS = \"success\";\n/*\n\n Bugfix for iOS 6 and 7\n Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios\n based on the work of https://github.com/stomita/ios-imagefile-megapixel\n\n */ // Detecting vertical squash in loaded image.\n// Fixes a bug which squash image vertically while drawing into canvas for some images.\n// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel\nlet $3ed269f2f0fb224b$var$detectVerticalSquash = function(img) {\n let iw = img.naturalWidth;\n let ih = img.naturalHeight;\n let canvas = document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = ih;\n let ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0);\n let { data: data } = ctx.getImageData(1, 0, 1, ih);\n // search image edge pixel position in case it is squashed vertically.\n let sy = 0;\n let ey = ih;\n let py = ih;\n while(py > sy){\n let alpha = data[(py - 1) * 4 + 3];\n if (alpha === 0) ey = py;\n else sy = py;\n py = ey + sy >> 1;\n }\n let ratio = py / ih;\n if (ratio === 0) return 1;\n else return ratio;\n};\n// A replacement for context.drawImage\n// (args are for source and destination).\nvar $3ed269f2f0fb224b$var$drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {\n let vertSquashRatio = $3ed269f2f0fb224b$var$detectVerticalSquash(img);\n return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);\n};\n// Based on MinifyJpeg\n// Source: http://www.perry.cz/files/ExifRestorer.js\n// http://elicon.blog57.fc2.com/blog-entry-206.html\nclass $3ed269f2f0fb224b$var$ExifRestore {\n static initClass() {\n this.KEY_STR = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n }\n static encode64(input) {\n let output = \"\";\n let chr1 = undefined;\n let chr2 = undefined;\n let chr3 = \"\";\n let enc1 = undefined;\n let enc2 = undefined;\n let enc3 = undefined;\n let enc4 = \"\";\n let i = 0;\n while(true){\n chr1 = input[i++];\n chr2 = input[i++];\n chr3 = input[i++];\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) enc3 = enc4 = 64;\n else if (isNaN(chr3)) enc4 = 64;\n output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);\n chr1 = chr2 = chr3 = \"\";\n enc1 = enc2 = enc3 = enc4 = \"\";\n if (!(i < input.length)) break;\n }\n return output;\n }\n static restore(origFileBase64, resizedFileBase64) {\n if (!origFileBase64.match(\"data:image/jpeg;base64,\")) return resizedFileBase64;\n let rawImage = this.decode64(origFileBase64.replace(\"data:image/jpeg;base64,\", \"\"));\n let segments = this.slice2Segments(rawImage);\n let image = this.exifManipulation(resizedFileBase64, segments);\n return `data:image/jpeg;base64,${this.encode64(image)}`;\n }\n static exifManipulation(resizedFileBase64, segments) {\n let exifArray = this.getExifArray(segments);\n let newImageArray = this.insertExif(resizedFileBase64, exifArray);\n let aBuffer = new Uint8Array(newImageArray);\n return aBuffer;\n }\n static getExifArray(segments) {\n let seg = undefined;\n let x = 0;\n while(x < segments.length){\n seg = segments[x];\n if (seg[0] === 255 & seg[1] === 225) return seg;\n x++;\n }\n return [];\n }\n static insertExif(resizedFileBase64, exifArray) {\n let imageData = resizedFileBase64.replace(\"data:image/jpeg;base64,\", \"\");\n let buf = this.decode64(imageData);\n let separatePoint = buf.indexOf(255, 3);\n let mae = buf.slice(0, separatePoint);\n let ato = buf.slice(separatePoint);\n let array = mae;\n array = array.concat(exifArray);\n array = array.concat(ato);\n return array;\n }\n static slice2Segments(rawImageArray) {\n let head = 0;\n let segments = [];\n while(true){\n var length;\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) break;\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) head += 2;\n else {\n length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];\n let endPoint = head + length + 2;\n let seg = rawImageArray.slice(head, endPoint);\n segments.push(seg);\n head = endPoint;\n }\n if (head > rawImageArray.length) break;\n }\n return segments;\n }\n static decode64(input) {\n let output = \"\";\n let chr1 = undefined;\n let chr2 = undefined;\n let chr3 = \"\";\n let enc1 = undefined;\n let enc2 = undefined;\n let enc3 = undefined;\n let enc4 = \"\";\n let i = 0;\n let buf = [];\n // remove all characters that are not A-Z, a-z, 0-9, +, /, or =\n let base64test = /[^A-Za-z0-9\\+\\/\\=]/g;\n if (base64test.exec(input)) console.warn(\"There were invalid base64 characters in the input text.\\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\\nExpect errors in decoding.\");\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n while(true){\n enc1 = this.KEY_STR.indexOf(input.charAt(i++));\n enc2 = this.KEY_STR.indexOf(input.charAt(i++));\n enc3 = this.KEY_STR.indexOf(input.charAt(i++));\n enc4 = this.KEY_STR.indexOf(input.charAt(i++));\n chr1 = enc1 << 2 | enc2 >> 4;\n chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n chr3 = (enc3 & 3) << 6 | enc4;\n buf.push(chr1);\n if (enc3 !== 64) buf.push(chr2);\n if (enc4 !== 64) buf.push(chr3);\n chr1 = chr2 = chr3 = \"\";\n enc1 = enc2 = enc3 = enc4 = \"\";\n if (!(i < input.length)) break;\n }\n return buf;\n }\n}\n$3ed269f2f0fb224b$var$ExifRestore.initClass();\n/*\n * contentloaded.js\n *\n * Author: Diego Perini (diego.perini at gmail.com)\n * Summary: cross-browser wrapper for DOMContentLoaded\n * Updated: 20101020\n * License: MIT\n * Version: 1.2\n *\n * URL:\n * http://javascript.nwbox.com/ContentLoaded/\n * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\n */ // @win window reference\n// @fn function reference\nlet $3ed269f2f0fb224b$var$contentLoaded = function(win, fn) {\n let done = false;\n let top = true;\n let doc = win.document;\n let root = doc.documentElement;\n let add = doc.addEventListener ? \"addEventListener\" : \"attachEvent\";\n let rem = doc.addEventListener ? \"removeEventListener\" : \"detachEvent\";\n let pre = doc.addEventListener ? \"\" : \"on\";\n var init = function(e) {\n if (e.type === \"readystatechange\" && doc.readyState !== \"complete\") return;\n (e.type === \"load\" ? win : doc)[rem](pre + e.type, init, false);\n if (!done && (done = true)) return fn.call(win, e.type || e);\n };\n var poll = function() {\n try {\n root.doScroll(\"left\");\n } catch (e) {\n setTimeout(poll, 50);\n return;\n }\n return init(\"poll\");\n };\n if (doc.readyState !== \"complete\") {\n if (doc.createEventObject && root.doScroll) {\n try {\n top = !win.frameElement;\n } catch (error) {\n }\n if (top) poll();\n }\n doc[add](pre + \"DOMContentLoaded\", init, false);\n doc[add](pre + \"readystatechange\", init, false);\n return win[add](pre + \"load\", init, false);\n }\n};\nfunction $3ed269f2f0fb224b$var$__guard__(value, transform) {\n return typeof value !== \"undefined\" && value !== null ? transform(value) : undefined;\n}\nfunction $3ed269f2f0fb224b$var$__guardMethod__(obj, methodName, transform) {\n if (typeof obj !== \"undefined\" && obj !== null && typeof obj[methodName] === \"function\") return transform(obj, methodName);\n else return undefined;\n}\n\n\nexport {$3ed269f2f0fb224b$export$2e2bcd8739ae039 as default, $3ed269f2f0fb224b$export$2e2bcd8739ae039 as Dropzone};\n//# sourceMappingURL=dropzone.mjs.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar HTMLParser = (function () {\n function HTMLParser() {\n this._listeners = {};\n this._mapCdataTags = this.makeMap('script,style');\n this._arrBlocks = [];\n this.lastEvent = null;\n }\n HTMLParser.prototype.makeMap = function (str) {\n var obj = {};\n var items = str.split(',');\n for (var i = 0; i < items.length; i++) {\n obj[items[i]] = true;\n }\n return obj;\n };\n HTMLParser.prototype.parse = function (html) {\n var _this = this;\n var mapCdataTags = this._mapCdataTags;\n var regTag = /<(?:\\/([^\\s>]+)\\s*|!--([\\s\\S]*?)--|!([^>]*?)|([\\w\\-:]+)((?:\\s+[^\\s\"'>\\/=\\x00-\\x0F\\x7F\\x80-\\x9F]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s\"'>]*))?)*?)\\s*(\\/?))>/g;\n var regAttr = /\\s*([^\\s\"'>\\/=\\x00-\\x0F\\x7F\\x80-\\x9F]+)(?:\\s*=\\s*(?:(\")([^\"]*)\"|(')([^']*)'|([^\\s\"'>]*)))?/g;\n var regLine = /\\r?\\n/g;\n var match;\n var matchIndex;\n var lastIndex = 0;\n var tagName;\n var arrAttrs;\n var tagCDATA = null;\n var attrsCDATA;\n var arrCDATA = [];\n var lastCDATAIndex = 0;\n var text;\n var lastLineIndex = 0;\n var line = 1;\n var arrBlocks = this._arrBlocks;\n this.fire('start', {\n pos: 0,\n line: 1,\n col: 1,\n });\n var isMapCdataTagsRequired = function () {\n var attrType = arrAttrs.find(function (attr) { return attr.name === 'type'; }) || {\n value: '',\n };\n return (mapCdataTags[tagName] &&\n attrType.value.indexOf('text/ng-template') === -1);\n };\n var saveBlock = function (type, raw, pos, data) {\n var col = pos - lastLineIndex + 1;\n if (data === undefined) {\n data = {};\n }\n data.raw = raw;\n data.pos = pos;\n data.line = line;\n data.col = col;\n arrBlocks.push(data);\n _this.fire(type, data);\n var lineMatch;\n while ((lineMatch = regLine.exec(raw))) {\n line++;\n lastLineIndex = pos + regLine.lastIndex;\n }\n };\n while ((match = regTag.exec(html))) {\n matchIndex = match.index;\n if (matchIndex > lastIndex) {\n text = html.substring(lastIndex, matchIndex);\n if (tagCDATA) {\n arrCDATA.push(text);\n }\n else {\n saveBlock('text', text, lastIndex);\n }\n }\n lastIndex = regTag.lastIndex;\n if ((tagName = match[1])) {\n if (tagCDATA && tagName === tagCDATA) {\n text = arrCDATA.join('');\n saveBlock('cdata', text, lastCDATAIndex, {\n tagName: tagCDATA,\n attrs: attrsCDATA,\n });\n tagCDATA = null;\n attrsCDATA = undefined;\n arrCDATA = [];\n }\n if (!tagCDATA) {\n saveBlock('tagend', match[0], matchIndex, {\n tagName: tagName,\n });\n continue;\n }\n }\n if (tagCDATA) {\n arrCDATA.push(match[0]);\n }\n else {\n if ((tagName = match[4])) {\n arrAttrs = [];\n var attrs = match[5];\n var attrMatch = void 0;\n var attrMatchCount = 0;\n while ((attrMatch = regAttr.exec(attrs))) {\n var name_1 = attrMatch[1];\n var quote = attrMatch[2]\n ? attrMatch[2]\n : attrMatch[4]\n ? attrMatch[4]\n : '';\n var value = attrMatch[3]\n ? attrMatch[3]\n : attrMatch[5]\n ? attrMatch[5]\n : attrMatch[6]\n ? attrMatch[6]\n : '';\n arrAttrs.push({\n name: name_1,\n value: value,\n quote: quote,\n index: attrMatch.index,\n raw: attrMatch[0],\n });\n attrMatchCount += attrMatch[0].length;\n }\n if (attrMatchCount === attrs.length) {\n saveBlock('tagstart', match[0], matchIndex, {\n tagName: tagName,\n attrs: arrAttrs,\n close: match[6],\n });\n if (isMapCdataTagsRequired()) {\n tagCDATA = tagName;\n attrsCDATA = arrAttrs.concat();\n arrCDATA = [];\n lastCDATAIndex = lastIndex;\n }\n }\n else {\n saveBlock('text', match[0], matchIndex);\n }\n }\n else if (match[2] || match[3]) {\n saveBlock('comment', match[0], matchIndex, {\n content: match[2] || match[3],\n long: match[2] ? true : false,\n });\n }\n }\n }\n if (html.length > lastIndex) {\n text = html.substring(lastIndex, html.length);\n saveBlock('text', text, lastIndex);\n }\n this.fire('end', {\n pos: lastIndex,\n line: line,\n col: html.length - lastLineIndex + 1,\n });\n };\n HTMLParser.prototype.addListener = function (types, listener) {\n var _listeners = this._listeners;\n var arrTypes = types.split(/[,\\s]/);\n var type;\n for (var i = 0, l = arrTypes.length; i < l; i++) {\n type = arrTypes[i];\n if (_listeners[type] === undefined) {\n _listeners[type] = [];\n }\n _listeners[type].push(listener);\n }\n };\n HTMLParser.prototype.fire = function (type, data) {\n if (data === undefined) {\n data = {};\n }\n data.type = type;\n var listeners = [];\n var listenersType = this._listeners[type];\n var listenersAll = this._listeners['all'];\n if (listenersType !== undefined) {\n listeners = listeners.concat(listenersType);\n }\n if (listenersAll !== undefined) {\n listeners = listeners.concat(listenersAll);\n }\n var lastEvent = this.lastEvent;\n if (lastEvent !== null) {\n delete lastEvent['lastEvent'];\n data.lastEvent = lastEvent;\n }\n this.lastEvent = data;\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i].call(this, data);\n }\n };\n HTMLParser.prototype.removeListener = function (type, listener) {\n var listenersType = this._listeners[type];\n if (listenersType !== undefined) {\n for (var i = 0, l = listenersType.length; i < l; i++) {\n if (listenersType[i] === listener) {\n listenersType.splice(i, 1);\n break;\n }\n }\n }\n };\n HTMLParser.prototype.fixPos = function (event, index) {\n var text = event.raw.substr(0, index);\n var arrLines = text.split(/\\r?\\n/);\n var lineCount = arrLines.length - 1;\n var line = event.line;\n var col;\n if (lineCount > 0) {\n line += lineCount;\n col = arrLines[lineCount].length + 1;\n }\n else {\n col = event.col + index;\n }\n return {\n line: line,\n col: col,\n };\n };\n HTMLParser.prototype.getMapAttrs = function (arrAttrs) {\n var mapAttrs = {};\n var attr;\n for (var i = 0, l = arrAttrs.length; i < l; i++) {\n attr = arrAttrs[i];\n mapAttrs[attr.name] = attr.value;\n }\n return mapAttrs;\n };\n return HTMLParser;\n}());\nexports.default = HTMLParser;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbHBhcnNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL2h0bWxwYXJzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUF3QkE7SUFPRTtRQUNFLElBQUksQ0FBQyxVQUFVLEdBQUcsRUFBRSxDQUFBO1FBQ3BCLElBQUksQ0FBQyxhQUFhLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FBQTtRQUNqRCxJQUFJLENBQUMsVUFBVSxHQUFHLEVBQUUsQ0FBQTtRQUNwQixJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQTtJQUN2QixDQUFDO0lBRU0sNEJBQU8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BQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsUUFBUSxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFO1lBQy9DLElBQUksR0FBRyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUE7WUFDbEIsUUFBUSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFBO1NBQ2pDO1FBRUQsT0FBTyxRQUFRLENBQUE7SUFDakIsQ0FBQztJQUNILGlCQUFDO0FBQUQsQ0FBQyxBQWpURCxJQWlUQyJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Reporter = (function () {\n function Reporter(html, ruleset) {\n this.html = html;\n this.lines = html.split(/\\r?\\n/);\n var match = /\\r?\\n/.exec(html);\n this.brLen = match !== null ? match[0].length : 0;\n this.ruleset = ruleset;\n this.messages = [];\n }\n Reporter.prototype.info = function (message, line, col, rule, raw) {\n this.report(\"info\", message, line, col, rule, raw);\n };\n Reporter.prototype.warn = function (message, line, col, rule, raw) {\n this.report(\"warning\", message, line, col, rule, raw);\n };\n Reporter.prototype.error = function (message, line, col, rule, raw) {\n this.report(\"error\", message, line, col, rule, raw);\n };\n Reporter.prototype.report = function (type, message, line, col, rule, raw) {\n var lines = this.lines;\n var brLen = this.brLen;\n var evidence = '';\n var evidenceLen = 0;\n for (var i = line - 1, lineCount = lines.length; i < lineCount; i++) {\n evidence = lines[i];\n evidenceLen = evidence.length;\n if (col > evidenceLen && line < lineCount) {\n line++;\n col -= evidenceLen;\n if (col !== 1) {\n col -= brLen;\n }\n }\n else {\n break;\n }\n }\n this.messages.push({\n type: type,\n message: message,\n raw: raw,\n evidence: evidence,\n line: line,\n col: col,\n rule: {\n id: rule.id,\n description: rule.description,\n link: \"https://github.com/thedaviddias/HTMLHint/wiki/\" + rule.id,\n },\n });\n };\n return Reporter;\n}());\nexports.default = Reporter;\n//# sour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O2FBQ047U0FDRjtRQUVELElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDO1lBQ2pCLElBQUksRUFBRSxJQUFJO1lBQ1YsT0FBTyxFQUFFLE9BQU87WUFDaEIsR0FBRyxFQUFFLEdBQUc7WUFDUixRQUFRLEVBQUUsUUFBUTtZQUNsQixJQUFJLEVBQUUsSUFBSTtZQUNWLEdBQUcsRUFBRSxHQUFHO1lBQ1IsSUFBSSxFQUFFO2dCQUNKLEVBQUUsRUFBRSxJQUFJLENBQUMsRUFBRTtnQkFDWCxXQUFXLEVBQUUsSUFBSSxDQUFDLFdBQVc7Z0JBQzdCLElBQUksRUFBRSxtREFBaUQsSUFBSSxDQUFDLEVBQUk7YUFDekQ7U0FDVixDQUFDLENBQUE7SUFDSixDQUFDO0lBQ0gsZUFBQztBQUFELENBQUMsQUF4RkQsSUF3RkMifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'alt-require',\n description: 'The alt attribute of an element must be present and alt attribute of area[href] and input[type=image] must have a value.',\n init: function (parser, reporter) {\n var _this = this;\n parser.addListener('tagstart', function (event) {\n var tagName = event.tagName.toLowerCase();\n var mapAttrs = parser.getMapAttrs(event.attrs);\n var col = event.col + tagName.length + 1;\n var selector;\n if (tagName === 'img' && !('alt' in mapAttrs)) {\n reporter.warn('An alt attribute must be present on elements.', event.line, col, _this, event.raw);\n }\n else if ((tagName === 'area' && 'href' in mapAttrs) ||\n (tagName === 'input' && mapAttrs['type'] === 'image')) {\n if (!('alt' in mapAttrs) || mapAttrs['alt'] === '') {\n selector = tagName === 'area' ? 'area[href]' : 'input[type=image]';\n reporter.warn(\"The alt attribute of \" + selector + \" must have a value.\", event.line, col, _this, event.raw);\n }\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWx0LXJlcXVpcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uL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LEtBQUssRUFBRSxFQUFFO29CQUNsRCxRQUFRLEdBQUcsT0FBTyxLQUFLLE1BQU0sQ0FBQyxDQUFDLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxtQkFBbUIsQ0FBQTtvQkFDbEUsUUFBUSxDQUFDLElBQUksQ0FDWCwwQkFBd0IsUUFBUSx3QkFBcUIsRUFDckQsS0FBSyxDQUFDLElBQUksRUFDVixHQUFHLEVBQ0gsS0FBSSxFQUNKLEtBQUssQ0FBQyxHQUFHLENBQ1YsQ0FBQTtpQkFDRjthQUNGO1FBQ0gsQ0FBQyxDQUFDLENBQUE7SUFDSixDQUFDO0NBQ00sQ0FBQSJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction testAgainstStringOrRegExp(value, comparison) {\n if (comparison instanceof RegExp) {\n return comparison.test(value)\n ? { match: value, pattern: comparison }\n : false;\n }\n var firstComparisonChar = comparison[0];\n var lastComparisonChar = comparison[comparison.length - 1];\n var secondToLastComparisonChar = comparison[comparison.length - 2];\n var comparisonIsRegex = firstComparisonChar === '/' &&\n (lastComparisonChar === '/' ||\n (secondToLastComparisonChar === '/' && lastComparisonChar === 'i'));\n var hasCaseInsensitiveFlag = comparisonIsRegex && lastComparisonChar === 'i';\n if (comparisonIsRegex) {\n var valueMatches = hasCaseInsensitiveFlag\n ? new RegExp(comparison.slice(1, -2), 'i').test(value)\n : new RegExp(comparison.slice(1, -1)).test(value);\n return valueMatches;\n }\n return value === comparison;\n}\nexports.default = {\n id: 'attr-lowercase',\n description: 'All attribute names must be in lowercase.',\n init: function (parser, reporter, options) {\n var _this = this;\n var exceptions = Array.isArray(options) ? options : [];\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var attr;\n var col = event.col + event.tagName.length + 1;\n var _loop_1 = function (i, l) {\n attr = attrs[i];\n var attrName = attr.name;\n if (!exceptions.find(function (exp) { return testAgainstStringOrRegExp(attrName, exp); }) &&\n attrName !== attrName.toLowerCase()) {\n reporter.error(\"The attribute name of [ \" + attrName + \" ] must be in lowercase.\", event.line, col + attr.index, _this, attr.raw);\n }\n };\n for (var i = 0, l = attrs.length; i < l; i++) {\n _loop_1(i, l);\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci1sb3dlcmNhc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29yZS9ydWxlcy9hdHRyLWxvd2VyY2FzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVFBLFNBQVMseUJBQXlCLENBQUMsS0FBYSxFQUFFLFVBQTJCO0lBRTNFLElBQUksVUFBVSxZQUFZLE1BQU0sRUFBRTtRQUNoQyxPQUFPLFVBQVUsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDO1lBQzNCLENBQUMsQ0FBQyxFQUFFLEtBQUssRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFLFVBQVUsRUFBRTtZQUN2QyxDQUFDLENBQUMsS0FBSyxDQUFBO0tBQ1Y7SUFHRCxJQUFNLG1CQUFtQixHQUFHLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUN6QyxJQUFNLGtCQUFrQixHQUFHLFVBQVUsQ0FBQyxVQUFVLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFBO0lBQzVELElBQU0sMEJBQTBCLEdBQUcsVUFBVSxDQUFDLFVBQVUsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUE7SUFFcEUsSUFBTSxpQkFBaUIsR0FDckIsbUJBQW1CLEtBQUssR0FBRztRQUMzQixDQUFDLGtCQUFrQixLQUFLLEdBQUc7WUFDekIsQ0FBQywwQkFBMEIsS0FBSyxHQUFHLElBQUksa0JBQWtCLEtBQUssR0FBRyxDQUFDLENBQUMsQ0FBQTtJQUV2RSxJQUFNLHNCQUFzQixHQUFHLGlCQUFpQixJ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FDLEVBQU0sQ0FBQztnQkFDZixJQUFJLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFBO2dCQUNmLElBQU0sUUFBUSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUE7Z0JBRTFCLElBQ0UsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLFVBQUMsR0FBRyxJQUFLLE9BQUEseUJBQXlCLENBQUMsUUFBUSxFQUFFLEdBQUcsQ0FBQyxFQUF4QyxDQUF3QyxDQUFDO29CQUNuRSxRQUFRLEtBQUssUUFBUSxDQUFDLFdBQVcsRUFBRSxFQUNuQztvQkFDQSxRQUFRLENBQUMsS0FBSyxDQUNaLDZCQUEyQixRQUFRLDZCQUEwQixFQUM3RCxLQUFLLENBQUMsSUFBSSxFQUNWLEdBQUcsR0FBRyxJQUFJLENBQUMsS0FBSyxFQUNoQixLQUFJLEVBQ0osSUFBSSxDQUFDLEdBQUcsQ0FDVCxDQUFBO2lCQUNGOztZQWZILEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFO3dCQUFuQyxDQUFDLEVBQU0sQ0FBQzthQWdCaEI7UUFDSCxDQUFDLENBQUMsQ0FBQTtJQUNKLENBQUM7Q0FDTSxDQUFBIn0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'attr-sorted',\n description: 'Attribute tags must be in proper order.',\n init: function (parser, reporter) {\n var _this = this;\n var orderMap = {};\n var sortOrder = [\n 'class',\n 'id',\n 'name',\n 'src',\n 'for',\n 'type',\n 'href',\n 'value',\n 'title',\n 'alt',\n 'role',\n ];\n for (var i = 0; i < sortOrder.length; i++) {\n orderMap[sortOrder[i]] = i;\n }\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var listOfAttributes = [];\n for (var i = 0; i < attrs.length; i++) {\n listOfAttributes.push(attrs[i].name);\n }\n var originalAttrs = JSON.stringify(listOfAttributes);\n listOfAttributes.sort(function (a, b) {\n if (orderMap[a] == undefined && orderMap[b] == undefined) {\n return 0;\n }\n if (orderMap[a] == undefined) {\n return 1;\n }\n else if (orderMap[b] == undefined) {\n return -1;\n }\n return orderMap[a] - orderMap[b] || a.localeCompare(b);\n });\n if (originalAttrs !== JSON.stringify(listOfAttributes)) {\n reporter.error(\"Inaccurate order \" + originalAttrs + \" should be in hierarchy \" + JSON.stringify(listOfAttributes) + \" \", event.line, event.col, _this, event.raw);\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci1zb3J0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29yZS9ydWxlcy9hdHRyLXNvcnRlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBLGtCQUFlO0lBQ2IsRUFBRSxFQUFFLGFBQWE7SUFDakIsV0FBVyxFQUFFLHlDQUF5QztJQUN0RCxJQUFJLEVBQUosVUFBSyxNQUFNLEVBQUUsUUFBUTtRQUFyQixpQkFxREM7UUFwREMsSUFBTSxRQUFRLEdBQThCLEVBQUUsQ0FBQTtRQUM5QyxJQUFNLFNBQVMsR0FBRztZQUNoQixPQUFPO1lBQ1AsSUFBSTtZQUNKLE1BQU07WUFDTixLQUFLO1lBQ0wsS0FBSztZQUNMLE1BQU07WUFDTixNQUFNO1lBQ04sT0FBTztZQUNQLE9BQU87WUFDUCxLQUFLO1lBQ0wsTUFBTTtTQUNQLENBQUE7UUFFRCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtZQUN6QyxRQUFRLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ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QUVGLElBQUksYUFBYSxLQUFLLElBQUksQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsRUFBRTtnQkFDdEQsUUFBUSxDQUFDLEtBQUssQ0FDWixzQkFBb0IsYUFBYSxnQ0FBMkIsSUFBSSxDQUFDLFNBQVMsQ0FDeEUsZ0JBQWdCLENBQ2pCLE1BQUcsRUFDSixLQUFLLENBQUMsSUFBSSxFQUNWLEtBQUssQ0FBQyxHQUFHLEVBQ1QsS0FBSSxFQUNKLEtBQUssQ0FBQyxHQUFHLENBQ1YsQ0FBQTthQUNGO1FBQ0gsQ0FBQyxDQUFDLENBQUE7SUFDSixDQUFDO0NBQ00sQ0FBQSJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'attr-no-duplication',\n description: 'Elements cannot have duplicate attributes.',\n init: function (parser, reporter) {\n var _this = this;\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var attr;\n var attrName;\n var col = event.col + event.tagName.length + 1;\n var mapAttrName = {};\n for (var i = 0, l = attrs.length; i < l; i++) {\n attr = attrs[i];\n attrName = attr.name;\n if (mapAttrName[attrName] === true) {\n reporter.error(\"Duplicate of attribute name [ \" + attr.name + \" ] was found.\", event.line, col + attr.index, _this, attr.raw);\n }\n mapAttrName[attrName] = true;\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci1uby1kdXBsaWNhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb3JlL3J1bGVzL2F0dHItbm8tZHVwbGljYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFQSxrQkFBZTtJQUNiLEVBQUUsRUFBRSxxQkFBcUI7SUFDekIsV0FBVyxFQUFFLDRDQUE0QztJQUN6RCxJQUFJLEVBQUosVUFBSyxNQUFNLEVBQUUsUUFBUTtRQUFyQixpQkF5QkM7UUF4QkMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxVQUFVLEVBQUUsVUFBQyxLQUFLO1lBQ25DLElBQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUE7WUFDekIsSUFBSSxJQUFJLENBQUE7WUFDUixJQUFJLFFBQWdCLENBQUE7WUFDcEIsSUFBTSxHQUFHLEdBQUcsS0FBSyxDQUFDLEdBQUcsR0FBRyxLQUFLLENBQUMsT0FBTyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUE7WUFFaEQsSUFBTSxXQUFXLEdBQWdDLEVBQUUsQ0FBQTtZQUVuRCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFO2dCQUM1QyxJQUFJLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFBO2dCQUNmLFFBQVEsR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFBO2dCQUVwQixJQUFJLFdBQVcsQ0FBQyxRQUFRLENBQUMsS0FBSyxJQUFJLEVBQUU7b0JBQ2xDLFFBQVEsQ0FBQyxLQUFLLENBQ1osbUNBQWlDLElBQUksQ0FBQyxJQUFJLGtCQUFlLEVBQ3pELEtBQUssQ0FBQyxJQUFJLEVBQ1YsR0FBRyxHQUFHLElBQUksQ0FBQyxLQUFLLEVBQ2hCLEtBQUksRUFDSixJQUFJLENBQUMsR0FBRyxDQUNULENBQUE7aUJBQ0Y7Z0JBQ0QsV0FBVyxDQUFDLFFBQVEsQ0FBQyxHQUFHLElBQUksQ0FBQTthQUM3QjtRQUNILENBQUMsQ0FBQyxDQUFBO0lBQ0osQ0FBQztDQUNNLENBQUEifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'attr-unsafe-chars',\n description: 'Attribute values cannot contain unsafe chars.',\n init: function (parser, reporter) {\n var _this = this;\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var attr;\n var col = event.col + event.tagName.length + 1;\n var regUnsafe = /[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/;\n var match;\n for (var i = 0, l = attrs.length; i < l; i++) {\n attr = attrs[i];\n match = regUnsafe.exec(attr.value);\n if (match !== null) {\n var unsafeCode = escape(match[0])\n .replace(/%u/, '\\\\u')\n .replace(/%/, '\\\\x');\n reporter.warn(\"The value of attribute [ \" + attr.name + \" ] cannot contain an unsafe char [ \" + unsafeCode + \" ].\", event.line, col + attr.index, _this, attr.raw);\n }\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci11bnNhZmUtY2hhcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29yZS9ydWxlcy9hdHRyLXVuc2FmZS1jaGFycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBLGtCQUFlO0lBQ2IsRUFBRSxFQUFFLG1CQUFtQjtJQUN2QixXQUFXLEVBQUUsK0NBQStDO0lBQzVELElBQUksWUFBQyxNQUFNLEVBQUUsUUFBUTtRQUFyQixpQkE0QkM7UUEzQkMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxVQUFVLEVBQUUsVUFBQyxLQUFLO1lBQ25DLElBQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUE7WUFDekIsSUFBSSxJQUFJLENBQUE7WUFDUixJQUFNLEdBQUcsR0FBRyxLQUFLLENBQUMsR0FBRyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQTtZQUdoRCxJQUFNLFNBQVMsR0FBRyxzSkFBc0osQ0FBQTtZQUN4SyxJQUFJLEtBQUssQ0FBQTtZQUVULEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7Z0JBQzVDLElBQUksR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUE7Z0JBQ2YsS0FBSyxHQUFHLFNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFBO2dCQUVsQyxJQUFJLEtBQUssS0FBSyxJQUFJLEVBQUU7b0JBQ2xCLElBQU0sVUFBVSxHQUFHLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7eUJBQ2hDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDO3lCQUNwQixPQUFPLENBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFBO29CQUN0QixRQUFRLENBQUMsSUFBSSxDQUNYLDhCQUE0QixJQUFJLENBQUMsSUFBSSwyQ0FBc0MsVUFBVSxRQUFLLEVBQzFGLEtBQUssQ0FBQyxJQUFJLEVBQ1YsR0FBRyxHQUFHLElBQUksQ0FBQyxLQUFLLEVBQ2hCLEtBQUksRUFDSixJQUFJLENBQUMsR0FBRyxDQUNULENBQUE7aUJBQ0Y7YUFDRjtRQUNILENBQUMsQ0FBQyxDQUFBO0lBQ0osQ0FBQztDQUNNLENBQUEifQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'attr-value-double-quotes',\n description: 'Attribute values must be in double quotes.',\n init: function (parser, reporter) {\n var _this = this;\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var attr;\n var col = event.col + event.tagName.length + 1;\n for (var i = 0, l = attrs.length; i < l; i++) {\n attr = attrs[i];\n if ((attr.value !== '' && attr.quote !== '\"') ||\n (attr.value === '' && attr.quote === \"'\")) {\n reporter.error(\"The value of attribute [ \" + attr.name + \" ] must be in double quotes.\", event.line, col + attr.index, _this, attr.raw);\n }\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci12YWx1ZS1kb3VibGUtcXVvdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvcmUvcnVsZXMvYXR0ci12YWx1ZS1kb3VibGUtcXVvdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUEsa0JBQWU7SUFDYixFQUFFLEVBQUUsMEJBQTBCO0lBQzlCLFdBQVcsRUFBRSw0Q0FBNEM7SUFDekQsSUFBSSxZQUFDLE1BQU0sRUFBRSxRQUFRO1FBQXJCLGlCQXVCQztRQXRCQyxNQUFNLENBQUMsV0FBVyxDQUFDLFVBQVUsRUFBRSxVQUFDLEtBQUs7WUFDbkMsSUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQTtZQUN6QixJQUFJLElBQUksQ0FBQTtZQUNSLElBQU0sR0FBRyxHQUFHLEtBQUssQ0FBQyxHQUFHLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFBO1lBRWhELEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7Z0JBQzVDLElBQUksR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUE7Z0JBRWYsSUFDRSxDQUFDLElBQUksQ0FBQyxLQUFLLEtBQUssRUFBRSxJQUFJLElBQUksQ0FBQyxLQUFLLEtBQUssR0FBRyxDQUFDO29CQUN6QyxDQUFDLElBQUksQ0FBQyxLQUFLLEtBQUssRUFBRSxJQUFJLElBQUksQ0FBQyxLQUFLLEtBQUssR0FBRyxDQUFDLEVBQ3pDO29CQUNBLFFBQVEsQ0FBQyxLQUFLLENBQ1osOEJBQTRCLElBQUksQ0FBQyxJQUFJLGlDQUE4QixFQUNuRSxLQUFLLENBQUMsSUFBSSxFQUNWLEdBQUcsR0FBRyxJQUFJLENBQUMsS0FBSyxFQUNoQixLQUFJLEVBQ0osSUFBSSxDQUFDLEdBQUcsQ0FDVCxDQUFBO2lCQUNGO2FBQ0Y7UUFDSCxDQUFDLENBQUMsQ0FBQTtJQUNKLENBQUM7Q0FDTSxDQUFBIn0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'attr-value-not-empty',\n description: 'All attributes must have values.',\n init: function (parser, reporter) {\n var _this = this;\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var attr;\n var col = event.col + event.tagName.length + 1;\n for (var i = 0, l = attrs.length; i < l; i++) {\n attr = attrs[i];\n if (attr.quote === '' && attr.value === '') {\n reporter.warn(\"The attribute [ \" + attr.name + \" ] must have a value.\", event.line, col + attr.index, _this, attr.raw);\n }\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci12YWx1ZS1ub3QtZW1wdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29yZS9ydWxlcy9hdHRyLXZhbHVlLW5vdC1lbXB0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBLGtCQUFlO0lBQ2IsRUFBRSxFQUFFLHNCQUFzQjtJQUMxQixXQUFXLEVBQUUsa0NBQWtDO0lBQy9DLElBQUksWUFBQyxNQUFNLEVBQUUsUUFBUTtRQUFyQixpQkFvQkM7UUFuQkMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxVQUFVLEVBQUUsVUFBQyxLQUFLO1lBQ25DLElBQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUE7WUFDekIsSUFBSSxJQUFJLENBQUE7WUFDUixJQUFNLEdBQUcsR0FBRyxLQUFLLENBQUMsR0FBRyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQTtZQUVoRCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFO2dCQUM1QyxJQUFJLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFBO2dCQUVmLElBQUksSUFBSSxDQUFDLEtBQUssS0FBSyxFQUFFLElBQUksSUFBSSxDQUFDLEtBQUssS0FBSyxFQUFFLEVBQUU7b0JBQzFDLFFBQVEsQ0FBQyxJQUFJLENBQ1gscUJBQW1CLElBQUksQ0FBQyxJQUFJLDBCQUF1QixFQUNuRCxLQUFLLENBQUMsSUFBSSxFQUNWLEdBQUcsR0FBRyxJQUFJLENBQUMsS0FBSyxFQUNoQixLQUFJLEVBQ0osSUFBSSxDQUFDLEdBQUcsQ0FDVCxDQUFBO2lCQUNGO2FBQ0Y7UUFDSCxDQUFDLENBQUMsQ0FBQTtJQUNKLENBQUM7Q0FDTSxDQUFBIn0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'attr-value-single-quotes',\n description: 'Attribute values must be in single quotes.',\n init: function (parser, reporter) {\n var _this = this;\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var attr;\n var col = event.col + event.tagName.length + 1;\n for (var i = 0, l = attrs.length; i < l; i++) {\n attr = attrs[i];\n if ((attr.value !== '' && attr.quote !== \"'\") ||\n (attr.value === '' && attr.quote === '\"')) {\n reporter.error(\"The value of attribute [ \" + attr.name + \" ] must be in single quotes.\", event.line, col + attr.index, _this, attr.raw);\n }\n }\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci12YWx1ZS1zaW5nbGUtcXVvdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvcmUvcnVsZXMvYXR0ci12YWx1ZS1zaW5nbGUtcXVvdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUEsa0JBQWU7SUFDYixFQUFFLEVBQUUsMEJBQTBCO0lBQzlCLFdBQVcsRUFBRSw0Q0FBNEM7SUFDekQsSUFBSSxZQUFDLE1BQU0sRUFBRSxRQUFRO1FBQXJCLGlCQXVCQztRQXRCQyxNQUFNLENBQUMsV0FBVyxDQUFDLFVBQVUsRUFBRSxVQUFDLEtBQUs7WUFDbkMsSUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQTtZQUN6QixJQUFJLElBQUksQ0FBQTtZQUNSLElBQU0sR0FBRyxHQUFHLEtBQUssQ0FBQyxHQUFHLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFBO1lBRWhELEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7Z0JBQzVDLElBQUksR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUE7Z0JBRWYsSUFDRSxDQUFDLElBQUksQ0FBQyxLQUFLLEtBQUssRUFBRSxJQUFJLElBQUksQ0FBQyxLQUFLLEtBQUssR0FBRyxDQUFDO29CQUN6QyxDQUFDLElBQUksQ0FBQyxLQUFLLEtBQUssRUFBRSxJQUFJLElBQUksQ0FBQyxLQUFLLEtBQUssR0FBRyxDQUFDLEVBQ3pDO29CQUNBLFFBQVEsQ0FBQyxLQUFLLENBQ1osOEJBQTRCLElBQUksQ0FBQyxJQUFJLGlDQUE4QixFQUNuRSxLQUFLLENBQUMsSUFBSSxFQUNWLEdBQUcsR0FBRyxJQUFJLENBQUMsS0FBSyxFQUNoQixLQUFJLEVBQ0osSUFBSSxDQUFDLEdBQUcsQ0FDVCxDQUFBO2lCQUNGO2FBQ0Y7UUFDSCxDQUFDLENBQUMsQ0FBQTtJQUNKLENBQUM7Q0FDTSxDQUFBIn0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'attr-whitespace',\n description: 'All attributes should be separated by only one space and not have leading/trailing whitespace.',\n init: function (parser, reporter, options) {\n var _this = this;\n var exceptions = Array.isArray(options)\n ? options\n : [];\n parser.addListener('tagstart', function (event) {\n var attrs = event.attrs;\n var attr;\n var col = event.col + event.tagName.length + 1;\n attrs.forEach(function (elem) {\n attr = elem;\n var attrName = elem.name;\n if (exceptions.indexOf(attrName) !== -1) {\n return;\n }\n if (elem.value.trim() !== elem.value) {\n reporter.error(\"The attributes of [ \" + attrName + \" ] must not have trailing whitespace.\", event.line, col + attr.index, _this, attr.raw);\n }\n if (elem.value.replace(/ +(?= )/g, '') !== elem.value) {\n reporter.error(\"The attributes of [ \" + attrName + \" ] must be separated by only one space.\", event.line, col + attr.index, _this, attr.raw);\n }\n });\n });\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ci13aGl0ZXNwYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvcmUvcnVsZXMvYXR0ci13aGl0ZXNwYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUEsa0JBQWU7SUFDYixFQUFFLEVBQUUsaUJBQWlCO0lBQ3JCLFdBQVcsRUFDVCxnR0FBZ0c7SUFDb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LEVBQUUsRUFBRSxDQUFDLEtBQUssSUFBSSxDQUFDLEtBQUssRUFBRTtvQkFDckQsUUFBUSxDQUFDLEtBQUssQ0FDWix5QkFBdUIsUUFBUSw0Q0FBeUMsRUFDeEUsS0FBSyxDQUFDLElBQUksRUFDVixHQUFHLEdBQUcsSUFBSSxDQUFDLEtBQUssRUFDaEIsS0FBSSxFQUNKLElBQUksQ0FBQyxHQUFHLENBQ1QsQ0FBQTtpQkFDRjtZQUNILENBQUMsQ0FBQyxDQUFBO1FBQ0osQ0FBQyxDQUFDLENBQUE7SUFDSixDQUFDO0NBQ00sQ0FBQSJ9","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'doctype-first',\n description: 'Doctype must be declared first.',\n init: function (parser, reporter) {\n var _this = this;\n var allEvent = function (event) {\n if (event.type === 'start' ||\n (event.type === 'text' && /^\\s*$/.test(event.raw))) {\n return;\n }\n if ((event.type !== 'comment' && event.long === false) ||\n /^DOCTYPE\\s+/i.test(event.content) === false) {\n reporter.error('Doctype must be declared first.', event.line, event.col, _this, event.raw);\n }\n parser.removeListener('all', allEvent);\n };\n parser.addListener('all', allEvent);\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdHlwZS1maXJzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb3JlL3J1bGVzL2RvY3R5cGUtZmlyc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFHQSxrQkFBZTtJQUNiLEVBQUUsRUFBRSxlQUFlO0lBQ25CLFdBQVcsRUFBRSxpQ0FBaUM7SUFDOUMsSUFBSSxFQUFKLFVBQUssTUFBTSxFQUFFLFFBQVE7UUFBckIsaUJBMEJDO1FBekJDLElBQU0sUUFBUSxHQUFhLFVBQUMsS0FBSztZQUMvQixJQUNFLEtBQUssQ0FBQyxJQUFJLEtBQUssT0FBTztnQkFDdEIsQ0FBQyxLQUFLLENBQUMsSUFBSSxLQUFLLE1BQU0sSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUNsRDtnQkFDQSxPQUFNO2FBQ1A7WUFFRCxJQUNFLENBQUMsS0FBSyxDQUFDLElBQUksS0FBSyxTQUFTLElBQUksS0FBSyxDQUFDLElBQUksS0FBSyxLQUFLLENBQUM7Z0JBQ2xELGNBQWMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxLQUFLLEtBQUssRUFDNUM7Z0JBQ0EsUUFBUSxDQUFDLEtBQUssQ0FDWixpQ0FBaUMsRUFDakMsS0FBSyxDQUFDLElBQUksRUFDVixLQUFLLENBQUMsR0FBRyxFQUNULEtBQUksRUFDSixLQUFLLENBQUMsR0FBRyxDQUNWLENBQUE7YUFDRjtZQUVELE1BQU0sQ0FBQyxjQUFjLENBQUMsS0FBSyxFQUFFLFFBQVEsQ0FBQyxDQUFBO1FBQ3hDLENBQUMsQ0FBQTtRQUVELE1BQU0sQ0FBQyxXQUFXLENBQUMsS0FBSyxFQUFFLFFBQVEsQ0FBQyxDQUFBO0lBQ3JDLENBQUM7Q0FDTSxDQUFBIn0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = {\n id: 'doctype-html5',\n description: 'Invalid doctype. Use: \"\"',\n init: function (parser, reporter) {\n var _this = this;\n var onComment = function (event) {\n if (event.long === false &&\n event.content.toLowerCase() !== 'doctype html') {\n reporter.warn('Invalid doctype. Use: \"\"', event.line, event.col, _this, event.raw);\n }\n };\n var onTagStart = function () {\n parser.removeListener('comment', onComment);\n parser.removeListener('tagstart', onTagStart);\n };\n parser.addListener('all', onComment);\n parser.addListener('tagstart', onTagStart);\n },\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdHlwZS1odG1sNS5qc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