if ( !document.ready){Document.prototype.ready = function ( callback){document.addEventListener( 'DOMContentLoaded', callback);};}if ( !String.prototype.hash){String.prototype.hash = function (){var hash = 0, i, chr;if ( this.length === 0){return hash;}for ( i = 0; i < this.length; i++){chr= this.charCodeAt( i);hash = ((hash << 5)- hash)+ chr;hash |= 0;}return hash;};}if ( !String.prototype.format){String.prototype.format = function (){var content = this + '';for ( var i = 0; i < arguments.length; i++){var value = arguments[ i ];switch ( true){case Array.isArray( value):case typeof value === 'object':content = formatByObject( content, value);break;case typeof value === 'number':case typeof value === 'string':case typeof value === 'boolean':content = replace( content, i, value);}}return content;};var formatByObject = function ( content, data){for ( var key in data){if ( data.hasOwnProperty( key)){content = replace( content, key, data[ key ]);}}return content;};var replace = function ( content, key, value){var regexp = new RegExp( '\\{' + key + '\\}', 'gi');return content.replace( regexp, value);};}if ( !Date.prototype.toISO){Date.prototype.toISO = function (){var pad = function ( n){return n < 10 ? '0' + n : n;};return this.getFullYear()+'-' + pad( this.getMonth()+ 1)+'-' + pad( this.getDate());};}(function ( constructor){if ( constructor &&constructor.prototype &&constructor.prototype.childElementCount == null){Object.defineProperty( constructor.prototype, 'childElementCount', {get: function (){var i = 0, count = 0, node, nodes = this.childNodes;while ( node = nodes[ i++ ]){if ( node.nodeType === 1){count++;}}return count;}});}})( window.Node || window.Element);(function ( constructor){if ( constructor &&constructor.prototype &&constructor.prototype.children == null){Object.defineProperty( constructor.prototype, 'children', {get: function (){var i = 0, node, nodes = this.childNodes, children = [];while ( node = nodes[ i++ ]){if ( node.nodeType === 1){children.push( node);}}return children;}});}})( window.Node || window.Element);if ( window.Element && !Element.prototype.closest){Element.prototype.closest =function ( s){var matches = (this.document || this.ownerDocument).querySelectorAll( s),i,el= this;do{i = matches.length;while ( --i >= 0 && matches.item( i)!== el){}} while ( (i < 0)&& (el = el.parentElement));return el;};Node.prototype.closest= Element.prototype.closest;}HTMLElement.prototype.css = function ( attribute, value){if ( validate.is.object( attribute)){for ( var name in attribute){if ( validate.is.number( attribute[ name ])|| validate.is.string( attribute[ name ])){this.style[ validate.string( name)] = attribute[ name ];}}return this;}else if ( validate.is.number( value)|| validate.is.string( value)){this.style[ validate.string( attribute)] = value;return this;}else{var v = window.getComputedStyle( this, '').getPropertyValue( validate.string( attribute));if ( !v){v = this.style[ attribute ];}var n = parseInt( v);return isNaN( n)? v : n;}};HTMLElement.prototype.on = function ( event, deferer, callable){if ( typeof deferer === 'string'){this.addEventListener( event, function ( e){var element = e.target.closest( deferer);if ( element){callable( {type : e.type,target : e.target,currentTarget: element,pageX: e.pageX,pageY: e.pageY,clientX: e.clientX,clientY: e.clientY,touches: e.touches,which: e.which,altKey : e.altKey,ctrlKey: e.ctrlKey,shiftKey : e.shiftKey,dataTransfer : e.dataTransfer,stopPropagation: function (){e.stopPropagation();},preventDefault : function (){e.preventDefault();}});}});}else{this.addEventListener( event, deferer);}return this;};NodeList.prototype.on = function ( event, callable){for ( var i = 0; i < this.length; i++){this[ i ].on( event, callable);}return this;};Array.prototype.on = function ( event, callable){for ( var i = 0; i < this.length; i++){this[ i ].on( event, callable);}return this;};Window.prototype.on = function ( event, callable){this.addEventListener( event, callable);return this;};String.prototype.md5 = function (){var string = this;function RotateLeft( lValue, iShiftBits){return (lValue << iShiftBits)| (lValue >>> (32 - iShiftBits));}function AddUnsigned( lX, lY){var lX4, lY4, lX8, lY8, lResult;lX8 = (lX & 0x80000000);lY8 = (lY & 0x80000000);lX4 = (lX & 0x40000000);lY4 = (lY & 0x40000000);lResult = (lX & 0x3FFFFFFF)+ (lY & 0x3FFFFFFF);if ( lX4 & lY4){return (lResult ^ 0x80000000 ^ lX8 ^ lY8);}if ( lX4 | lY4){if ( lResult & 0x40000000){return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);}else{return (lResult ^ 0x40000000 ^ lX8 ^ lY8);}}else{return (lResult ^ lX8 ^ lY8);}}function F( x, y, z){return (x & y)| ((~x)& z);}function G( x, y, z){return (x & z)| (y & (~z));}function H( x, y, z){return (x ^ y ^ z);}function I( x, y, z){return (y ^ (x | (~z)));}function FF( a, b, c, d, x, s, ac){a = AddUnsigned( a, AddUnsigned( AddUnsigned( F( b, c, d), x), ac));return AddUnsigned( RotateLeft( a, s), b);}function GG( a, b, c, d, x, s, ac){a = AddUnsigned( a, AddUnsigned( AddUnsigned( G( b, c, d), x), ac));return AddUnsigned( RotateLeft( a, s), b);}function HH( a, b, c, d, x, s, ac){a = AddUnsigned( a, AddUnsigned( AddUnsigned( H( b, c, d), x), ac));return AddUnsigned( RotateLeft( a, s), b);}function II( a, b, c, d, x, s, ac){a = AddUnsigned( a, AddUnsigned( AddUnsigned( I( b, c, d), x), ac));return AddUnsigned( RotateLeft( a, s), b);}function ConvertToWordArray( string){var lWordCount;var lMessageLength = string.length;var lNumberOfWords_temp1 = lMessageLength + 8;var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64))/ 64;var lNumberOfWords = (lNumberOfWords_temp2 + 1)* 16;var lWordArray = Array( lNumberOfWords - 1);var lBytePosition= 0;var lByteCount = 0;while ( lByteCount < lMessageLength){lWordCount = (lByteCount - (lByteCount % 4))/ 4;lBytePosition= (lByteCount % 4)* 8;lWordArray[ lWordCount ] = (lWordArray[ lWordCount ] | (string.charCodeAt( lByteCount)<< lBytePosition));lByteCount++;}lWordCount = (lByteCount - (lByteCount % 4))/ 4;lBytePosition= (lByteCount % 4)* 8;lWordArray[ lWordCount ] = lWordArray[ lWordCount ] | (0x80 << lBytePosition);lWordArray[ lNumberOfWords - 2 ] = lMessageLength << 3;lWordArray[ lNumberOfWords - 1 ] = lMessageLength >>> 29;return lWordArray;}function WordToHex( lValue){var WordToHexValue = '', WordToHexValue_temp = '', lByte, lCount;for ( lCount = 0; lCount <= 3; lCount++){lByte = (lValue >>> (lCount * 8))& 255;WordToHexValue_temp = '0' + lByte.toString( 16);WordToHexValue= WordToHexValue + WordToHexValue_temp.substr( WordToHexValue_temp.length - 2, 2);}return WordToHexValue;}function Utf8Encode( string){string= string.replace( /\r\n/g, '\n');var utftext = '';for ( var n = 0; n < string.length; n++){var c = string.charCodeAt( n);if ( c < 128){utftext += String.fromCharCode( c);}else if ( (c > 127)&& (c < 2048)){utftext += String.fromCharCode( (c >> 6)| 192);utftext += String.fromCharCode( (c & 63)| 128);}else{utftext += String.fromCharCode( (c >> 12)| 224);utftext += String.fromCharCode( ((c >> 6)& 63)| 128);utftext += String.fromCharCode( (c & 63)| 128);}}return utftext;}var x, k, AA, BB, CC, DD, a, b, c, d;var S11 = 7, S12 = 12, S13 = 17, S14 = 22;var S21 = 5, S22 = 9, S23 = 14, S24 = 20;var S31 = 4, S32 = 11, S33 = 16, S34 = 23;var S41 = 6, S42 = 10, S43 = 15, S44 = 21;string = Utf8Encode( string);x = ConvertToWordArray( string);a = 0x67452301;b = 0xEFCDAB89;c = 0x98BADCFE;d = 0x10325476;for ( k = 0; k < x.length; k += 16){AA = a;BB = b;CC = c;DD = d;a= FF( a, b, c, d, x[ k ], S11, 0xD76AA478);d= FF( d, a, b, c, x[ k + 1 ], S12, 0xE8C7B756);c= FF( c, d, a, b, x[ k + 2 ], S13, 0x242070DB);b= FF( b, c, d, a, x[ k + 3 ], S14, 0xC1BDCEEE);a= FF( a, b, c, d, x[ k + 4 ], S11, 0xF57C0FAF);d= FF( d, a, b, c, x[ k + 5 ], S12, 0x4787C62A);c= FF( c, d, a, b, x[ k + 6 ], S13, 0xA8304613);b= FF( b, c, d, a, x[ k + 7 ], S14, 0xFD469501);a= FF( a, b, c, d, x[ k + 8 ], S11, 0x698098D8);d= FF( d, a, b, c, x[ k + 9 ], S12, 0x8B44F7AF);c= FF( c, d, a, b, x[ k + 10 ], S13, 0xFFFF5BB1);b= FF( b, c, d, a, x[ k + 11 ], S14, 0x895CD7BE);a= FF( a, b, c, d, x[ k + 12 ], S11, 0x6B901122);d= FF( d, a, b, c, x[ k + 13 ], S12, 0xFD987193);c= FF( c, d, a, b, x[ k + 14 ], S13, 0xA679438E);b= FF( b, c, d, a, x[ k + 15 ], S14, 0x49B40821);a= GG( a, b, c, d, x[ k + 1 ], S21, 0xF61E2562);d= GG( d, a, b, c, x[ k + 6 ], S22, 0xC040B340);c= GG( c, d, a, b, x[ k + 11 ], S23, 0x265E5A51);b= GG( b, c, d, a, x[ k ], S24, 0xE9B6C7AA);a= GG( a, b, c, d, x[ k + 5 ], S21, 0xD62F105D);d= GG( d, a, b, c, x[ k + 10 ], S22, 0x2441453);c= GG( c, d, a, b, x[ k + 15 ], S23, 0xD8A1E681);b= GG( b, c, d, a, x[ k + 4 ], S24, 0xE7D3FBC8);a= GG( a, b, c, d, x[ k + 9 ], S21, 0x21E1CDE6);d= GG( d, a, b, c, x[ k + 14 ], S22, 0xC33707D6);c= GG( c, d, a, b, x[ k + 3 ], S23, 0xF4D50D87);b= GG( b, c, d, a, x[ k + 8 ], S24, 0x455A14ED);a= GG( a, b, c, d, x[ k + 13 ], S21, 0xA9E3E905);d= GG( d, a, b, c, x[ k + 2 ], S22, 0xFCEFA3F8);c= GG( c, d, a, b, x[ k + 7 ], S23, 0x676F02D9);b= GG( b, c, d, a, x[ k + 12 ], S24, 0x8D2A4C8A);a= HH( a, b, c, d, x[ k + 5 ], S31, 0xFFFA3942);d= HH( d, a, b, c, x[ k + 8 ], S32, 0x8771F681);c= HH( c, d, a, b, x[ k + 11 ], S33, 0x6D9D6122);b= HH( b, c, d, a, x[ k + 14 ], S34, 0xFDE5380C);a= HH( a, b, c, d, x[ k + 1 ], S31, 0xA4BEEA44);d= HH( d, a, b, c, x[ k + 4 ], S32, 0x4BDECFA9);c= HH( c, d, a, b, x[ k + 7 ], S33, 0xF6BB4B60);b= HH( b, c, d, a, x[ k + 10 ], S34, 0xBEBFBC70);a= HH( a, b, c, d, x[ k + 13 ], S31, 0x289B7EC6);d= HH( d, a, b, c, x[ k ], S32, 0xEAA127FA);c= HH( c, d, a, b, x[ k + 3 ], S33, 0xD4EF3085);b= HH( b, c, d, a, x[ k + 6 ], S34, 0x4881D05);a= HH( a, b, c, d, x[ k + 9 ], S31, 0xD9D4D039);d= HH( d, a, b, c, x[ k + 12 ], S32, 0xE6DB99E5);c= HH( c, d, a, b, x[ k + 15 ], S33, 0x1FA27CF8);b= HH( b, c, d, a, x[ k + 2 ], S34, 0xC4AC5665);a= II( a, b, c, d, x[ k ], S41, 0xF4292244);d= II( d, a, b, c, x[ k + 7 ], S42, 0x432AFF97);c= II( c, d, a, b, x[ k + 14 ], S43, 0xAB9423A7);b= II( b, c, d, a, x[ k + 5 ], S44, 0xFC93A039);a= II( a, b, c, d, x[ k + 12 ], S41, 0x655B59C3);d= II( d, a, b, c, x[ k + 3 ], S42, 0x8F0CCC92);c= II( c, d, a, b, x[ k + 10 ], S43, 0xFFEFF47D);b= II( b, c, d, a, x[ k + 1 ], S44, 0x85845DD1);a= II( a, b, c, d, x[ k + 8 ], S41, 0x6FA87E4F);d= II( d, a, b, c, x[ k + 15 ], S42, 0xFE2CE6E0);c= II( c, d, a, b, x[ k + 6 ], S43, 0xA3014314);b= II( b, c, d, a, x[ k + 13 ], S44, 0x4E0811A1);a= II( a, b, c, d, x[ k + 4 ], S41, 0xF7537E82);d= II( d, a, b, c, x[ k + 11 ], S42, 0xBD3AF235);c= II( c, d, a, b, x[ k + 2 ], S43, 0x2AD7D2BB);b= II( b, c, d, a, x[ k + 9 ], S44, 0xEB86D391);a= AddUnsigned( a, AA);b= AddUnsigned( b, BB);c= AddUnsigned( c, CC);d= AddUnsigned( d, DD);}var temp = WordToHex( a)+ WordToHex( b)+ WordToHex( c)+ WordToHex( d);return temp.toLowerCase();};function window_reload(){window.location.reload();}function window_open( url, target, features){window.open( url, '', features);}function window_redirect( location){window.location = location;}function remove_children( e){validate.element( e);for ( var i = e.childNodes.length - 1; i >= 0; i--){var item = e.childNodes[ i ];e.removeChild( item);}}function remove_class( elements, className){for ( var i = elements.length - 1; i >= 0; i--){elements[ i ].classList.remove( className);}}var delay = (function (){var timer = {};return function ( callback, miliseconds, id, parameter){id = id || 'delay';clearTimeout( timer[ id ]);timer[ id ] = setTimeout( callback.bind( null, parameter), miliseconds || 500);};})();function post( url, data){if ( empty( url)){return false;}var l = window.location,p = $http( l.protocol + '/' + '/' + l.hostname + url).post( data),e = function ( response){console.log( 2, 'error', response);};return {'done': function ( callback){p.then( callback).catch( e);}};}function $http( url){var local = {};local.create = {request: function ( data){var request = new FormData;if ( data){for ( var k in data){request.append( k, data[ k ]);}}return request;}};local.ajax = function ( method, url, data){return new Promise( function ( resolve, reject){var xhr = new XMLHttpRequest;xhr.open( method, url, true);xhr.send(data instanceof FormData? data: local.create.request( data));xhr.onload= function (){switch ( this.status){case 200:resolve( this.response);break;default:reject( this.statusText);}};xhr.onerror = function (){reject( this.statusText);};});};return {'post': function ( data){return local.ajax( 'POST', url, data);}};}function integer( mixed){return parseInt( validate.number( mixed));}function float( float, decimals){float = parseFloat( validate.number( float)|| 0);if ( validate.is.number( decimals)){decimals = integer( decimals || 0);var increaseDecimals = float * Math.pow( 10, decimals + 2);var roundAndDecrease = Math.round( increaseDecimals)/ Math.pow( 10, 2);float= Math.round( roundAndDecrease)/ Math.pow( 10, decimals);}return float;}function empty( mixed){switch ( true){case isPlainObject( mixed)&& isEmptyObject( mixed):case mixed === null:case mixed === undefined:case mixed === 'undefined':case mixed === 0:case mixed === '':case mixed === '0':case mixed.length === 0:return true;}return false;}function isEmptyObject( obj){return Object.keys( obj).length === 0;}function isPlainObject( obj){if ( obj === null || typeof (obj)!== 'object' || obj.nodeType || obj === obj.window){return false;}return !(obj.constructor &&!Object.prototype.hasOwnProperty.call( obj.constructor.prototype, 'isPrototypeOf'));}function pad( str, max, dir){str = String( str);return str.length < max? pad( (!dir ? '0' : '')+ str + (dir ? '0' : ''), max, dir): str;}var create = {input: function ( value, type){var e= create.element( 'input');e.name = value;if ( type){e.type = validate.string( type);}return e;},file: function ( value){return create.input( value, 'file');},select: function ( value, options){var e= create.element( 'select');e.name = value;if ( options && options.length){for ( var i = 0; i < options.length; i++){e.appendChild( create.element( 'option', options[ i ]));}}return e;},label: function ( value){return create.element( 'label', value);},empty_image: function (){var img = new Image;img.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=';return img;},element: function ( type, content, attributes){var e = document.createElement( type || 'div');content ? e.appendChild( create.fromHtml( content)): false;attributes = attributes || {};for ( var name in attributes){e.setAttribute( name, attributes[ name ]);}return e;},textNode: function ( content){return document.createTextNode( validate.string( content, E_TYPE_HTMLSTRING));},fromHtml: function ( html){switch ( true){case validate.is.node( html):case validate.is.element( html):case validate.is.nodelist( html):return html;}var e = create.element( 'template');e.innerHTML = validate.scalar( html, E_TYPE_HTMLSTRING);return e.content;},firstChildFromHtml: function ( html){var e = create.element();e.appendChild( create.fromHtml( html));return e.firstElementChild;},error: function ( message){throw new Error( message || E_UNDEFINED_MESSAGE);},dragstart: function ( e){if ( e.hasOwnProperty( 'originalEvent')){e = e.originalEvent;}e.dataTransfer.setDragImage( create.empty_image(), 0, 0);e.dataTransfer.setData( 'text/html', 'dragstart');e.stopPropagation();}};function texteditor( height){setTimeout( function (){var texteditor = document.querySelector( '#texteditor');if ( texteditor){CKEDITOR.replace( texteditor.id, {height : height < 300 ? 300 : height,filebrowserImageBrowseUrl: '/luna/editor/files/files.php',filebrowserImageUploadUrl: '/luna/editor/files/files.php'});}}, 350);}function colorpicker( align){var colorpickers = document.querySelectorAll( '.input-group');for ( var i = 0; i < colorpickers.length; i++){var color = colorpickers[ i ];var input = color.querySelector( 'input');var hook= color.querySelector( '.input-group-addon i');new Picker( {parent: hook,popup : align || 'right', color : input.value || '',editor: false,onOpen: function (){var parent = this.settings.parent.closest( '.input-group');var input= parent.querySelector( 'input');this.setColor( input.value);},onChange: function ( color){if ( color.hex.toUpperCase()!== '#00CCFFFF'){var parent= this.settings.parent.closest( '.input-group');var input = parent.querySelector( 'input');input.value = color.rgba[ 3 ] === 1? color.hex.substring( 0, 7).toUpperCase(): 'rgba('+ color.rgba[ 0 ] + ','+ color.rgba[ 1 ] + ','+ color.rgba[ 2 ] + ','+ color.rgba[ 3 ].toFixed( 1)+ ')';}}});}}if ( grecaptcha === undefined){var grecaptcha = {ready: function (){},execute: function (){}};}if ( google === undefined){var google = {maps: {Map : function (){},Marker: function (){this.addListener = function (){};},LatLngBounds: function (){},LatLng: function (){},fitBounds : function (){},InfoWindow: function (){this.open= function (){};this.addListener = function (){};}}};}var path = window.location.pathname;if ( path && path.lastIndexOf( '.php')> -1){path = path.substring( 0, path.lastIndexOf( '.php'));}var file = path;const __DIR__ = file.substring( 0, file.lastIndexOf( '/'))+ '/';const LN_SUCCES = 200;const LANGUAGE= 'nl-NL';const ACTIVE= 'active';const ACTIVECLASS = '.active';const CHILDREN= 'children';const CHILDCLASS= '.children';const OPENED= 'opened';const CLOSED= 'closed';const DRAGOVER = 'dragover';const DRAGAPPEND = 'append';const BODY = 'body';const LIMIT= 'limit';const LIMITCLASS = '.limit';const DATA_ID= 'data-id';const DATA_NODE= '[data-id]';const DATA_NULL= '[data-id="0"]';const KEY_ENTER= 13;const KEY_SHIFT= 16;const KEY_ESCAPE = 27;const KEY_END= 35;const KEY_HOME = 36;const KEY_LEFT = 37;const KEY_RIGHT= 39;const KEY_Y= 89;const KEY_N= 78;const E_TYPE = 'Variable is not a(n)[{0}]';const E_TYPE_NUMBER= E_TYPE.format( 'number');const E_TYPE_BOOLEAN = E_TYPE.format( 'boolean');const E_TYPE_STRING= E_TYPE.format( 'string');const E_TYPE_SCALAR= E_TYPE.format( 'scalar');const E_TYPE_ARRAY = E_TYPE.format( 'array');const E_TYPE_OBJECT= E_TYPE.format( 'object');const E_TYPE_FUNCTION= E_TYPE.format( 'function');const E_TYPE_FORM= E_TYPE.format( '(Form)Element');const E_TYPE_HTMLSTRING= E_TYPE.format( 'HTML String');const E_TYPE_JSONSTRING= E_TYPE.format( 'JSON String');const E_FUNCTION = '{0} is not a function';const E_FUNCTION_STOPPROPAGATION = E_FUNCTION.format( 'e.stopPropagation');const E_INSTANCEOF = 'Variable is not an instanceOf class [{0}].';const E_INSTANCEOF_DATE= E_INSTANCEOF.format( 'Date');const E_INSTANCEOF_MESSAGE = E_INSTANCEOF.format( 'Message');const E_INSTANCEOF_NODELIST= E_INSTANCEOF.format( '(HTML)NodeList');const E_INSTANCEOF_HTMLELEMENT = E_INSTANCEOF.format( '(HTML)Element');const E_INSTANCEOF_INPUT = E_INSTANCEOF.format( '(Input)Element');const E_INSTANCEOF_SELECT= E_INSTANCEOF.format( '(Select)Element');const E_INSTANCEOF_LABEL = E_INSTANCEOF.format( '(Label)Element');const E_INSTANCEOF_GOOGLEMAP = E_INSTANCEOF.format( 'Map');const E_INSTANCEOF_GOOGLEMARKER= E_INSTANCEOF.format( 'Google_Marker');const E_INSTANCEOF_DRAGGABLE = E_INSTANCEOF.format( 'Draggable');const E_UNDEFINED= '{0} is undefined.';const E_UNDEFINED_ID = E_UNDEFINED.format( 'id');const E_UNDEFINED_DATA_ID= E_UNDEFINED.format( '[data-id]');const E_UNDEFINED_PATH = E_UNDEFINED.format( 'Path');const E_UNDEFINED_LIST = E_UNDEFINED.format( 'List');const E_UNDEFINED_EXECUTE= E_UNDEFINED.format( 'Execute');const E_UNDEFINED_NAMESPACE= E_UNDEFINED.format( 'Namepace');const E_UNDEFINED_MESSAGE= E_UNDEFINED.format( 'Error message');const E_UNDEFINED_RECORD = E_UNDEFINED.format( 'Record(s)');const E_UNDEFINED_VALUE= E_UNDEFINED.format( 'Value');const E_UNDEFINED_KEYCODE= E_UNDEFINED.format( 'Keycode');const E_UNDEFINED_TYPE = E_UNDEFINED.format( 'Type');const E_UNDEFINED_DATE = E_UNDEFINED.format( 'Date');const E_UNDEFINED_FILE = E_UNDEFINED.format( 'File');validate ={is: {value: function ( mixed){return empty( mixed)=== false;},string: function ( mixed){return typeof mixed === 'string' && validate.is.value( mixed);},number: function ( mixed){return ( typeof mixed === 'number' || typeof mixed === 'string')&& validate.is.numeric( mixed);},boolean: function ( mixed){return typeof mixed === 'boolean';},scalar: function ( mixed){return validate.is.string( mixed)|| validate.is.number( mixed)|| validate.is.boolean( mixed);},numeric: function ( mixed){return ( typeof mixed === 'number' || typeof mixed === 'string')&& ( mixed * ( 1 - 1)=== 0);},array: function ( mixed){return Array.isArray( mixed);},object: function ( mixed){return typeof mixed === 'object' && isPlainObject( mixed);},html: function ( mixed){var regEx = new RegExp( '<[a-z][^>]+>', 'ig');return validate.is.string( mixed)&& !!mixed.match( regEx)&& !!mixed.match( regEx)[ 0 ];},path: function ( mixed){var regEx = new RegExp( '^\/', 'ig');return validate.is.string( mixed)&& !!mixed.match( regEx);},date: function ( mixed){var regEx = new RegExp( '^[0-9]{4}-[0-9]{2}-[0-9]{2}$');return validate.is.string( mixed)&& !!mixed.match( regEx);},file: function ( mixed){return mixed instanceof File;},keycode: function ( mixed){return !empty( mixed)&& ( typeof mixed.which === 'number' || typeof mixed.keyCode === 'number');},json: function ( mixed){try{JSON.parse( validate.string( mixed));return true;}catch ( e){return false;}},class: function ( mixed, callable){return validate.is.function( callable)&& mixed&& mixed.constructor.name === callable.name;},classChild: function ( mixed, callable){return validate.is.function( callable)&& mixed&& mixed.constructor.name.indexOf( callable.name)!== -1;},function: function ( mixed){return typeof mixed === 'function';},form: function ( mixed){return validate.is.input( mixed)|| validate.is.select( mixed)|| validate.is.textarea( mixed);},nodeName: function ( type, mixed){return validate.is.element( mixed)&& mixed.nodeName.toLowerCase()=== type;},input: function ( mixed){return validate.is.nodeName( 'input', mixed);},textarea: function ( mixed){return validate.is.nodeName( 'textarea', mixed);},select: function ( mixed){return validate.is.nodeName( 'select', mixed);},node: function ( mixed){return validate.is.dom2.node( mixed)|| validate.is.dom1.node( mixed);},element: function ( mixed){return validate.is.dom2.element( mixed)|| validate.is.dom1.element( mixed);},nodelist: function ( mixed){return validate.is.dom2.nodelist( mixed);},fragment: function ( mixed){return validate.is.dom2.fragment( mixed)|| validate.is.dom1.fragment( mixed);},dom2: {node: function ( mixed){return 'object' === typeof Node && mixed instanceof Node;},element: function ( mixed){return 'object' === typeof HTMLElement && mixed instanceof HTMLElement;},nodelist: function ( mixed){return 'function' === typeof NodeList && mixed instanceof NodeList;},fragment: function ( mixed){return 'object' === typeof DocumentFragment && mixed instanceof DocumentFragment;}},dom1: {node: function ( mixed){return !!mixed && typeof mixed === 'object'&& typeof mixed.nodeType === 'number'&& typeof mixed.nodeName === 'string';},element: function ( mixed){return validate.is.dom1.node( mixed)&& mixed.nodeType === 1;},fragment: function ( mixed){return validate.is.dom1.node( mixed)&& mixed.nodeType === 11;}},not: {numeric: function ( mixed){return validate.is.numeric( mixed)!== true;},string: function ( mixed){return validate.is.string( mixed)!== true;},function: function ( mixed){return validate.is.function( mixed)!== true;}},strict: {string: function ( mixed){return validate.is.string( mixed)&& validate.is.value( mixed);},number: function ( mixed){return validate.is.number( mixed)&& mixed > 0;},array: function ( mixed){return Array.isArray( mixed)&& mixed.length > 0;}}}, type: function ( type, message, mixed){if ( validate.is.not.string( type)|| validate.is.not.function( validate.is[ type ])){create.error( E_UNDEFINED_TYPE);}return validate.is[ type ].apply( null, Array.prototype.slice.call( arguments, 2))? mixed: create.error( message);},value: function ( mixed, message){return validate.type( 'value', message || E_UNDEFINED_VALUE, mixed);},json: function ( mixed, message){return JSON.parse( validate.type( 'json', message || E_TYPE_JSONSTRING, mixed));},html: function ( mixed, message){return validate.type( 'html', message || E_TYPE_HTMLSTRING, mixed);},path: function ( mixed, message){return validate.type( 'path', message || E_UNDEFINED_PATH, mixed);},date: function ( mixed, message){return validate.type( 'date', message || E_UNDEFINED_DATE, mixed);},file: function ( mixed, message){return validate.type( 'file', message || E_UNDEFINED_FILE, mixed);},keycode: function ( mixed, message){validate.type( 'keycode', message || E_UNDEFINED_KEYCODE, mixed);return typeof mixed.which === 'number' ? mixed.which : mixed.keyCode;},string: function ( mixed, message){return validate.type( 'string', message || E_TYPE_STRING, mixed);},number: function ( mixed, message){return validate.type( 'number', message || E_TYPE_NUMBER, mixed);},boolean: function ( mixed, message){return validate.type( 'boolean', message || E_TYPE_BOOLEAN, mixed);},scalar: function ( mixed, message){return validate.type( 'scalar', message || E_TYPE_SCALAR, mixed);},array: function ( mixed, message){return validate.type( 'array', message || E_TYPE_ARRAY, mixed);},object: function ( mixed, message){return validate.type( 'object', message || E_TYPE_OBJECT, mixed);},function: function ( mixed, message){return validate.type( 'function', message || E_TYPE_FUNCTION, mixed);},class: function ( mixed, callable, message){var error = E_INSTANCEOF.format( callable.name);return validate.type( 'class', message || error, mixed, callable);},classChild: function ( mixed, callable, message){var error = E_INSTANCEOF.format( callable.name);return validate.type( 'classChild', message || error, mixed, callable);},form: function ( mixed, message){return validate.type( 'form', message || E_TYPE_FORM, mixed);},input: function ( mixed, message){return validate.type( 'input', message || E_INSTANCEOF_INPUT, mixed);},select: function ( mixed, message){return validate.type( 'select', message || E_INSTANCEOF_SELECT, mixed);},element: function ( mixed, message){return validate.type( 'element', message || E_INSTANCEOF_HTMLELEMENT, mixed);},nodelist: function ( mixed, message){return validate.type( 'nodelist', message || E_INSTANCEOF_NODELIST, mixed);},fragment: function ( mixed, message){return validate.type( 'fragment', message || E_INSTANCEOF_HTMLELEMENT, mixed);},strict: {type: function ( type, message, mixed){if ( validate.is.not.string( type)|| validate.is.not.function( validate.is[ type ])){create.error( E_UNDEFINED_TYPE);}return validate.is.strict[ type ].apply( null, Array.prototype.slice.call( arguments, 2))? mixed: create.error( message);},string: function ( mixed, message){return validate.strict.type( 'string', message || E_TYPE_STRING, mixed);},array: function ( mixed, message){return validate.strict.type( 'array', message || E_TYPE_ARRAY, mixed);},numeric: function ( mixed, message){return validate.is.strict.string( mixed)|| validate.is.strict.number( mixed)? mixed: create.error( message || E_TYPE_NUMBER);}}}; function Lightbox(){var share = this, local = {};const SHADOW = 'shadow';const LIGHTBOX = 'lightbox';local.icon = false;local.lightbox = false;local.shadow = false;local.get = {icon: function (){return validate.element( local.icon);},title: function ( icon){var img = icon.querySelector( 'img');if ( img){return img.getAttribute( 'alt');}return icon.getAttribute( 'title');},shadow: function (){return local.shadow;},lightbox: function (){return local.lightbox;},content: function (){var icon= local.get.icon();var src = icon.getAttribute( 'data-src')|| icon.src;var href= icon.getAttribute( 'href');var title = local.get.title( icon);switch ( true){case local.is.image( src || href):return local.create.image(src || href,icon.getAttribute( 'rel'),title);default:return local.create.iframe( src);}}};local.set = {icon: function ( value){local.icon = value;local.get.icon();},shadow: function ( value){local.shadow = value;},lightbox: function ( value){local.lightbox = value;},open: function (){if ( local.is.lightbox()){var lightbox = local.get.lightbox();lightbox.classList.add( OPENED);}}};local.is = {icon: function (){return local.icon !== false;},shadow: function (){return local.shadow !== false;},lightbox: function (){return local.lightbox !== false;},image: function ( src){return src && src.match( new RegExp( '(jpe?g|png)', 'i'))!== null;}};local.create = {shadow: function (){local.set.shadow(document.body.appendChild(create.element( 'section', '', { id: SHADOW })));},lightbox: function (){local.set.lightbox(document.body.appendChild(create.element( 'section', '', { id: LIGHTBOX })));setTimeout( local.set.open, 1);},content: function (){var lightbox = local.get.lightbox();var main = lightbox.appendChild(create.element( 'main'));var footer = lightbox.appendChild(create.element( 'footer'));footer.appendChild( local.create.title());footer.appendChild( local.create.close());main.appendChild( local.get.content());},image: function ( src, group, title){var lightbox = local.get.lightbox();lightbox.classList.add( 'images');var footer = lightbox.querySelector( 'footer .title');footer.innerHTML = title;var figure, section = create.element( 'section');figure = section.appendChild(create.element( 'figure', '', { 'class': 'main' }));figure.appendChild(create.element( 'img', '', { src: src }));var images = group? document.querySelectorAll( '[rel="' + group + '"]'): [];if ( images.length > 1){section.appendChild( local.create.group( images));}return section;},group: function ( images){var visible = create.element( 'section', '', { 'class': 'visible' }),figure= visible.appendChild(create.element( 'figure', '', {'class': 'animate','draggable': 'true'}));for ( var i = 0; i < images.length; i++){var e = images[ i ];if ( e.nodeName !== 'IMG'){e = e.querySelector( 'img');}if ( e){figure.appendChild(create.element( 'img', '', {src: e.src,alt: local.get.title( e)}));}}return visible;},iframe: function ( src){return create.element( 'iframe', '', {src: src});},title: function (){return create.element( 'div', '', {'class': 'title'});},close: function (){return create.element( 'div', '', {'class': 'close fa fa-times-circle'});}};local.clear = {lightbox: function (){if ( local.is.lightbox()){var e = local.get.lightbox();e.parentNode.removeChild( e);}},shadow: function (){if ( local.is.shadow()){var e = local.get.shadow();e.parentNode.removeChild( e);}}};share.event = {open: function ( e){e.preventDefault();local.set.icon( e.currentTarget);local.create.shadow();local.create.lightbox();local.create.content();},close: function (){local.clear.lightbox();local.clear.shadow();},close_reload: function (){share.event.close();window_reload();}};}function Images(){var share = this, local = {};local.title = false;local.main = false;local.element = false;local.mousestart = 0;local.get = {title: function (){return local.title;},element: function (){return validate.element( local.element);},main: function (){return local.get.element().querySelector( '.main');},main_image: function (){var main = local.get.main();return main ? main.querySelector( 'img'): local.main;},mousestart: function (){return integer( local.mousestart);},visible: function (){return local.get.element().querySelector( '.visible');},visible_width: function (){return local.get.visible().offsetWidth;},visible_center: function (){return parseInt( (local.get.visible_width()/ 2)+ '');},scroll: function (){var visible = local.get.visible();return visible ? visible.querySelector( '[draggable=true]'): false;},scroll_first: function (){return local.get.scroll().firstChild;},scroll_last: function (){var images = local.get.images();return images[ images.length - 1 ];},scroll_current: function (){var main= local.get.main_image();var image = main ? local.get.scroll().querySelector('img[data-sequence="' + main.dataset.sequence + '"]'): false;return image || local.get.scroll_first()|| main;},scroll_width: function (){return local.get.scroll().scrollWidth;},scroll_max: function (){return -(local.get.scroll_width()- local.get.visible_width());},scroll_left: function (){return local.get.scroll().css( 'left');},images: function (){var scroll = local.get.scroll();return scroll ? scroll.querySelectorAll( 'img'): false;},image_width: function ( img){return parseInt( img.offsetWidth)+ img.css( 'margin-left')+ img.css( 'margin-right');},image_right: function ( img){return local.get.scroll_left()+ img.offsetLeft+ local.get.image_width( img);},keycode: function ( e){if ( e === undefined){return '';}if ( e.which && typeof e.which === 'number'){return e.which;}if ( e.keyCode && typeof e.keyCode === 'number'){return e.keyCode;}return '';},offsetleft: function ( e){var o = 0;while ( e && e.offsetLeft !== undefined){o += Math.abs( e.offsetLeft - ( e.parentNode.offsetLeft || 0));e = e.parentNode;}return o;}};local.set = {title: function ( value){local.title = value;},element: function ( value){local.element = value;local.get.element();local.set.unique();},unique: function (){var main = local.get.main_image();var images = local.get.images();if ( images){if ( empty( main)|| main === false){var parent = local.get.main();if ( parent && images.length > 0){main = parent.appendChild( images[ 0 ].cloneNode());}else if ( images.length){main = images[ 0 ].cloneNode();}}for ( var i = 0; i < images.length; i++){images[ i ].dataset.sequence = i + 1;if ( main.dataset.sequence === undefined && images[ i ].src === main.src){main.dataset.sequence = i + 1;}}}},mousestart: function ( n){local.mousestart = n;local.get.mousestart();},image_title: function ( img){var title = local.get.title();if ( validate.is.element( title)){title.innerHTML = img.getAttribute( 'alt');}},main_image: function ( img){var main = local.get.main_image();if ( main){main.src= img.src;main.dataset.sequence = img.dataset.sequence;}else{local.main = img.cloneNode();}},scroll_left: function ( n){n = local.create.max_scroll_value( integer( n));local.get.scroll().css( 'left', n + 'px');},main_offsetLeft: function ( img){local.clear.active();img.classList.add( ACTIVE);local.set.scroll_left( -img.offsetLeft);local.set.main_image( img);local.set.image_title( img);},animate: function (){local.get.scroll().classList.add( 'animate');}};share.set = {};share.set.title = local.set.title;share.set.element = local.set.element;local.is = {main: function (){return local.main !== false;},title: function (){return local.title !== false;},mousestart: function (){return local.mousestart > 0;},mousechange: function ( pageX){return local.mousestart !== pageX;},navigate: {left: function ( main, pageX){var rect = main.getBoundingClientRect();var min = rect.left;var max = min + Math.floor( rect.width / 7);return pageX > min && pageX < max;},right: function ( main, pageX){var rect = main.getBoundingClientRect();var max = rect.right;var min = max - Math.floor( rect.width / 7);return pageX > min && pageX < max;}}};local.create = {delta: function ( positionX){return positionX - local.get.mousestart();},left_drag: function ( delta){return local.get.scroll_left()+ delta;},left_click: function ( img){var width = local.get.image_width( img),left= local.get.scroll_left();return local.get.image_right( img)< local.get.visible_center()? left + width: left - width;},max_scroll_value: function ( delta){var max = local.get.scroll_max();return Math.min( Math.max( delta, max), 0);}};local.move = {left: function (){var img = local.get.scroll_current();local.set.main_offsetLeft( img.nextElementSibling || img);},right: function (){var img = local.get.scroll_current();local.set.main_offsetLeft( img.previousElementSibling || img);}};local.clear = {animate: function (){local.get.scroll().classList.remove( 'animate');},active: function (){var images = local.get.images();for ( var i = 0; i < images.length; i++){images[ i ].classList.remove( ACTIVE);}}};share.event = {click: function ( e){local.set.animate();var img = validate.element( e.currentTarget);local.set.scroll_left( local.create.left_click( img));local.set.main_image( img);local.set.image_title( img);},navigation: {hover: function ( e){var main = validate.element( e.currentTarget);switch ( true){case local.is.navigate.left( main, e.pageX):main.setAttribute( 'data-navigation', 'left');break;case local.is.navigate.right( main, e.pageX):main.setAttribute( 'data-navigation', 'right');break;default:main.setAttribute( 'data-navigation', '');}},click: function ( e){var element = validate.element( e.currentTarget);switch ( element.dataset.navigation){case 'left':local.move.right();break;case 'right':local.move.left();break;}e.stopPropagation();}},key: function ( e){var img, keycode = local.get.keycode( e);switch ( keycode){case KEY_LEFT:local.set.animate();img = local.get.scroll_current();local.set.main_offsetLeft( img.previousElementSibling || img);break;case KEY_RIGHT:local.set.animate();img = local.get.scroll_current();local.set.main_offsetLeft( img.nextElementSibling || img);break;case KEY_HOME:local.set.animate();local.clear.animate();local.set.main_offsetLeft( local.get.scroll_first());local.set.animate();e.preventDefault();break;case KEY_END:local.set.animate();local.clear.animate();local.set.main_offsetLeft( local.get.scroll_last());local.set.animate();e.preventDefault();break;}},touch: {start: function ( e){local.set.mousestart( e.touches[ 0 ].pageX);},move: function ( e){if ( local.is.mousestart()){local.create.delta( e.touches[ 0 ].pageX)< 0? local.move.left(): local.move.right();}local.set.mousestart( 0);},drag: {start: function ( e){local.set.mousestart( e.touches[ 0 ].pageX);},move: function ( e){local.clear.animate();local.set.scroll_left(local.create.left_drag(local.create.delta( e.touches[ 0 ].pageX)));local.set.mousestart( e.touches[ 0 ].pageX);}}},drag: {start: function ( e){create.dragstart( e);local.set.mousestart( e.pageX);},move: function ( e){if ( local.is.mousechange( e.pageX)){local.clear.animate();var d = local.create.delta( e.pageX);var n = local.create.left_drag( d);local.set.scroll_left( n);local.set.mousestart( e.pageX);}e.stopPropagation();},stop: function (){local.set.animate();}}};}function Readmore(){var share = this, local = {};local.elements = [];local.get = {elements: function (){return local.elements;},open: function ( e){return e.dataset.open || 'lees meer...';},close: function ( e){return e.dataset.close || 'lees minder...';}};local.set = {elements: function ( value){local.elements = validate.nodelist( value);},open: function ( e){e.dataset.display = 'true';e.style.height= e.scrollHeight + 'px';},close: function ( e){e.dataset.display = '';e.style.height= '';}};share.set= {};share.set.elements = local.set.elements;local.is = {open: function ( e){return e.dataset.display === 'true';}};local.create = {toggle: function ( value){return create.element( 'a', value, {'href' : 'javascript:void(0);','class': 'toggle','title': value});}};local.clear = {};share.event = {click: function ( e){var toggle = validate.element( e.currentTarget);var readmore = toggle.previousElementSibling;if ( local.is.open( readmore)){toggle.innerHTML = local.get.open( readmore);toggle.setAttribute( 'title', local.get.open( readmore));local.set.close( readmore);}else{toggle.innerHTML = local.get.close( readmore);toggle.setAttribute( 'title', local.get.close( readmore));local.set.open( readmore);}}};share.execute = function (){var elements = local.get.elements();for ( var i = 0; i < elements.length; i++){var e = elements[ i ];e.parentNode.insertBefore(local.create.toggle( local.get.open( e)),e.nextSibling);}};}function Elements_Resize(){var share = this, local = {};local.delta = 0;local.threshold = 0;local.get = {delta: function ( e){return e.offsetTop + e.scrollHeight + local.get.padding( e)- local.threshold;},padding: function ( e){return local.is.contentBox( e)? e.css( 'padding-top')+ e.css( 'padding-bottom'): 0;},movable: function (){return local.get.elements.text().concat( local.get.elements.image()).filter( function ( e){return local.is.movable( e);});},resizable: function (){return local.get.elements.text().concat( local.get.elements.menu());},elements: {content: function (){return document.body.querySelector( '#hoofd > #content');},bottom: function (){return document.body.querySelector( '#hoofd > #bottom');},text: function (){return local.create.list(document.body.querySelectorAll( '#hoofd > .text'));},image: function (){return local.create.list(document.body.querySelectorAll( '#hoofd > .image'));},menu: function (){return local.create.list(document.body.querySelectorAll( '#hoofd > .menu'));}}}; local.set = {max: function ( value){local.delta = Math.max( local.delta, value);},threshold: function ( value){local.threshold = value;}}; local.increase = {height: function (){local.increase.elements.height();local.increase.elements.top();local.increase.contentHeight();},elements: {top: function (){if ( local.delta){var movable = local.get.movable();for ( let i = 0; i < movable.length; i++){var e = movable[ i ];e.css( 'top', '');var t = e.css( 'top');if ( isNaN( t)){t = 0;}e.css( 'top', (t + local.delta)+ 'px');}}},height: function (){var resizables = local.get.resizable();for ( let i = 0; i < resizables.length; i++){var e = resizables[ i ];if ( local.is.bigger( e)){if ( local.is.movable( e)=== false){var delta = local.get.delta( e);if ( delta > 0){local.set.max( delta);}}e.css( 'height', e.scrollHeight + 'px');}}}},contentHeight: function (){var e = local.get.elements.content();e.css( 'height', '');var h = e.css( 'height');if ( isNaN( h)){h = 0;}e.css( 'height', (h + local.delta)+ 'px');}}; local.is = {bigger: function ( e){e.css( 'height', '');return e.scrollHeight - local.get.padding( e)> e.css( 'height');},movable: function ( e){return e.offsetTop >= local.threshold;},resizable: function (){return local.is.not.responsive()&& local.is.not.mobile()&& local.is.not.template()&& local.is.bottom();},bottom: function (){return document.querySelector( '#bottom');},not: {responsive: function (){return !document.querySelector( '[data-responsive]');},mobile: function (){return !document.body.classList.contains( 'mobile');},template: function (){return !document.body.classList.contains( 'template');}},contentBox: function ( e){return e.css( 'box-sizing')=== 'content-box';}}; local.create = {list: function ( nodeList){var response = [];for ( let i = 0; i < nodeList.length; i++){response.push( nodeList[ i ]);}return response;}};local.clear = {height: function (){var styles = document.body.querySelectorAll( '#hoofd > .structure[style]');for ( let i = 0; i < styles.length; i++){styles[ i ].removeAttribute( 'style');}},style: function (){var styles = document.body.querySelectorAll( '[style=""]');for ( let i = 0; i < styles.length; i++){styles[ i ].removeAttribute( 'style');}}};share.resize = function (){if ( local.is.resizable()){local.delta = 0;local.clear.height();local.set.threshold( local.get.elements.bottom().offsetTop);local.increase.height();local.clear.style();}}; }function Slideshow(){var share = this, local = {};local.timer = 0;local.pointer = 0;local.element = false;local.get = {timer: function (){return local.timer;},pointer: function (){return local.pointer;},speed: function (){var speed = local.get.element().getAttribute( 'data-speed');return float( speed || 5, 1)* 1000;},element: function (){return validate.element( local.element);},count: function (){return local.get.element().children.length;},current: function (){return local.get.element().children[ local.get.pointer()];}};local.set = {timer: function ( value){local.timer = value;},active: function (){local.get.current().classList.add( ACTIVE);},element: function ( value){local.element = value;local.get.element();},next: function (){local.clear.active();var pointer = local.get.pointer();local.pointer = local.calculate.pointer( ++pointer);},previous: function (){local.clear.active();var pointer = local.get.pointer();local.pointer = local.calculate.pointer( --pointer);}};share.set = {};share.set.element = local.set.element;local.slide = function (){local.clear.timer();local.set.active();local.set.timer( setTimeout( local.move.next, local.get.speed()));};local.move = {next: function (){local.set.next();local.slide();},previous: function (){local.set.previous();local.slide();}};local.calculate = {pointer: function ( pointer){var count = local.get.count();return pointer < count ? (pointer >= 0 ? pointer : count - 1): 0;}};local.clear = {timer: function (){clearTimeout( local.get.timer());},active: function (){local.get.element().children[ local.get.pointer()].classList.remove( ACTIVE);}};share.event = {next: local.move.next,previous: local.move.previous};share.execute = local.slide;}function Input_File(){var share = this, local = {};const INPUT = 'input[type="file"]';const PLACEHOLDER = 'input[type="text"]';local.input = false;local.get = {input: function (){return validate.input( local.input);},placeholder: function (){return validate.input(local.get.input().parentNode.querySelector( PLACEHOLDER));},filenames: function (){var names = [],files = local.get.input().files;for ( var i = 0; i < files.length; i++){names.push( files[ i ].name);}return names;}};local.set = {input: function ( value){local.input = value;local.get.input();},value: function ( value){local.get.placeholder().value = value.join( ', ');}};share.set = {};share.set.input = local.set.input;local.clear = {input: function (){var e= local.get.input();e.type = '';e.type = 'file';}};local.validate = function (){var size= 0,input = local.get.input(),placeholder = local.get.placeholder(),max = parseInt( input.dataset.size)|| 0,count = parseInt( input.dataset.count)|| 0,label = input.parentNode.querySelector( 'label');if ( !max || !count){return true;}for ( var i = 0; i < input.files.length; i++){var file = input.files[ i ];size += file.size;}var error = size > max? 'Totale bestands formaat is te groot ( maximaal ' + (max / (1024 * 1024))+ 'MB)': (input.files.length > count? 'Teveel bestanden ( maximaal ' + count + ')': '');placeholder.classList.remove( 'error');if ( label){label.removeAttribute( 'data-error');}if ( error){placeholder.classList.add( 'error');if ( label){label.setAttribute( 'data-error', error);}return false;}return true;};share.validate = local.validate;share.event = {change: function ( e){local.set.input( e.currentTarget);local.set.value( local.get.filenames());local.validate();e.stopPropagation();},remove: function ( e){var parent = validate.element( e.currentTarget).parentNode;local.set.input( parent.querySelector( INPUT));local.clear.input();local.set.value( local.get.filenames());}};}function Input_Date(){var local = {}, share = this;const INPUT = 'input[type="datum"]';local.input = false;local.get = {input: function (){return validate.input( local.input);}};local.set = {input: function ( value){local.input = value;local.get.input();}};local.clear = {input: function (){local.get.input().value = '';}};share.event = {remove: function ( e){var parent = validate.element( e.currentTarget).parentNode;local.set.input( parent.querySelector( INPUT));local.clear.input();}};}document.ready( function (){var i, form, input, inputs, parent;inputs = document.querySelectorAll( '[data-message]');inputs.on( 'invalid', function ( e){input = e.currentTarget;input.setCustomValidity( '');if ( !input.validity.valid){input.setCustomValidity( input.dataset.message);}});inputs.on( 'input', function ( e){input = e.currentTarget;input.setCustomValidity( '');});if ( typeof Input_File === 'function'){var FLE = new Input_File;inputs = document.querySelectorAll( 'input[type=file]');inputs.on( 'change', FLE.event.change);for ( i = 0; i < inputs.length; i++){parent = inputs[ i ].parentNode;parent.on( 'click', '.remove', FLE.event.remove);}for ( i = 0; i < inputs.length; i++){form = inputs[ i ].closest( 'form');if ( form.dataset.event !== 'true'){form.setAttribute( 'data-event', 'true');form.on( 'submit', function ( e){var inputs = this.querySelectorAll( 'input[type=file]');for ( var i = 0; i < inputs.length; i++){FLE.set.input( inputs[ i ]);if ( FLE.validate()=== false){e.stopPropagation();e.preventDefault();return false;}}return true;});}}}var dates = document.querySelectorAll( 'input[type="date"],input[type="datum"]');for ( i = 0; i < dates.length; i++){input = dates[ i ];if ( typeof Input_Date === 'function'){parent = input.parentNode;if ( parent){var DATE = new Input_Date;parent.on( 'click', '.remove', DATE.event.remove);}}if ( typeof (jQuery)!= 'undefined' && jQuery !== null && jQuery().datepicker){$( input).datepicker( {showWeek : true,firstDay : 1,buttonImageOnly: false,dateFormat : 'yy-mm-dd',changeMonth: true,changeYear : true,yearRange: '-75:+5',onSelect : function ( d, i){if ( d !== i.lastVal){this.checkValidity();this.dispatchEvent( new Event( 'change', { 'bubbles': true }));}}});}}var honeytraps = document.querySelectorAll( '.RTZABKGUAGH');for ( i = 0; i < honeytraps.length; i++){var honeytrap = honeytraps[ i ];if ( honeytrap.value){var submit = get_current_form_element( honeytrap, 'input[type=submit]');if ( submit){submit.on( 'click', clear_honeytrap);}}}function clear_honeytrap( e){var honeytrap = get_current_form_element( e.currentTarget, '.RTZABKGUAGH');if ( honeytrap){honeytrap.setAttribute( 'value', '');}}function get_current_form_element( element, query){var form = element.closest( 'form');return form.querySelector( query);}inputs = document.querySelectorAll( 'form [data-sitekey]');inputs.on( 'click', select_recaptcha);function select_recaptcha( e){input = e.currentTarget;input.value = input.checked ? retrieve_recaptcha( input): '';}function retrieve_recaptcha( input){grecaptcha.ready( function (){grecaptcha.execute( input.dataset.sitekey, { action: 'submit' }).then( function ( token){if ( token){input.value = token;}});});return input.value;}colorpicker();});!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0];if(e&&(k=!0),k)return w=(0,y.default)(w,x),(0,b.default)(w,x.once),w},O=function(){w=(0,h.default)(),j()},_=function(){w.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},S=function(e){return e===!0||"mobile"===e&&p.default.mobile()||"phone"===e&&p.default.phone()||"tablet"===e&&p.default.tablet()||"function"==typeof e&&e()===!0},z=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?_():(document.querySelector("body").setAttribute("data-aos-easing",x.easing),document.querySelector("body").setAttribute("data-aos-duration",x.duration),document.querySelector("body").setAttribute("data-aos-delay",x.delay),"DOMContentLoaded"===x.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?j(!0):"load"===x.startEvent?window.addEventListener(x.startEvent,function(){j(!0)}):document.addEventListener(x.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||(0,d.default)("[data-aos]",O),w)};e.exports={init:z,refresh:j,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function o(t){var n=b,o=v;return b=v=void 0,k=t,g=e.apply(o,n)}function r(e){return k=e,h=setTimeout(s,t),_?o(e):g}function a(e){var n=e-w,o=e-k,i=t-n;return S?j(i,y-o):i}function c(e){var n=e-w,o=e-k;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=O();return c(e)?d(e):void(h=setTimeout(s,a(e)))}function d(e){return h=void 0,z&&b?o(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),k=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(O())}function m(){var e=O(),n=c(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),o(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,k=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(f);return t=u(t)||0,i(n)&&(_=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(f);return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:r,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":c(e);return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==("undefined"==typeof e?"undefined":c(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":c(e))||r(e)&&k.call(e)==d}function u(e){if("number"==typeof e)return e;if(a(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=m.test(e);return n||b.test(e)?v(e.slice(2),n?2:8):p.test(e)?s:+e}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f="Expected a function",s=NaN,d="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,b=/^0o[0-7]+$/i,v=parseInt,y="object"==("undefined"==typeof t?"undefined":c(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=y||g||Function("return this")(),w=Object.prototype,k=w.toString,x=Math.max,j=Math.min,O=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=b,o=v;return b=v=void 0,O=t,g=e.apply(o,n)}function r(e){return O=e,h=setTimeout(s,t),_?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function f(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=j();return f(e)?d(e):void(h=setTimeout(s,u(e)))}function d(e){return h=void 0,z&&b?i(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),O=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(j())}function m(){var e=j(),n=f(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),i(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,O=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(_=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||i(e)&&w.call(e)==s}function a(e){if("number"==typeof e)return e;if(r(e))return f;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||m.test(e)?b(e.slice(2),n?2:8):l.test(e)?f:+e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c="Expected a function",f=NaN,s="[object Symbol]",d=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,v="object"==("undefined"==typeof t?"undefined":u(t))&&t&&t.Object===Object&&t,y="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),h=Object.prototype,w=h.toString,k=Math.max,x=Math.min,j=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e,t){var n=window.document,r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,a=new r(o);i=t,a.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function o(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),n=Array.prototype.slice.call(e.removedNodes),o=t.concat(n).filter(function(e){return e.hasAttribute&&e.hasAttribute("data-aos")}).length;o&&i()})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){};t.default=n},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;ne.position?e.node.classList.add("aos-animate"):"undefined"!=typeof o&&("false"===o||!n&&"true"!==o)&&e.node.classList.remove("aos-animate")},o=function(e,t){var o=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,r){n(e,i+o,t)})};t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=o(i),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,r.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=o(i),a=function(e,t){var n=0,o=0,i=window.innerHeight,a={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(e=document.querySelectorAll(a.anchor)[0]),n=(0,r.default)(e).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=i/2;break;case"bottom-center":n+=i/2+e.offsetHeight;break;case"center-center":n+=i/2+e.offsetHeight/2;break;case"top-top":n+=i;break;case"bottom-top":n+=e.offsetHeight+i;break;case"center-top":n+=e.offsetHeight/2+i}return a.anchorPlacement||a.offset||isNaN(t)||(o=t),n+o};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])});document.ready( function (){var i, BODY = document.body;var slideshows = document.getElementsByClassName( 'slideshow');for ( i = 0; i < slideshows.length; i++){var slide= slideshows[ i ];var slider = slide.closest( '.slider');var next = slider ? slider.querySelector( '.next'): false;var previous = slider ? slider.querySelector( '.previous'): false;var SLD = new Slideshow;SLD.set.element( slide);SLD.execute();if ( next){next.on( 'click', SLD.event.next);}if ( previous){previous.on( 'click', SLD.event.previous);}}var images = BODY.querySelectorAll( '[data-delayed]');for ( i = 0; i < images.length; i++){images[ i ].src = images[ i ].dataset.delayed;}if ( BODY.querySelector( '[data-aos]')){setTimeout( function (){AOS.init( {easing: 'ease-in-out-sine',duration: '600',delay : '100'});}, 1000);}var RM = new Readmore;RM.set.elements( BODY.querySelectorAll( '.readmore'));RM.execute();var toggle = BODY.querySelectorAll( '.readmore + .toggle');toggle.on( 'click', RM.event.click);var CAR_IMAGE_BASE = '.module.carrousel',CAR_VISIBLE= '.module.carrousel .visible',CARROUSEL= BODY.querySelector( CAR_IMAGE_BASE);var CRS = new Images;if ( CARROUSEL){CRS.set.element( CARROUSEL);window.on( 'keydown', CRS.event.key);CARROUSEL.on( 'touchstart', CAR_VISIBLE, CRS.event.touch.drag.start);CARROUSEL.on( 'touchmove', CAR_VISIBLE, CRS.event.touch.drag.move);CARROUSEL.on( 'dragstart', CAR_VISIBLE, CRS.event.drag.start);CARROUSEL.on( 'dragover', CAR_VISIBLE, CRS.event.drag.move);CARROUSEL.on( 'drop', CAR_VISIBLE, CRS.event.drag.stop);CARROUSEL.on( 'mouseout', CAR_VISIBLE, CRS.event.drag.stop);CARROUSEL.on( 'mousemove', CAR_VISIBLE, CRS.event.navigation.hover);CARROUSEL.on( 'mouseout', CAR_VISIBLE, CRS.event.navigation.hover);CARROUSEL.on( 'click', '[data-navigation]', CRS.event.navigation.click);}var LBX = new Lightbox;BODY.querySelectorAll( 'a[rel^="lightbox"]').on( 'click', lbx_open);BODY.querySelectorAll( 'img[rel^="lightbox"]').on( 'click', lbx_open);BODY.querySelectorAll( 'a[rel^="prettyPhoto"]').on( 'click', lbx_open);var LGB_IMAGE_BASE= '#lightbox.images',LGB_MAIN_IMAGE= '#lightbox.images .main',LGB_VISIBLE = '#lightbox.images .visible',LGB_SCROLL_IMAGES = '#lightbox.images .visible figure img',LGB_IMAGE_TITLE = '#lightbox.images footer .title';var LGB_IMG = new Images;function lbx_open( e){LBX.event.open( e);BODY.querySelector( '#shadow').on( 'click', LBX.event.close);BODY.querySelector( '#lightbox .close').on( 'click', LBX.event.close);LGB_IMG.set.title( BODY.querySelector( LGB_IMAGE_TITLE));LGB_IMG.set.element( BODY.querySelector( LGB_IMAGE_BASE));window.removeEventListener( 'keydown', CRS.event.key);window.removeEventListener( 'keydown', LGB_IMG.event.key);window.on( 'keydown', LGB_IMG.event.key);}BODY.on( 'click', LGB_SCROLL_IMAGES, LGB_IMG.event.click);BODY.on( 'mousemove', LGB_MAIN_IMAGE, LGB_IMG.event.navigation.hover);BODY.on( 'mouseout', LGB_MAIN_IMAGE, LGB_IMG.event.navigation.hover);BODY.on( 'click', '[data-navigation]', LGB_IMG.event.navigation.click);BODY.on( 'touchstart', LGB_MAIN_IMAGE, LGB_IMG.event.touch.start);BODY.on( 'touchmove', LGB_MAIN_IMAGE, LGB_IMG.event.touch.move);BODY.on( 'touchstart', LGB_VISIBLE, LGB_IMG.event.touch.drag.start);BODY.on( 'touchmove', LGB_VISIBLE, LGB_IMG.event.touch.drag.move);BODY.on( 'dragstart', LGB_VISIBLE, LGB_IMG.event.drag.start);BODY.on( 'dragover', LGB_VISIBLE, LGB_IMG.event.drag.move);BODY.on( 'drop', LGB_VISIBLE, LGB_IMG.event.drag.stop);BODY.on( 'mouseleave', LGB_VISIBLE, LGB_IMG.event.drag.stop);var BASE = document.body.querySelector( '.module .images');if ( BASE){var MAIN= BASE.querySelector( '.main'),VISIBLE = BASE.querySelector( '.visible'),IMAGES= VISIBLE.querySelectorAll( 'figure img');var MDE_IMG = new Images;MDE_IMG.set.element( BASE);IMAGES.on( 'click', MDE_IMG.event.click);MAIN.on( 'mousemove', MDE_IMG.event.navigation.hover);MAIN.on( 'mouseout', MDE_IMG.event.navigation.hover);BASE.on( 'click', '[data-navigation]', MDE_IMG.event.navigation.click);MAIN.on( 'touchstart', MDE_IMG.event.touch.start);MAIN.on( 'touchmove', MDE_IMG.event.touch.move);window.on( 'keydown', MDE_IMG.event.key);VISIBLE.on( 'touchstart', MDE_IMG.event.touch.drag.start);VISIBLE.on( 'touchmove', MDE_IMG.event.touch.drag.move);VISIBLE.on( 'dragstart', MDE_IMG.event.drag.start);VISIBLE.on( 'dragover', MDE_IMG.event.drag.move);VISIBLE.on( 'drop', MDE_IMG.event.drag.stop);VISIBLE.on( 'mouseleave', MDE_IMG.event.drag.stop);}});var RSZ = new Elements_Resize;window.onload = RSZ.resize;document.ready( function (){RSZ.resize();var BODY = document.body;var modules = [];modules.push( '.module.artikel [for] + section');modules.push( '.module.tarieven [for] + ul');modules.push( '.module.eigenschappen [for] + section');var accordion = BODY.querySelectorAll( modules.join( ','));accordion.on( 'transitionend', RSZ.resize);if ( !BODY.dataset.responsive && BODY.classList.contains( 'tablet')){var hoofd = document.querySelector( '#hoofd'),textimage = document.querySelectorAll( '#hoofd > .image, #hoofd > .text'),viewport= document.querySelector( 'meta[name=viewport]'),width = hoofd.css( 'width');if ( width > 960){viewport.setAttribute( 'content', 'width=' + width + ', maximum-scale=1.0');hoofd.css( 'overflow', 'hidden');for ( var i = 0; i < textimage.length; i++){var e = textimage[ i ];if ( e.offsetLeft < 0){e.css( { 'margin-left': e.css( 'left')+ 'px', 'left': 0 });}}}}setTimeout( function (){goToHash();goToModulePage();goToForm();}, 200);});function goToHash(){if ( window.location.hash && window.location.hash.length){goToLocation( window.location.hash)}}function goToModulePage(){goToLocation( '.module.page')}function goToForm(){goToLocation( 'form .succes, form .error')}function goToLocation( query){if ( query){var w = window,d = document,e = d.documentElement,b = d.getElementsByTagName( 'body')[ 0 ],y = w.innerHeight || e.clientHeight || b.clientHeight,t = b.querySelector( query);if ( t){var ot = t.getBoundingClientRect().top + w.scrollY,wt = float( y / 3, 0);document.querySelector( 'html').scrollTop = ot - wt;document.querySelector( 'body').scrollTop = ot - wt;}}}document.ready( function (){var cookie = document.querySelector( '#cookie');if ( cookie){var classList = cookie.classList,icon= cookie.querySelectorAll( '.icon');if ( icon){if ( localStorage.cookie !== 'true'){setTimeout( function (){classList.add( 'active');}, 1000);}icon.on( 'click', function (){classList[ classList.contains( ACTIVE)? 'remove' : 'add' ]( ACTIVE);localStorage.cookie = true;});}}});