diff --git a/README.md b/README.md index 242a418..ef3bf90 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ A lightweight modular jQuery clone/alternative library built for modern browsers ![Licence](https://img.shields.io/badge/Licence-MIT-lightgrey.svg) ![Project Status](https://img.shields.io/badge/Project%20Status-Beta-yellow.svg) -![Size Minified](https://img.shields.io/badge/Size%20(Minified)-16.2kb-brightgreen.svg) -![Size Gzipped](https://img.shields.io/badge/Size%20(Gzipped)-5.98kb-brightgreen.svg) +![Size Minified](https://img.shields.io/badge/Size%20(Minified)-16.3kb-brightgreen.svg) +![Size Gzipped](https://img.shields.io/badge/Size%20(Gzipped)-6.01kb-brightgreen.svg) **This project is now in beta, make sure to test your integration with this code thoroughly before deploying** @@ -48,7 +48,8 @@ Dabby.js compiles to both ES6 and ES5 bundles, to support all browsers, include ```html - + + // include dist/dabby.js or dist/dabby.min.js in your ES6 file. ``` ## Browser Support @@ -66,7 +67,7 @@ Dabby.js is billed as a jQuery clone library, and as such tries to implement as As Dabby.js is built in ES6, you can include just the parts you need in your project (If you are using ES6 modules). Include the core library like this, methods can be imported without a variable: ```javascript -include {$} from "/src/core/core.js"; // update to reference where you have the project stored +include $ from "/src/core/core.js"; // update to reference where you have the project stored include "/src/traversal/filter/filter.js"; // I need $.fn.is(), which is written with $.fn.filter() and $.fn.not() ``` diff --git a/dist/dabby.es5.js b/dist/dabby.es5.js index d58a667..3fedb84 100644 --- a/dist/dabby.es5.js +++ b/dist/dabby.es5.js @@ -1,6 +1,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -/*! dabbyjs v0.9.5 by Will Earp - https://github.com/hexydec/dabby */ +/*! dabbyjs v0.9.6 by Will Earp - https://github.com/hexydec/dabby */ (function (global, factory) { (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.$ = factory(); })(this, function () { diff --git a/dist/dabby.es5.js.map b/dist/dabby.es5.js.map index c2ddb74..63a61bb 100644 --- a/dist/dabby.es5.js.map +++ b/dist/dabby.es5.js.map @@ -1 +1 @@ -{"version":3,"sources":["dabby.es5.js"],"names":["global","factory","exports","module","define","amd","$","Array","from","arrayLike","mapFn","thisArg","arr","slice","call","map","window","CustomEvent","CustomEvent$1","event","params","bubbles","cancelable","detail","undefined","evt","document","createEvent","initCustomEvent","prototype","Event","Element","matches","msMatchesSelector","NodeList","forEach","callback","i","length","Object","assign","defineProperty","value","target","varArgs","TypeError","to","index","arguments","nextSource","nextKey","hasOwnProperty","writable","configurable","dabby","selector","context","nodes","match","obj","nodeType","isWindow","isFunction","readyState","addEventListener","once","indexOf","each","concat","querySelectorAll","push","createElement","prop","attr","innerHTML","content","children","node","fn","keys","len","func","constructor","Function","isPlainObject","getPrototypeOf","proto","toString","extend","arrs","merge","sources","source","shift","apply","isArray","param","add","key","isArr","val","encodeURIComponent","item","join","ajax","url","settings","method","cache","data","dataType","async","crossDomain","scriptCharset","jsonp","jsonpCallback","Date","now","headers","xhr","XMLHttpRequest","contentType","statusCode","username","password","test","sync","script","FormData","charset","load","error","response","complete","src","head","appendChild","status","responseText","JSON","parse","e","success","onload","types","ontimeout","onabort","open","setRequestHeader","send","name","type","isFunc","toUpperCase","getScript","filterNodes","filter","not","n","Boolean","split","uri","html","outerHTML","getVal","current","result","multiple","String","selected","values","checked","serialize","is","disabled","getAttribute","all","until","parent","parentNode","Node","ELEMENT_NODE","get","events","t","parents","args","preventDefault","stopPropagation","capture","removeEventListener","splice","on","style","cssText","className","textContent","removeAttribute","setAttribute","cls","substr","classList","dasherise","replace","letter","toLowerCase","setCss","props","k","remove","isNaN","css","getComputedStyle","output","ret","getPropertyValue","camelise","text","temp","dataset","stringify","hasClass","contains","getProp","properties","removeProp","offset","coords","doc","documentElement","rect","pos","getBoundingClientRect","itemCoords","create","top","left","position","parseFloat","scrollTop","scrollLeft","offsetParent","offsetLeft","offsetTop","tl","scroll","dim","getAdditionalLength","wh","suffix","valtype","io","whu","DOCUMENT_NODE","trigger","dispatchEvent","clone","cloneNode","empty","firstChild","removeChild","before","prepend","append","after","pre","elems","arg","backwards","forwards","insertAdjacentElement","insertBefore","prependTo","appendTo","insertAfter","replaceChild","start","end","unwrap","wrapAll","firstElementChild","wrap","closest","eq","find","first","has","subject","last","next","sibling","siblings","child"],"mappings":";;AAAA;AAEC,WAAUA,MAAV,EAAkBC,OAAlB,EAA2B;AACxB,UAAOC,OAAP,yCAAOA,OAAP,OAAmB,QAAnB,IAA+B,OAAOC,MAAP,KAAkB,WAAjD,GAA+DA,MAAM,CAACD,OAAP,GAAiBD,OAAO,EAAvF,GACA,OAAOG,MAAP,KAAkB,UAAlB,IAAgCA,MAAM,CAACC,GAAvC,GAA6CD,MAAM,CAACH,OAAD,CAAnD,GACCD,MAAM,CAACM,CAAP,GAAWL,OAAO,EAFnB;AAGH,CAJA,EAIC,IAJD,EAIQ,YAAY;AAAE;;AAEnB,MAAI,CAACM,KAAK,CAACC,IAAX,EAAiB;AAChBD,IAAAA,KAAK,CAACC,IAAN,GAAa,UAAUC,SAAV,EAAqBC,KAArB,EAA4BC,OAA5B,EAAqC;AACjD,UAAIC,GAAG,GAAG,GAAGC,KAAH,CAASC,IAAT,CAAcL,SAAd,CAAV;;AACA,UAAI,OAAOC,KAAP,KAAiB,UAArB,EAAiC;AAChCE,QAAAA,GAAG,GAAGA,GAAG,CAACG,GAAJ,CAAQL,KAAR,EAAeC,OAAf,CAAN;AACA;;AACD,aAAOC,GAAP;AACA,KAND;AAOA,GAVgB,CAYjB;;;AACA,MAAI,OAAOI,MAAM,CAACC,WAAd,KAA8B,UAAlC,EAA8C;AAAA,QACpCC,aADoC,GAC7C,SAASA,aAAT,CAAuBC,KAAvB,EAA8BC,MAA9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Q,GAAGoG,WAAW,CAAClG,KAAD,EAAQF,QAAR,CAAd,GAAkCE,KAA3C,CAAR;AACA,GAZD,CAx9CiB,CAs+CjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA,SAAOnD,CAAP;AAEH,CAr/CA,CAAD","sourcesContent":["/*! dabbyjs v0.9.5 by Will Earp - https://github.com/hexydec/dabby */\r\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.$ = factory());\n}(this, (function () { 'use strict';\n\n if (!Array.from) {\r\n \tArray.from = function (arrayLike, mapFn, thisArg) {\r\n \t\tvar arr = [].slice.call(arrayLike);\r\n \t\tif (typeof mapFn === \"function\") {\r\n \t\t\tarr = arr.map(mapFn, thisArg);\r\n \t\t}\r\n \t\treturn arr;\r\n \t};\r\n }\n\n // CustomEvent is not supported in IE11\r\n if (typeof window.CustomEvent !== \"function\") {\r\n \tfunction CustomEvent$1(event, params) {\r\n \t\tparams = params || {bubbles: false, cancelable: false, detail: undefined};\r\n \t\tconst evt = document.createEvent(\"CustomEvent\");\r\n \t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\r\n \t\treturn evt;\r\n \t}\r\n\r\n \tCustomEvent$1.prototype = window.Event.prototype;\r\n \twindow.CustomEvent = CustomEvent$1;\r\n }\n\n // support Element.matches() in IE and older Webkit\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches = Element.prototype.msMatchesSelector;\r\n }\n\n if (!NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = function (callback, thisArg) {\r\n thisArg = thisArg || window;\r\n for (var i = 0; i < this.length; i++) {\r\n callback.call(thisArg, this[i], i, this);\r\n }\r\n };\r\n }\n\n if (typeof Object.assign !== \"function\") {\r\n \tObject.defineProperty(Object, \"assign\", {\r\n \t\tvalue: function assign(target, varArgs) { // .length of function is 2\r\n \t\t\tif (target == null) { // TypeError if undefined or null\r\n \t\t\t\tthrow new TypeError('Cannot convert undefined or null to object');\r\n \t\t\t}\r\n\r\n \t\t\tvar to = Object(target);\r\n\r\n \t\t\tfor (var index = 1; index < arguments.length; index++) {\r\n \t\t\t\tvar nextSource = arguments[index];\r\n\r\n \t\t\t\tif (nextSource != null) { // Skip over if undefined or null\r\n \t\t\t\t\tfor (var nextKey in nextSource) {\r\n \t\t\t\t\t\t// Avoid bugs when hasOwnProperty is shadowed\r\n \t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\r\n \t\t\t\t\t\t\tto[nextKey] = nextSource[nextKey];\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn to;\r\n \t\t},\r\n \t\twritable: true,\r\n \t\tconfigurable: true\r\n \t});\r\n }\n\n const $ = function dabby(selector, context) {\r\n \tlet nodes = [],\r\n \t\tmatch,\r\n \t\tobj;\r\n\r\n \t// enables new object to be created through $()\r\n \tif (!(this instanceof dabby)) {\r\n \t\treturn new dabby(selector, context);\r\n\r\n \t// if no selector, return empty colletion\r\n \t} else if (selector) {\r\n\r\n \t\t// $ collection\r\n \t\tif (selector instanceof dabby) {\r\n \t\t\treturn selector;\r\n\r\n \t\t// single node\r\n \t\t} else if (selector.nodeType || $.isWindow(selector)) {\r\n \t\t\tnodes = [selector];\r\n\r\n \t\t// ready function\r\n \t\t} else if ($.isFunction(selector)) {\r\n \t\t\tif (document.readyState !== \"loading\") {\r\n \t\t\t\tselector.call(document, $);\r\n \t\t\t} else {\r\n \t\t\t\tdocument.addEventListener(\"DOMContentLoaded\", () => {selector.call(document, $);}, {once: true});\r\n \t\t\t}\r\n\r\n \t\t// array|NodeList|HTMLCollection of nodes\r\n \t\t} else if (typeof selector !== \"string\") {\r\n \t\t\tnodes = selector;\r\n\r\n \t\t// CSS selector\r\n \t\t} else if (selector.indexOf(\"<\") === -1) {\r\n \t\t\t$(context || document).each((i, obj) => {\r\n \t\t\t\tnodes = nodes.concat(Array.from(obj.querySelectorAll(selector)));\r\n \t\t\t});\r\n\r\n \t\t// create a single node and attach properties\r\n \t\t} else if ((match = selector.match(/^<([a-z0-9]+)(( ?\\/)?|><\\/\\1)>$/i)) !== null) {\r\n \t\t\tnodes.push(document.createElement(match[1]));\r\n\r\n \t\t\t// context is CSS attributes\r\n \t\t\tif (context instanceof Object) {\r\n \t\t\t\tobj = $(nodes);\r\n \t\t\t\t$.each(context, (prop, value) => {\r\n \t\t\t\t\tobj.attr(prop, value);\r\n \t\t\t\t});\r\n \t\t\t}\r\n\r\n \t\t// parse HTML into nodes\r\n \t\t} else {\r\n \t\t\t//nodes = (context || doc).createRange().createContextualFragment(selector).childNodes; // not supported in iOS 9\r\n \t\t\tobj = document.createElement(\"template\");\r\n \t\t\tobj.innerHTML = selector;\r\n \t\t\tnodes = obj.content ? obj.content.children : obj.children;\r\n \t\t}\r\n \t}\r\n\r\n \t// build nodes\r\n \tthis.length = 0;\r\n \tArray.from(nodes).forEach(node => { // HTMLCollection objects don't support forEach\r\n \t\tif ([1, 9, 11].indexOf(node.nodeType) > -1 || $.isWindow(node)) { // only element, document, documentFragment and window\r\n \t\t\tthis[this.length++] = node;\r\n \t\t}\r\n \t});\r\n \treturn this;\r\n };\r\n\r\n // alias functions\r\n $.fn = $.prototype;\n\n $.each = (obj, callback) => {\r\n \tconst keys = Object.keys(obj),\r\n \t\tlen = keys.length;\r\n\r\n \tfor (let i = 0; i < len; i++) {\r\n \t\tif (callback.call(obj[keys[i]], keys[i], obj[keys[i]]) === false) {\r\n \t\t\tbreak; // stop if callback returns false\r\n \t\t}\r\n \t}\r\n \treturn obj;\r\n };\n\n $.fn.each = function (callback) {\r\n \t$.each(Array.from(this), callback);\r\n \treturn this;\r\n };\n\n $.isWindow = obj => obj !== null && obj === obj.window;\n\n $.isFunction = func => func && func.constructor === Function;\n\n $.isPlainObject = obj => {\r\n\r\n \t// Basic check for Type object that's not null\r\n \tif (typeof obj === \"object\" && obj !== null) {\r\n\r\n \t\t// If Object.getPrototypeOf supported, use it\r\n \t if (typeof Object.getPrototypeOf == 'function') {\r\n \t\t\tlet proto = Object.getPrototypeOf(obj);\r\n \t\t\treturn proto === Object.prototype || proto === null;\r\n \t }\r\n\r\n \t // Otherwise, use internal class\r\n \t // This should be reliable as if getPrototypeOf not supported, is pre-ES5\r\n \t\treturn Object.prototype.toString.call(obj) === \"[object Object]\";\r\n \t}\r\n\r\n \t// Not an object\r\n \treturn false;\r\n };\n\n $.extend = (...arrs) => {\r\n \tif (arrs[0] === true) {\r\n\r\n \t\t// merge function will recursively merge items\r\n \t\tfunction merge(target, ...sources) {\r\n \t\t\tif (sources.length) {\r\n\r\n \t\t\t\t// work on next source\r\n \t\t\t\tconst source = sources.shift();\r\n \t\t\t\tif ($.isPlainObject(target) && $.isPlainObject(source)) {\r\n\r\n \t\t\t\t\t// loop through each property\r\n \t\t\t\t\tconst keys = Object.keys(source),\r\n \t\t\t\t\t\tlen = keys.length;\r\n \t\t\t\t\tfor (let i = 0; i < len; i++) {\r\n\r\n \t\t\t\t\t\t// merge recursively if source is object, if target is not object, overwrite\r\n \t\t\t\t\t\tif ($.isPlainObject(source[keys[i]])) {\r\n \t\t\t\t\t\t\ttarget[keys[i]] = $.isPlainObject(target[keys[i]]) ? merge(target[keys[i]], source[keys[i]]) : source[keys[i]];\r\n\r\n \t\t\t\t\t\t// when source property is value just overwrite\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\ttarget[keys[i]] = source[keys[i]];\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// merge next source\r\n \t\t\t return merge(target, ...sources);\r\n \t\t\t}\r\n \t\t\treturn target;\r\n \t\t}\r\n \t\treturn merge.apply(null, arrs.slice(1));\r\n \t} else {\r\n \t\treturn Object.assign.apply(null, arrs);\r\n \t}\r\n };\n\n $.isArray = arr => Array.isArray(arr);\n\n $.param = obj => {\r\n \tlet params = [],\r\n \t\tadd = (key, value, params) => {\r\n \t\t\tlet isArr = $.isArray(value);\r\n \t\t\tif (isArr || typeof value === \"object\") {\r\n \t\t\t\t$.each(value, (i, val) => {\r\n \t\t\t\t\tparams = add(key + \"[\" + (isArr ? \"\" : i) + \"]\", val, params);\r\n \t\t\t\t});\r\n \t\t\t} else {\r\n \t\t\t\tparams.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(value));\r\n \t\t\t}\r\n \t\t\treturn params;\r\n \t\t};\r\n\r\n \t// process values\r\n \t$.each(obj, (key, item) => {\r\n \t\tparams = add(key, item, params);\r\n \t});\r\n \treturn params.join(\"&\");\r\n };\n\n $.ajax = (url, settings) => {\r\n\r\n \t// normalise args\r\n \tif (typeof url === \"object\") {\r\n \t\tsettings = url;\r\n \t} else {\r\n \t\tif (typeof settings !== \"object\") {\r\n \t\t\tsettings = {};\r\n \t\t}\r\n \t\tsettings.url = url;\r\n \t}\r\n\r\n \t// set default settings\r\n \tsettings = $.extend({\r\n \t\tmethod: \"GET\",\r\n \t\tcache: null, // start will null so we can see if explicitly set\r\n \t\tdata: null,\r\n \t\tdataType: null, // only changes behavior with json, jsonp, script\r\n \t\tasync: true,\r\n \t\tcrossDomain: false,\r\n \t\tscriptCharset: null,\r\n \t\tjsonp: \"callback\",\r\n \t\tjsonpCallback: \"dabby\" + Date.now(),\r\n \t\theaders: {\r\n \t\t\t\"X-Requested-With\": \"XMLHttpRequest\"\r\n \t\t},\r\n \t\txhr: () => new XMLHttpRequest(),\r\n \t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n \t\tcontext: null,\r\n \t\tstatusCode: {},\r\n \t\tusername: null,\r\n \t\tpassword: null\r\n \t}, settings);\r\n\r\n \t// determine datatype\r\n \tif (!settings.dataType && /\\.js($|\\?)/.test(settings.url)) {\r\n \t\tsettings.dataType = \"script\";\r\n \t}\r\n\r\n \tlet sync = [\"script\", \"jsonp\"].indexOf(settings.dataType) > -1,\r\n \t\tscript, data;\r\n\r\n \t// add data to query string\r\n \tif (settings.data) {\r\n \t\tif (typeof settings.data === \"string\" || settings.data instanceof FormData) {\r\n \t\t\tdata = settings.data;\r\n \t\t} else {\r\n \t\t\tdata = $.param(settings.data);\r\n \t\t}\r\n \t}\r\n \tif (data && settings.method === \"GET\") {\r\n \t\tsettings.url += (settings.url.indexOf(\"?\") > -1 ? \"&\" : \"?\") + data;\r\n \t}\r\n\r\n \t// add cache buster\r\n \tif (settings.cache || (settings.cache === null && sync)) {\r\n \t\tsettings.url += (settings.url.indexOf(\"?\") > -1 ? \"&\" : \"?\") + \"_=\" + (+new Date());\r\n \t}\r\n\r\n \t// fetch script\r\n \tif (sync || settings.crossDomain) {\r\n \t\tscript = document.createElement(\"script\");\r\n \t\tif (settings.scriptCharset) {\r\n \t\t\tscript.charset = settings.scriptCharset;\r\n \t\t}\r\n\r\n \t\t// add callback parameter\r\n \t\tif (settings.dataType === \"jsonp\") {\r\n \t\t\tsettings.url += (settings.url.indexOf(\"?\") > -1 ? \"&\" : \"?\") + settings.jsonp + \"=\" + settings.jsonpCallback;\r\n \t\t}\r\n\r\n \t\t// setup event callbacks\r\n \t\t$.each({\r\n \t\t\tload: \"success\",\r\n \t\t\terror: \"error\"\r\n \t\t}, (key, value) => {\r\n \t\t\tscript.addEventListener(key, () => {\r\n \t\t\t\tlet response = settings.dataType === \"jsonp\" ? window[settings.jsonpCallback] || null : null;\r\n \t\t\t\t[settings[value], settings.complete].forEach(callback => {\r\n \t\t\t\t\tif (callback) {\r\n \t\t\t\t\t\tcallback.apply(settings.context, callback === settings.complete ? [null, value] : [response, value]);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t}, {once: true});\r\n \t\t});\r\n\r\n \t\tscript.src = settings.url;\r\n \t\tscript.async = settings.async;\r\n \t\tdocument.head.appendChild(script);\r\n\r\n \t// make xhr request\r\n \t} else {\r\n \t\tconst xhr = settings.xhr(),\r\n \t\t\tcallback = (xhr, status) => {\r\n \t\t\t\tlet response = xhr.responseText;\r\n\r\n \t\t\t\t// parse JSON\r\n \t\t\t\tif ([\"json\", null, undefined].indexOf(settings.dataType) > -1) {\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tresponse = JSON.parse(response);\r\n \t\t\t\t\t} catch (e) {\r\n \t\t\t\t\t\t// do nothing\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// run callbacks\r\n \t\t\t\t[settings.statusCode[xhr.status], settings[status], settings.complete].forEach(callback => {\r\n \t\t\t\t\tif (callback) {\r\n \t\t\t\t\t\tconst success = [settings.statusCode[xhr.status], settings[\"success\"]].indexOf(callback) > -1;\r\n \t\t\t\t\t\tcallback.apply(settings.context, success ? [response, status, xhr] : [xhr, status]);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t};\r\n\r\n \t\t// callbacks\r\n \t\txhr.onload = () => {\r\n \t\t\tconst types = {\r\n \t\t\t\t200: \"success\",\r\n \t\t\t\t204: \"nocontent\",\r\n \t\t\t\t304: \"notmodified\"\r\n \t\t\t};\r\n \t\t\tcallback(xhr, types[xhr.status] || \"error\");\r\n \t\t};\r\n \t\txhr.ontimeout = () => {\r\n \t\t\tcallback(xhr, \"timeout\");\r\n \t\t};\r\n \t\txhr.onabort = () => {\r\n \t\t\tcallback(xhr, \"abort\");\r\n \t\t};\r\n\r\n \t\txhr.open(settings.method, settings.url, settings.async, settings.username, settings.password);\r\n\r\n \t\t// add headers\r\n \t\tif (settings.contentType) {\r\n \t\t\tsettings.headers[\"Content-Type\"] = settings.contentType;\r\n \t\t}\r\n \t\t$.each(settings.headers, (key, value) => {\r\n \t\t\txhr.setRequestHeader(key, value);\r\n \t\t});\r\n\r\n \t\t// send request\r\n \t\txhr.send(settings.method === \"GET\" ? null : data);\r\n \t\treturn xhr;\r\n \t}\r\n };\n\n [\"get\", \"post\"].forEach(name => {\r\n \t$[name] = (url, data, success, type) => {\r\n \t\tconst isFunc = $.isFunction(data);\r\n \t\tlet settings = typeof(url) === \"object\" ? url : {\r\n \t\t\turl: url,\r\n \t\t\tdata: isFunc ? {} : data,\r\n \t\t\tsuccess: isFunc ? data : success,\r\n \t\t\tdataType: isFunc ? success : type\r\n \t\t};\r\n \t\tsettings.method = name.toUpperCase();\r\n \t\treturn $.ajax(settings);\r\n \t};\r\n });\n\n $.getScript = (url, success) => $.ajax({\r\n \turl: url,\r\n \tdataType: \"script\",\r\n \tsuccess: success\r\n });\n\n var filterNodes = (dabby, filter, context, not) => {\r\n \tlet func,\r\n \t\tnodes = dabby.nodeType ? [dabby] : Array.from(dabby);\r\n\r\n \t// sort out args\r\n \tif (typeof context === \"boolean\") {\r\n \t\tnot = context;\r\n \t\tcontext = null;\r\n \t}\r\n\r\n \t// function\r\n \tif ($.isFunction(filter)) {\r\n \t\tfunc = filter;\r\n\r\n \t// nodes\r\n \t} else {\r\n\r\n \t\t// normalise filters\r\n \t\tif (typeof(filter) === \"string\") {\r\n \t\t\tfilter = [filter];\r\n \t\t} else {\r\n \t\t\tfilter = Array.from($(filter, context));\r\n \t\t}\r\n\r\n \t\t// filter function\r\n \t\tfunc = (n, node) => {\r\n \t\t\tlet i = filter.length;\r\n \t\t\twhile (i--) {\r\n \t\t\t\tif (typeof(filter[i]) === \"string\" && node.matches ? node.matches(filter[i]) : node === filter[i]) {\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn false;\r\n \t\t};\r\n \t}\r\n \treturn nodes.filter((item, i) => func.call(item, i, item) !== Boolean(not), nodes);\r\n }\n\n [\"filter\", \"not\", \"is\"].forEach(name => {\r\n \t$.fn[name] = function (selector) {\r\n \t\tconst nodes = filterNodes(this, selector, name === \"not\");\r\n \t\treturn name === \"is\" ? !!nodes.length : $(nodes);\r\n \t};\r\n });\n\n $.fn.load = function (url, data, success) {\r\n \tif (this[0]) {\r\n\r\n \t\t// get selector from URL\r\n \t\turl = url.split(\" \", 2);\r\n \t\tconst uri = url[0],\r\n \t\t\tselector = url[1];\r\n\r\n \t\t// check for data\r\n \t\tif ($.isFunction(data)) {\r\n \t\t\tsuccess = data;\r\n \t\t\tdata = undefined;\r\n \t\t}\r\n\r\n \t\t// make AJAX request\r\n \t\t$.ajax(uri, {\r\n \t\t\tdata: data,\r\n \t\t\ttype: data instanceof Object ? \"POST\" : \"GET\",\r\n \t\t\tsuccess: (response, status, xhr) => {\r\n\r\n \t\t\t\t// if a selector is specified, find it in the returned document\r\n \t\t\t\tlet html = \"\",\r\n \t\t\t\t\ti = this.length;\r\n\r\n \t\t\t\t// refine by selector if supplied\r\n \t\t\t\tif (selector) {\r\n \t\t\t\t\t$(response).filter(selector).each((key, obj) => {\r\n \t\t\t\t\t\thtml += obj.outerHTML;\r\n \t\t\t\t\t});\r\n \t\t\t\t} else {\r\n \t\t\t\t\thtml = response;\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// set HTML to nodes in collection\r\n \t\t\t\twhile (i--) {\r\n \t\t\t\t\tthis[i].innerHTML = html;\r\n\r\n \t\t\t\t\t// fire success callback on nodes\r\n \t\t\t\t\tif (success) {\r\n \t\t\t\t\t\tsuccess.call(this[i], response, status, xhr);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t});\r\n \t}\r\n \treturn this;\r\n };\n\n var getVal = (val, obj, i, current) => {\r\n\r\n \t// retrieve as function\r\n \tif ($.isFunction(val)) {\r\n \t\tval = val.call(obj, i, $.isFunction(current) ? current() : current); // current can be a function\r\n \t}\r\n \treturn val;\r\n }\n\n $.map = (obj, callback) => {\r\n \tconst keys = Object.keys(obj),\r\n \t\tlen = keys.length;\r\n \tlet arr = [],\r\n \t\ti = 0,\r\n \t\tresult;\r\n\r\n \tfor (; i < len; i++) {\r\n \t\tresult = callback.call(window, obj[keys[i]], keys[i]);\r\n \t\tif (![null, undefined].indexOf(result) > -1) {\r\n \t\t\tarr.push(result);\r\n \t\t}\r\n \t}\r\n \treturn arr;\r\n };\n\n $.fn.val = function (value) {\r\n\r\n \t// set value\r\n \tif (value !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\tlet val = getVal(value, this[i], i, () => $(this[i]).val());\r\n \t\t\tif (this[i].multiple) {\r\n \t\t\t\tval = $.map($.isArray(val) ? val : [val], item => String(item)); // convert to string\r\n \t\t\t\t$(\"option\", this[i]).each((key, obj) => {\r\n \t\t\t\t\tobj.selected = val.indexOf(String(obj.value)) > -1;\r\n \t\t\t\t});\r\n \t\t\t} else {\r\n \t\t\t\tthis[i].value = String(val);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// read value from first node\r\n \t} else if (this[0]) {\r\n\r\n \t\t// get multiple values\r\n \t\tif (this[0].multiple) {\r\n \t\t\tlet values = [];\r\n \t\t\t$(\"option\", this[0]).each((key, obj) => {\r\n \t\t\t\tif (obj.selected) {\r\n \t\t\t\t\tvalues.push(String(obj.value));\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t\treturn values;\r\n\r\n \t\t// get radio box value\r\n \t\t} else if (this[0].type === \"radio\") {\r\n \t\t\tlet obj = this.filter(\"[name='\" + this[0].name + \"']:checked\")[0];\r\n \t\t\treturn obj ? String(obj.value) : undefined;\r\n\r\n \t\t// get single value\r\n \t\t} else if (this[0].type !== \"checkbox\" || this[0].checked) {\r\n \t\t\treturn String(this[0].value);\r\n \t\t}\r\n \t}\r\n };\n\n $.fn.serialize = function () {\r\n \tconst selector = \"input[name]:not([type=file]):not([type=submit]),textarea[name],select[name]\",\r\n \t\tobj = this.is(selector) ? this.filter(selector) : $(selector, this),\r\n \t\tadd = (name, value, params) => {\r\n \t\t\tlet match;\r\n\r\n \t\t\tif ((match = name.match(/([^\\[]*)\\[([^\\]]*)\\](.*)/)) !== null) {\r\n \t\t\t\tname = match[1];\r\n \t\t\t\tlet arr = add(match[2] + match[3], value, params[name] || {});\r\n \t\t\t\tvalue = arr;\r\n \t\t\t}\r\n\r\n \t\t\tif (name !== \"\") {\r\n \t\t\t\tparams[name] = value;\r\n \t\t\t} else {\r\n \t\t\t\tif (!$.isArray(params)) {\r\n \t\t\t\t\tparams = [];\r\n \t\t\t\t}\r\n \t\t\t\tparams = params.concat($.isArray(value) ? value : [value]);\r\n \t\t\t}\r\n \t\t\treturn params;\r\n \t\t};\r\n\r\n \tlet params = {};\r\n\r\n \t// process values\r\n \tobj.each((key, obj) => {\r\n \t\tconst value = $(obj).val();\r\n \t\tif (!obj.disabled && value !== undefined) {\r\n \t\t\tparams = add(obj.getAttribute(\"name\"), value, params);\r\n \t\t}\r\n \t});\r\n \treturn $.param(params);\r\n };\n\n $.fn.add = function (nodes, context) {\r\n \tnodes = $(nodes, context);\r\n \tlet len = this.length,\r\n \t\ti = nodes.length;\r\n\r\n \tthis.length += i;\r\n \twhile (i--) {\r\n \t\tthis[i + len] = nodes[i];\r\n \t}\r\n \treturn this;\r\n };\n\n [\"parent\", \"parents\", \"parentsUntil\"].forEach(func => {\r\n \t$.fn[func] = function (selector, filter) {\r\n \t\tconst all = func.indexOf(\"s\") > -1,\r\n \t\t\tuntil = func.indexOf(\"U\") > -1;\r\n \t\tlet nodes = [],\r\n \t\t\ti = this.length,\r\n \t\t\tparent;\r\n\r\n \t\twhile (i--) {\r\n \t\t\tparent = this[i].parentNode;\r\n \t\t\twhile (parent && parent.nodeType === Node.ELEMENT_NODE) {\r\n \t\t\t\tnodes.push(parent);\r\n \t\t\t\tif (!all || (until && filterNodes(parent, selector).length)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tparent = parent.parentNode;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\tif (selector) {\r\n \t\t\tnodes = filterNodes(nodes, selector);\r\n \t\t}\r\n \t\treturn $(nodes);\r\n \t};\r\n });\n\n $.fn.get = function (i) {\r\n \treturn i === undefined ? Array.from(this) : this[i >= 0 ? i : i + this.length];\r\n };\n\n // add and remove event handlers\r\n [\"on\", \"one\", \"off\"].forEach(name => {\r\n \t$.fn[name] = function (events, selector, data, callback) {\r\n \t\tlet i = this.length;\r\n\r\n \t\tevents = events.split(\" \");\r\n\r\n \t\t// sort out args\r\n \t\tif ($.isFunction(selector)) {\r\n \t\t\tcallback = selector;\r\n \t\t\tselector = null;\r\n \t\t} else if ($.isFunction(data)) {\r\n \t\t\tcallback = data;\r\n \t\t\tdata = null;\r\n \t\t}\r\n\r\n \t\t// attach event\r\n \t\twhile (i--) {\r\n \t\t\tlet e = events.length;\r\n\r\n \t\t\t// record the original function\r\n \t\t\tif (name !== \"off\") {\r\n \t\t\t\tif (!this[i].events) {\r\n \t\t\t\t\tthis[i].events = [];\r\n \t\t\t\t}\r\n \t\t\t\tlet fn = function (evt) { // delegate function\r\n \t\t\t\t\tlet target = [this];\r\n \t\t\t\t\tif (selector) {\r\n \t\t\t\t\t\tlet t = $(evt.target);\r\n \t\t\t\t\t\ttarget = t.add(t.parents()).filter(selector).get(); // is the selector in the targets parents?\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (target) {\r\n \t\t\t\t\t\tif (data) { // set data to event object\r\n \t\t\t\t\t\t\tevt.data = data;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tfor (let i = 0, len = target.length; i < len; i++) {\r\n \t\t\t\t\t\t\tif (callback.call(target[i], evt, evt.args) === false) {\r\n \t\t\t\t\t\t\t\tevt.preventDefault();\r\n \t\t\t\t\t\t\t\tevt.stopPropagation();\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t};\r\n \t\t\t\tthis[i].events.push({\r\n \t\t\t\t\tevents: events,\r\n \t\t\t\t\tcallback: callback,\r\n \t\t\t\t\tselector: selector,\r\n \t\t\t\t\tfunc: fn,\r\n \t\t\t\t\tonce: name === \"one\"\r\n \t\t\t\t});\r\n\r\n \t\t\t\t// trigger\r\n \t\t\t\twhile (e--) {\r\n \t\t\t\t\tthis[i].addEventListener(events[e], fn, {once: name === \"one\", capture: !!selector});\r\n \t\t\t\t}\r\n\r\n \t\t\t// find the original function\r\n \t\t\t} else if (this[i].events.length) {\r\n \t\t\t\twhile (e--) {\r\n \t\t\t\t\tthis[i].events.forEach((evt, n) => {\r\n \t\t\t\t\t\tconst index = evt.events.indexOf(events[e]);\r\n \t\t\t\t\t\tif (index !== -1 && evt.callback === callback && evt.selector === selector) {\r\n \t\t\t\t\t\t\tthis[i].removeEventListener(events[e], evt.func, {once: evt.once, capture: !!evt.selector}); // must pass same arguments\r\n \t\t\t\t\t\t\tthis[i].events[n].events.splice(index, 1);\r\n \t\t\t\t\t\t\tif (!this[i].events[n].events.length) {\r\n \t\t\t\t\t\t\t\tthis[i].events.splice(n, 1);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t});\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n var events = [\"focusin\", \"focusout\", \"focus\", \"blur\", \"resize\", \"scroll\", \"unload\", \"click\", \"dblclick\", \"mousedown\", \"mouseup\", \"mousemove\", \"mouseover\", \"mouseout\", \"mouseenter\", \"mouseleave\", \"contextmenu\", \"change\", \"select\", \"keydown\", \"keypress\", \"keyup\", \"error\", \"submit\"];\n\n $.fn.attr = function (prop, value) {\r\n \tlet isArr = $.isArray(prop),\r\n \t\ti,\r\n \t\tarr = {};\r\n\r\n \t// set properties\r\n \tif (isArr || value || value === null) {\r\n \t\ti = this.length;\r\n\r\n \t\t// normalise to array\r\n \t\tif (!isArr) {\r\n \t\t\tarr[prop] = value;\r\n \t\t\tprop = arr;\r\n \t\t}\r\n\r\n \t\twhile (i--) {\r\n \t\t\t$.each(prop, (key, val) => {\r\n \t\t\t\tif (events.indexOf(key) > -1) {\r\n \t\t\t\t\t$(this[i]).on(key, val);\r\n \t\t\t\t} else if (key === \"style\") {\r\n \t\t\t\t\tthis[i].style.cssText = val;\r\n \t\t\t\t} else if (key === \"class\") {\r\n \t\t\t\t\tthis[i].className = val;\r\n \t\t\t\t} else if (key === \"text\") {\r\n \t\t\t\t\tthis[i].textContent = val;\r\n \t\t\t\t} else if (value === null) {\r\n \t\t\t\t\tthis[i].removeAttribute(key);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis[i].setAttribute(key, val);\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// retrieve properties\r\n \t} else if (this[0]) {\r\n \t\tif (prop === \"style\") {\r\n \t\t\treturn this[0].style.cssText;\r\n \t\t}\r\n \t\tif (prop === \"class\") {\r\n \t\t\treturn this[0].className;\r\n \t\t}\r\n \t\treturn this[0].getAttribute(prop);\r\n \t}\r\n };\n\n [\"addClass\", \"removeClass\", \"toggleClass\"].forEach(name => {\r\n \t$.fn[name] = function (cls) {\r\n\r\n \t\t// remove \"Class\" from name for classList method\r\n \t\tlet func = name.substr(0, name.length - 5),\r\n \t\t\ti = this.length;\r\n\r\n \t\t// manage classes on nodes\r\n \t\twhile (i--) {\r\n \t\t\tlet arr = getVal(cls, this[i], i, this[i].className);\r\n \t\t\tif (typeof arr === \"string\") {\r\n \t\t\t\tarr = arr.split(\" \");\r\n \t\t\t}\r\n \t\t\tconst len = arr.length;\r\n \t\t\tfor (let n = 0; n < len; n++) {\r\n \t\t\t\tthis[i].classList[func](arr[n]);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n var dasherise = prop => prop.replace(/[A-Z]/g, (letter) => \"-\" + letter.toLowerCase());\n\n var setCss = (dabby, props, value) => {\r\n\r\n \t// set vars\r\n \tlet name = props,\r\n \t\tkeys,\r\n \t\tk,\r\n \t\tremove;\r\n\r\n \t// normalise props\r\n \tif (typeof props === \"string\") {\r\n \t\tprops = {};\r\n \t\tprops[name] = value;\r\n \t}\r\n\r\n \t// cache properties for loop\r\n \tkeys = Object.keys(props);\r\n \tk = keys.length;\r\n\r\n \t// set properties\r\n \twhile (k--) {\r\n \t\tlet i = dabby.length;\r\n \t\twhile (i--) {\r\n \t\t\tlet val = props[keys[k]] === \"\" ? undefined : getVal(props[keys[k]], dabby[i], k, dabby[i].style[keys[k]]);\r\n \t\t\tif (!isNaN(val)) {\r\n \t\t\t\tval += \"px\";\r\n \t\t\t}\r\n \t\t\tdabby[i].style[remove ? \"removeProperty\" : \"setProperty\"](dasherise(keys[k]), val);\r\n \t\t}\r\n \t}\r\n \treturn dabby;\r\n }\n\n $.fn.css = function (props, value) {\r\n\r\n \t// set the values\r\n \tif (value !== undefined || $.isPlainObject(props)) {\r\n \t\treturn setCss(this, props, value);\r\n\r\n \t// retrieve value from first property\r\n \t} else if (this[0]) {\r\n \t\tlet name = props,\r\n \t\t\ti,\r\n \t\t\tstyle = getComputedStyle(this[0], \"\"),\r\n \t\t\toutput = {},\r\n \t\t\tret = false;\r\n\r\n \t\tif (typeof name === \"string\") {\r\n \t\t\tprops = [name];\r\n \t\t\tret = true;\r\n \t\t}\r\n \t\ti = props.length;\r\n \t\twhile (i--) {\r\n \t\t\toutput[props[i]] = style.getPropertyValue(dasherise(props[i]));\r\n \t\t\tif (ret) {\r\n \t\t\t\treturn output[props[i]];\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn output;\r\n \t}\r\n };\n\n var camelise = prop => prop.replace(/-([a-z])/gi, (text, letter) => letter.toUpperCase());\n\n $.fn.data = function (name, data) {\r\n\r\n \t// convert data to object\r\n \tif (typeof name === \"object\") {\r\n \t\tdata = name;\r\n \t} else if (data !== undefined) {\r\n \t\tlet temp = {};\r\n \t\ttemp[name] = data;\r\n \t\tdata = temp;\r\n \t}\r\n\r\n \t// set value\r\n \tif (data !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\t$.each(data, (key, value) => {\r\n \t\t\t\tthis[i].dataset[camelise(key)] = typeof value === \"object\" ? JSON.stringify(value) : value;\r\n \t\t\t});\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get value\r\n \t} else if (this[0] && this[0].dataset) {\r\n \t\tlet parse = value => {\r\n \t\t\ttry {\r\n \t\t\t\treturn JSON.parse(value);\r\n \t\t\t} catch (e) {\r\n \t\t\t\treturn value;\r\n \t\t\t}\r\n \t\t};\r\n\r\n \t\t// all properties\r\n \t\tif (name === undefined) {\r\n \t\t\tlet arr = {};\r\n \t\t\t$.each(this[0].dataset, (key, value) => {\r\n \t\t\t\tarr[key] = parse(value);\r\n \t\t\t});\r\n \t\t\treturn arr;\r\n\r\n \t\t// retrieve specific property\r\n \t\t} else {\r\n \t\t\tname = camelise(name);\r\n \t\t\tif (this[0].dataset.hasOwnProperty(name)) {\r\n \t\t\t\treturn parse(this[0].dataset[name]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n };\n\n $.fn.hasClass = function (cls) {\r\n \tlet i = this.length;\r\n \twhile (i--) {\r\n \t\tif (this[i].classList.contains(cls)) {\r\n \t\t\treturn true;\r\n \t\t}\r\n \t}\r\n \treturn false;\r\n };\n\n var getProp = prop => {\r\n \tlet properties = {\r\n \t\t\"for\": \"htmlFor\",\r\n \t\t\"class\": \"className\",\r\n \t\t\"tabindex\": \"tabIndex\",\r\n \t\t\"readonly\": \"readOnly\",\r\n \t\t\"maxlength\": \"maxLength\",\r\n \t\t\"cellspacing\": \"cellSpacing\",\r\n \t\t\"cellpadding\": \"cellPadding\",\r\n \t\t\"rowspan\": \"rowSpan\",\r\n \t\t\"colspan\": \"colSpan\",\r\n \t\t\"usemap\": \"useMap\",\r\n \t\t\"frameborder\": \"frameBorder\",\r\n \t\t\"contenteditable\": \"contentEditable\"\r\n \t};\r\n \tprop = prop.toLowerCase();\r\n \treturn properties[prop] || prop;\r\n }\n\n $.fn.prop = function (prop, value) {\r\n \tprop = getProp(prop);\r\n\r\n \t// set\r\n \tif (value !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\tthis[i][prop] = getVal(value, this[i], i, this[i][prop]);\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get\r\n \t} else if (this[0]) {\r\n \t\treturn this[0][prop];\r\n \t}\r\n };\n\n $.fn.removeProp = function (prop) {\r\n \tif (this[0]) {\r\n \t\tlet i = this.length;\r\n \t\tprop = getProp(prop);\r\n\r\n \t\twhile (i--) {\r\n \t\t\tdelete this[i][prop];\r\n \t\t}\r\n \t\treturn this;\r\n \t}\r\n };\n\n $.fn.map = function (callback) {\r\n \tconst len = this.length;\r\n \tlet values = [],\r\n \t\ti = 0;\r\n\r\n \tfor (; i < len; i++) {\r\n \t\tvalues.push(callback.call(this[i], i, this[i]));\r\n \t}\r\n \treturn values;\r\n };\n\n $.fn.offset = function (coords) {\r\n \tconst doc = document.documentElement;\r\n \tlet rect,\r\n \t\ti = this.length,\r\n \t\tpos;\r\n\r\n \t// set\r\n \tif (coords) {\r\n \t\twhile (i--) {\r\n\r\n \t\t\t// if coords is callback, generate value\r\n \t\t\trect = this[i].getBoundingClientRect();\r\n \t\t\tlet itemCoords = Object.create(getVal(coords, this[i], i, $(this[i]).offset())); // copy the object\r\n\r\n \t\t\tif (itemCoords.top !== undefined && itemCoords.left !== undefined) {\r\n \t\t\t\tlet style = getComputedStyle(this[i]);\r\n \t\t\t\tpos = style.getPropertyValue(\"position\");\r\n\r\n \t\t\t\t// set position relative if static\r\n \t\t\t\tif (pos === \"static\") {\r\n \t\t\t\t\tthis[i].style.position = \"relative\";\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// add current offset\r\n \t\t\t\titemCoords.top += parseFloat(style.getPropertyValue(\"top\")) || 0;\r\n \t\t\t\titemCoords.left += parseFloat(style.getPropertyValue(\"left\")) || 0;\r\n\r\n \t\t\t\t// remove parent offset and viewport scroll\r\n \t\t\t\tif (pos !== \"fixed\") {\r\n \t\t\t\t\titemCoords.top -= doc.scrollTop + rect.top;\r\n \t\t\t\t\titemCoords.left -= doc.scrollLeft + rect.left;\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// set offset\r\n \t\t\t\tthis[i].style.top = itemCoords.top + \"px\";\r\n \t\t\t\tthis[i].style.left = itemCoords.left + \"px\";\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get\r\n \t} else if (this[0]) {\r\n \t\tpos = this[0].style.position === \"fixed\";\r\n \t\trect = this[0].getBoundingClientRect();\r\n \t\treturn {\r\n \t\t\ttop: rect.top + (pos ? 0 : doc.scrollTop),\r\n \t\t\tleft: rect.left + (pos ? 0 : doc.scrollLeft)\r\n \t\t};\r\n \t}\r\n };\n\n $.fn.offsetParent = function () {\r\n \treturn $(this[0] ? this[0].offsetParent : null);\r\n };\n\n $.fn.position = function () {\r\n \tif (this[0]) {\r\n \t\treturn {left: this[0].offsetLeft, top: this[0].offsetTop};\r\n \t}\r\n };\n\n [\"scrollLeft\", \"scrollTop\"].forEach(item => {\r\n \t$.fn[item] = function (pos) {\r\n\r\n \t\t// set\r\n \t\tif (pos !== undefined) {\r\n \t\t\tlet i = this.length,\r\n \t\t\t\ttl = item.indexOf(\"Top\") > -1 ? \"top\" : \"left\";\r\n \t\t\twhile (i--) {\r\n \t\t\t\tlet val = getVal(pos, this, i, this[i][item]);\r\n \t\t\t\tif ($.isWindow(this[i])) {\r\n \t\t\t\t\tlet obj = {};\r\n \t\t\t\t\tobj[tl] = val;\r\n \t\t\t\t\tthis[i].scroll(obj);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis[i][item] = val;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn this;\r\n\r\n \t\t// get\r\n \t\t} else if (this[0]) {\r\n \t\t\tif ($.isWindow(this[0])) {\r\n \t\t\t\titem = item === \"scrollTop\" ? \"pageYOffset\" : \"pageXOffset\";\r\n \t\t\t}\r\n \t\t\treturn this[0][item];\r\n \t\t}\r\n \t};\r\n });\n\n [\"width\", \"height\", \"innerWidth\", \"innerHeight\", \"outerWidth\", \"outerHeight\"].forEach(dim => {\r\n\r\n \tconst getAdditionalLength = (obj, wh, props) => {\r\n \t\tconst style = getComputedStyle(obj);\r\n \t\tlet i = props.length,\r\n \t\t\tvalue = 0,\r\n \t\t\tsuffix;\r\n\r\n \t\twhile (i--) {\r\n \t\t\tsuffix = props[i] === \"border\" ? \"-width\" : \"\";\r\n \t\t\tvalue += parseFloat(style.getPropertyValue(props[i] + (wh === \"width\" ? \"-left\" : \"-top\") + suffix)) || 0;\r\n \t\t\tvalue += parseFloat(style.getPropertyValue(props[i] + (wh === \"width\" ? \"-right\" : \"-bottom\") + suffix)) || 0;\r\n \t\t}\r\n \t\treturn value;\r\n \t};\r\n\r\n \t$.fn[dim] = function (val) {\r\n \t\tconst valtype = typeof(val),\r\n \t\t\twh = dim.toLowerCase().indexOf(\"width\") > -1 ? \"width\" : \"height\", // width or height\r\n \t\t\tio = dim.indexOf(\"inner\") > -1 ? \"inner\" : (dim.indexOf(\"outer\") > -1 ? \"outer\" : \"\"); // inner outer or neither\r\n \t\tlet i = this.length,\r\n \t\t\tvalue,\r\n \t\t\twhu,\r\n \t\t\tprops,\r\n \t\t\tparam;\r\n\r\n \t\t// set value\r\n \t\tif (val !== undefined && valtype !== \"boolean\") {\r\n \t\t\twhile (i--) {\r\n\r\n \t\t\t\t// set base value\r\n \t\t\t\tvalue = getVal(val, this[i], i, this[i][dim]);\r\n \t\t\t\tif (!isNaN(val)) {\r\n \t\t\t\t\tvalue += \"px\";\r\n \t\t\t\t}\r\n \t\t\t\tthis[i].style[wh] = value; // set here so we can convert to px\r\n\r\n \t\t\t\t// add additional lengths\r\n \t\t\t\tif (io) {\r\n \t\t\t\t\tvalue = parseFloat(getComputedStyle(this[i]).getPropertyValue(wh));\r\n \t\t\t\t\tprops = [\"padding\"];\r\n \t\t\t\t\tif (io === \"outer\") {\r\n \t\t\t\t\t\tprops.push(\"border\");\r\n \t\t\t\t\t}\r\n \t\t\t\t\tvalue -= getAdditionalLength(this[i], wh, props);\r\n \t\t\t\t\tif (!isNaN(val)) {\r\n \t\t\t\t\t\tvalue += \"px\";\r\n \t\t\t\t\t}\r\n \t\t\t\t\tthis[i].style[wh] = value;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn this;\r\n\r\n \t\t// get value\r\n \t\t} else if (this[0]) {\r\n \t\t\twhu = wh === \"width\" ? \"Width\" : \"Height\";\r\n\r\n \t\t\t// document\r\n \t\t\tif (this[0].nodeType === Node.DOCUMENT_NODE) {\r\n \t\t\t\treturn this[0].documentElement[\"scroll\" + whu];\r\n\r\n \t\t\t// element\r\n \t\t\t} else if (!$.isWindow(this[0])) {\r\n \t\t\t\tparam = io === \"outer\" ? \"offset\" : \"client\";\r\n \t\t\t\tvalue = this[0][param + whu];\r\n\r\n \t\t\t\t// add padding on, or if outer and margins requested, add margins on\r\n \t\t\t\tif (io === \"\" || (io === \"outer\" && val === true)) {\r\n \t\t\t\t\tvalue += getAdditionalLength(this[0], wh, [io ? \"margin\" : \"padding\"]) * (io ? 1 : -1); // add margin, minus padding\r\n \t\t\t\t}\r\n \t\t\t\treturn value;\r\n\r\n \t\t\t// window\r\n \t\t\t} else if (io === \"inner\") {\r\n \t\t\t\treturn this[0].document.documentElement[\"client\" + whu];\r\n \t\t\t} else {\r\n \t\t\t\treturn this[0][\"inner\" + whu];\r\n \t\t\t}\r\n \t\t}\r\n \t};\r\n });\n\n $.fn.trigger = function (name, data) {\r\n \tconst evt = new CustomEvent(name, {bubbles: true, cancelable: true});\r\n \tlet i = this.length;\r\n\r\n \t// copy extra data to event object\r\n \tif (data) {\r\n \t\tevt.args = data;\r\n \t}\r\n \twhile (i--) {\r\n \t\tthis[i].dispatchEvent(evt);\r\n \t\t/*if (this[i].dispatchEvent(evt) && this[i][name]) {\r\n \t\t\tthis[i][name]();\r\n \t\t}*/\r\n \t}\r\n \treturn this;\r\n };\n\n events.forEach(event => {\r\n \t$.fn[event] = function (data, callback) {\r\n \t\treturn data ? this.on(event, data, callback) : this.trigger(event);\r\n \t};\r\n });\n\n $.fn.clone = function () {\r\n \tlet nodes = [],\r\n \t\ti = this.length;\r\n\r\n \twhile (i--) {\r\n \t\tnodes[i] = this[i].cloneNode(true);\r\n \t}\r\n \treturn $(nodes);\r\n };\n\n $.fn.empty = function () {\r\n \tlet i = this.length;\r\n \twhile (i--) {\r\n \t\twhile (this[i].firstChild && this[i].removeChild(this[i].firstChild));\r\n \t}\r\n \treturn this;\r\n };\n\n $.fn.html = function (html) {\r\n\r\n \t// set\r\n \tif (html !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\tthis[i].innerHTML = getVal(html, this[i], i, this[i].innerHTML);\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get\r\n \t} else if (this[0]) {\r\n \t\treturn this[0].innerHTML;\r\n \t}\r\n };\n\n $.each({\r\n \tbefore: \"beforeBegin\",\r\n \tprepend: \"afterBegin\",\r\n \tappend: \"beforeEnd\",\r\n \tafter: \"afterEnd\"\r\n }, (name, pos) => {\r\n \t$.fn[name] = function (html) {\r\n \t\tconst pre = [\"before\", \"prepend\"].indexOf(name) > -1,\r\n \t\t\tisFunc = $.isFunction(html);\r\n \t\tlet i = this.length,\r\n \t\t\telems = $();\r\n\r\n \t\tif (!isFunc) { // multiple arguments containing nodes?\r\n \t\t\t$.each(arguments, (i, arg) => {\r\n \t\t\t\telems.add(arg);\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\twhile (i--) {\r\n \t\t\tif (isFunc) {\r\n \t\t\t\telems = $(getVal(html, this[i], i, this[i].innerHTML));\r\n \t\t\t}\r\n \t\t\tlet backwards = elems.length, // for counting down\r\n \t\t\t\tforwards = -1; // for counting up\r\n \t\t\twhile (pre ? backwards-- : ++forwards < backwards) { // insert forwards or backwards?\r\n \t\t\t\tlet obj = elems[pre ? backwards : forwards];\r\n\r\n \t\t\t\t// clone if i !== 0\r\n \t\t\t\tif (i) {\r\n \t\t\t\t\tobj = obj.cloneNode(true);\r\n \t\t\t\t}\r\n \t\t\t\tthis[i].insertAdjacentElement(pos, obj);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n $.each({\r\n \tinsertBefore: \"before\",\r\n \tprependTo: \"prepend\",\r\n \tappendTo: \"append\",\r\n \tinsertAfter: \"after\"\r\n }, (name, func) => {\r\n \t$.fn[name] = function (selector) {\r\n \t\tlet i = this.length,\r\n \t\t\tobj = $(selector);\r\n\r\n \t\twhile (i--) {\r\n \t\t\tobj[func](this[i]);\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n [\"remove\", \"detach\"].forEach(func => {\r\n \t$.fn[func] = function (selector) {\r\n \t\tlet i = this.length,\r\n \t\t\tnodes = [];\r\n\r\n \t\t// detach selected nodes\r\n \t\twhile (i--) {\r\n \t\t\tif (!selector || filterNodes(this[i], selector).length) {\r\n \t\t\t\tnodes.push(this[i].parentNode.removeChild(this[i]));\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// create a new dabby object to return\r\n \t\treturn func === \"detach\" ? $(nodes) : this;\r\n \t};\r\n });\n\n [\"replaceWith\", \"replaceAll\"].forEach(name => {\r\n \t$.fn[name] = function (html) {\r\n \t\tconst all = name === \"replaceAll\",\r\n \t\t\tsource = all ? $(html) : this;\r\n \t\tlet target = all ? this : html,\r\n \t\t\tisFunc = $.isFunction(target);\r\n\r\n \t\tif (!isFunc) {\r\n \t\t\ttarget = $(target);\r\n \t\t}\r\n\r\n \t\tlet i = source.length;\r\n\r\n \t\twhile (i--) {\r\n \t\t\tlet n = target.length,\r\n \t\t\t\tparent = source[i].parentNode;\r\n \t\t\twhile (n--) {\r\n \t\t\t\tconst replace = isFunc ? getVal(target[n], n, target[n]) : target[n];\r\n \t\t\t\tif (n) {\r\n \t\t\t\t\tsource[i].insertAdjacentElement(\"beforebegin\", replace.cloneNode(true));\r\n \t\t\t\t} else {\r\n \t\t\t\t\tsource[i] = parent.replaceChild(i ? replace.cloneNode(true) : replace, source[i]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n $.fn.slice = function (start, end) {\r\n \treturn $(this.get().slice(start, end));\r\n };\n\n $.fn.text = function (text) {\r\n \tconst get = text === undefined;\r\n \tlet len = this.length,\r\n \t\toutput = [],\r\n \t\ti = 0;\r\n \tfor (; i < len; i++) {\r\n \t\tif (get) {\r\n \t\t\toutput.push(this[i].textContent);\r\n \t\t} else {\r\n \t\t\tthis[i].textContent = getVal(text, this[i], i, this[i].textContent);\r\n \t\t}\r\n \t}\r\n \treturn get ? output.join(\" \") : this;\r\n };\n\n $.fn.unwrap = function (selector) {\r\n \tthis.parent(selector).not(\"body\").each((key, obj) => {\r\n \t\tconst parent = obj.parentNode;\r\n\r\n \t\t$(obj.children).each((i, node) => {\r\n \t\t\tparent.insertBefore(node, obj);\r\n \t\t});\r\n \t\tparent.removeChild(obj);\r\n \t});\r\n \treturn this;\r\n };\n\n $.fn.wrapAll = function (html) {\r\n \tif (this[0]) {\r\n\r\n \t\t// set variables\r\n \t\tlet len = this.length,\r\n \t\t\ti = 0,\r\n \t\t\tnode = $(getVal(html, this[0])).get(0).cloneNode(true);\r\n\r\n \t\t// insert clone into parent\r\n \t\tthis[0].parentNode.insertBefore(node, null);\r\n\r\n \t\t// find innermost child of node\r\n \t\twhile (node.firstElementChild) {\r\n \t\t\tnode = node.firstElementChild;\r\n \t\t}\r\n\r\n \t\t// attach nodes to the new node\r\n \t\tfor (; i < len; i++) {\r\n \t\t\tnode.appendChild(this[i]);\r\n \t\t}\r\n \t}\r\n \treturn this;\r\n };\n\n $.fn.wrap = function (html) {\r\n \tlet i = this.length;\r\n\r\n \twhile (i--) {\r\n \t\t$(this[i]).wrapAll(getVal(html, this[i], i));\r\n \t}\r\n \treturn this;\r\n };\n\n $.fn.children = function (selector) {\r\n \tlet nodes = [],\r\n \t\ti = this.length;\r\n\r\n \twhile (i--) {\r\n \t\tnodes = nodes.concat(Array.from(this[i].children));\r\n \t}\r\n\r\n \t// filter nodes by selector\r\n \tif (selector) {\r\n \t\tnodes = filterNodes(nodes, selector);\r\n \t}\r\n \treturn $(nodes);\r\n };\n\n $.fn.closest = function (selector, context) {\r\n \tlet i = this.length,\r\n \t\tnodes = [],\r\n \t\tparents,\r\n \t\tnode;\r\n\r\n \twhile (i--) {\r\n \t\tparents = [];\r\n \t\tnode = this[i];\r\n \t\twhile (node) {\r\n \t\t\tparents.push(node);\r\n \t\t\tnode = node.parentNode;\r\n \t\t}\r\n \t\tparents = filterNodes(parents, selector, context);\r\n \t\tif (parents[0]) {\r\n \t\t\tnodes.push(parents[0]);\r\n \t\t}\r\n \t}\r\n \treturn $(nodes);\r\n };\n\n $.fn.eq = function (i) {\r\n \tconst key = i < 0 ? i + this.length : i;\r\n \treturn $(this[key] || null);\r\n };\n\n $.fn.find = function (selector) {\r\n \treturn $(selector, this);\r\n };\n\n $.fn.first = function () {\r\n \treturn $(this[0]);\r\n };\n\n $.fn.has = function (selector) {\r\n \treturn $(this.get().filter(node => !!$(selector, node).length));\r\n };\n\n $.fn.index = function (selector) {\r\n \tlet index = -1;\r\n\r\n \tif (this[0]) {\r\n \t\tlet nodes,\r\n \t\t\tsubject = this[0],\r\n \t\t\ttype = typeof selector,\r\n \t\t\ti;\r\n\r\n \t\t// if no selector, match against first elements siblings\r\n \t\tif (type === \"undefined\") {\r\n \t\t\tnodes = this[0].parentNode.children;\r\n\r\n \t\t// if selector is string, match first node in current collection against resulting collection\r\n \t\t} else if (type === \"string\") {\r\n \t\t\tnodes = $(selector);\r\n\r\n \t\t// if element or collection match the element or first node against current collection\r\n \t\t} else {\r\n \t\t\tnodes = this;\r\n \t\t\tsubject = $(selector)[0];\r\n \t\t}\r\n\r\n \t\ti = nodes.length;\r\n \t\twhile (i--) {\r\n \t\t\tif (nodes[i] === subject) {\r\n \t\t\t\treturn i;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \treturn index;\r\n };\n\n $.fn.last = function () {\r\n \treturn this.eq(-1);\r\n };\n\n [\"next\", \"nextAll\", \"nextUntil\", \"prev\", \"prevAll\", \"prevUntil\"].forEach(func => {\r\n \t$.fn[func] = function (selector, filter) {\r\n \t\tconst next = func.indexOf(\"next\") > -1,\r\n \t\t\tall = func.indexOf(\"All\") > -1,\r\n \t\t\tuntil = func.indexOf(\"Until\") > -1,\r\n \t\t\tmethod = next ? \"nextElementSibling\" : \"previousElementSibling\";\r\n \t\tlet nodes = [],\r\n \t\t\ti = this.length,\r\n \t\t\tsibling;\r\n\r\n \t\t// look through each node and get siblings\r\n \t\twhile (i--) {\r\n \t\t\tsibling = this[i][method];\r\n \t\t\twhile (sibling) {\r\n \t\t\t\tnodes.push(sibling);\r\n \t\t\t\tif (all || (until && filterNodes(sibling, selector).length)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tsibling = sibling[method];\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// swap args for *Until methods\r\n \t\tif (until) {\r\n \t\t\tselector = filter;\r\n \t\t}\r\n\r\n \t\t// filter siblings by selector\r\n \t\tif (selector) {\r\n \t\t\tnodes = filterNodes(nodes, selector);\r\n \t\t}\r\n\r\n \t\t// return new collection\r\n \t\treturn $(nodes);\r\n \t};\r\n });\n\n $.fn.siblings = function (selector) {\r\n \tlet i = this.length,\r\n \t\tnodes = [];\r\n\r\n \twhile (i--) {\r\n \t\tArray.from(this[i].parentNode.children).forEach(child => {\r\n \t\t\tif (child !== this[i]) {\r\n \t\t\t\tnodes.push(child);\r\n \t\t\t}\r\n \t\t});\r\n \t}\r\n \treturn $(selector ? filterNodes(nodes, selector) : nodes);\r\n };\n\n // ajax\r\n // attributes\r\n // core\r\n // dimensions\r\n // events\r\n // manipulation\r\n // traversal\r\n // utilities\n\n return $;\n\n})));\n"],"file":"dabby.es5.js"} \ No newline at end of file +{"version":3,"sources":["dabby.es5.js"],"names":["global","factory","exports","module","define","amd","$","Array","from","arrayLike","mapFn","thisArg","arr","slice","call","map","window","CustomEvent","CustomEvent$1","event","params","bubbles","cancelable","detail","undefined","evt","document","createEvent","initCustomEvent","prototype","Event","Element","matches","msMatchesSelector","NodeList","forEach","callback","i","length","Object","assign","defineProperty","value","target","varArgs","TypeError","to","index","arguments","nextSource","nextKey","hasOwnProperty","writable","configurable","dabby","selector","context","nodes","match","obj","nodeType","isWindow","isFunction","readyState","addEventListener","once","indexOf","each","concat","querySelectorAll","push","createElement","prop","attr","innerHTML","content","children","node","fn","keys","len","func","constructor","Function","isPlainObject","getPrototypeOf","proto","toString","extend","arrs","merge","sources","source","shift","apply","isArray","param","add","key","isArr","val","encodeURIComponent","item","join","ajax","url","settings","method","cache","data","dataType","async","crossDomain","scriptCharset","jsonp","jsonpCallback","Date","now","headers","xhr","XMLHttpRequest","contentType","statusCode","username","password","test","sync","script","FormData","charset","load","error","response","complete","src","head","appendChild","status","responseText","JSON","parse","e","success","onload","types","ontimeout","onabort","open","setRequestHeader","send","name","type","isFunc","toUpperCase","getScript","filterNodes","filter","not","n","Boolean","split","uri","html","outerHTML","getVal","current","result","multiple","String","selected","values","checked","serialize","is","disabled","getAttribute","all","until","parent","parentNode","Node","ELEMENT_NODE","get","events","t","parents","args","preventDefault","stopPropagation","capture","removeEventListener","splice","on","style","cssText","className","textContent","removeAttribute","setAttribute","cls","substr","classList","dasherise","replace","letter","toLowerCase","setCss","props","k","remove","isNaN","css","getComputedStyle","output","ret","getPropertyValue","camelise","text","temp","dataset","stringify","hasClass","contains","getProp","properties","removeProp","offset","coords","doc","documentElement","rect","pos","getBoundingClientRect","itemCoords","create","top","left","position","parseFloat","scrollTop","scrollLeft","offsetParent","offsetLeft","offsetTop","tl","scroll","dim","getAdditionalLength","wh","suffix","valtype","io","whu","DOCUMENT_NODE","trigger","dispatchEvent","clone","cloneNode","empty","firstChild","removeChild","before","prepend","append","after","pre","elems","arg","backwards","forwards","insertAdjacentElement","insertBefore","prependTo","appendTo","insertAfter","replaceChild","start","end","unwrap","wrapAll","firstElementChild","wrap","closest","eq","find","first","has","subject","last","next","sibling","siblings","child"],"mappings":";;AAAA;AAEC,WAAUA,MA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WAFD,MAEO;AACN4P,YAAAA,OAAO,GAAGA,OAAO,CAACvL,MAAD,CAAjB;AACA;AACD;AACD,OApBuC,CAsBxC;;;AACA,UAAIsE,KAAJ,EAAW;AACV1H,QAAAA,QAAQ,GAAGqG,MAAX;AACA,OAzBuC,CA2BxC;;;AACA,UAAIrG,QAAJ,EAAc;AACbE,QAAAA,KAAK,GAAGkG,WAAW,CAAClG,KAAD,EAAQF,QAAR,CAAnB;AACA,OA9BuC,CAgCxC;;;AACA,aAAOjD,CAAC,CAACmD,KAAD,CAAR;AACA,KAlCD;AAmCA,GApCD;;AAsCAnD,EAAAA,CAAC,CAACwE,EAAF,CAAKqN,QAAL,GAAgB,UAAU5O,QAAV,EAAoB;AAAA;;AACnC,QAAIlB,CAAC,GAAG,KAAKC,MAAb;AAAA,QACCmB,KAAK,GAAG,EADT;;AAGA,WAAOpB,CAAC,EAAR,EAAY;AACX9B,MAAAA,KAAK,CAACC,IAAN,CAAW,KAAK6B,CAAL,EAAQ8I,UAAR,CAAmBvG,QAA9B,EAAwCzC,OAAxC,CAAgD,UAAAiQ,KAAK,EAAI;AACxD,YAAIA,KAAK,KAAK,MAAI,CAAC/P,CAAD,CAAlB,EAAuB;AACtBoB,UAAAA,KAAK,CAACa,IAAN,CAAW8N,KAAX;AACA;AACD,OAJD;AAKA;;AACD,WAAO9R,CAAC,CAACiD,QAAQ,GAAGoG,WAAW,CAAClG,KAAD,EAAQF,QAAR,CAAd,GAAkCE,KAA3C,CAAR;AACA,GAZD,CAx9CiB,CAs+CjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA,SAAOnD,CAAP;AAEH,CAr/CA,CAAD","sourcesContent":["/*! dabbyjs v0.9.6 by Will Earp - https://github.com/hexydec/dabby */\r\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.$ = factory());\n}(this, (function () { 'use strict';\n\n if (!Array.from) {\r\n \tArray.from = function (arrayLike, mapFn, thisArg) {\r\n \t\tvar arr = [].slice.call(arrayLike);\r\n \t\tif (typeof mapFn === \"function\") {\r\n \t\t\tarr = arr.map(mapFn, thisArg);\r\n \t\t}\r\n \t\treturn arr;\r\n \t};\r\n }\n\n // CustomEvent is not supported in IE11\r\n if (typeof window.CustomEvent !== \"function\") {\r\n \tfunction CustomEvent$1(event, params) {\r\n \t\tparams = params || {bubbles: false, cancelable: false, detail: undefined};\r\n \t\tconst evt = document.createEvent(\"CustomEvent\");\r\n \t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\r\n \t\treturn evt;\r\n \t}\r\n\r\n \tCustomEvent$1.prototype = window.Event.prototype;\r\n \twindow.CustomEvent = CustomEvent$1;\r\n }\n\n // support Element.matches() in IE and older Webkit\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches = Element.prototype.msMatchesSelector;\r\n }\n\n if (!NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = function (callback, thisArg) {\r\n thisArg = thisArg || window;\r\n for (var i = 0; i < this.length; i++) {\r\n callback.call(thisArg, this[i], i, this);\r\n }\r\n };\r\n }\n\n if (typeof Object.assign !== \"function\") {\r\n \tObject.defineProperty(Object, \"assign\", {\r\n \t\tvalue: function assign(target, varArgs) { // .length of function is 2\r\n \t\t\tif (target == null) { // TypeError if undefined or null\r\n \t\t\t\tthrow new TypeError('Cannot convert undefined or null to object');\r\n \t\t\t}\r\n\r\n \t\t\tvar to = Object(target);\r\n\r\n \t\t\tfor (var index = 1; index < arguments.length; index++) {\r\n \t\t\t\tvar nextSource = arguments[index];\r\n\r\n \t\t\t\tif (nextSource != null) { // Skip over if undefined or null\r\n \t\t\t\t\tfor (var nextKey in nextSource) {\r\n \t\t\t\t\t\t// Avoid bugs when hasOwnProperty is shadowed\r\n \t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\r\n \t\t\t\t\t\t\tto[nextKey] = nextSource[nextKey];\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn to;\r\n \t\t},\r\n \t\twritable: true,\r\n \t\tconfigurable: true\r\n \t});\r\n }\n\n const $ = function dabby(selector, context) {\r\n \tlet nodes = [],\r\n \t\tmatch,\r\n \t\tobj;\r\n\r\n \t// enables new object to be created through $()\r\n \tif (!(this instanceof dabby)) {\r\n \t\treturn new dabby(selector, context);\r\n\r\n \t// if no selector, return empty colletion\r\n \t} else if (selector) {\r\n\r\n \t\t// $ collection\r\n \t\tif (selector instanceof dabby) {\r\n \t\t\treturn selector;\r\n\r\n \t\t// single node\r\n \t\t} else if (selector.nodeType || $.isWindow(selector)) {\r\n \t\t\tnodes = [selector];\r\n\r\n \t\t// ready function\r\n \t\t} else if ($.isFunction(selector)) {\r\n \t\t\tif (document.readyState !== \"loading\") {\r\n \t\t\t\tselector.call(document, $);\r\n \t\t\t} else {\r\n \t\t\t\tdocument.addEventListener(\"DOMContentLoaded\", () => {selector.call(document, $);}, {once: true});\r\n \t\t\t}\r\n\r\n \t\t// array|NodeList|HTMLCollection of nodes\r\n \t\t} else if (typeof selector !== \"string\") {\r\n \t\t\tnodes = selector;\r\n\r\n \t\t// CSS selector\r\n \t\t} else if (selector.indexOf(\"<\") === -1) {\r\n \t\t\t$(context || document).each((i, obj) => {\r\n \t\t\t\tnodes = nodes.concat(Array.from(obj.querySelectorAll(selector)));\r\n \t\t\t});\r\n\r\n \t\t// create a single node and attach properties\r\n \t\t} else if ((match = selector.match(/^<([a-z0-9]+)(( ?\\/)?|><\\/\\1)>$/i)) !== null) {\r\n \t\t\tnodes.push(document.createElement(match[1]));\r\n\r\n \t\t\t// context is CSS attributes\r\n \t\t\tif (context instanceof Object) {\r\n \t\t\t\tobj = $(nodes);\r\n \t\t\t\t$.each(context, (prop, value) => {\r\n \t\t\t\t\tobj.attr(prop, value);\r\n \t\t\t\t});\r\n \t\t\t}\r\n\r\n \t\t// parse HTML into nodes\r\n \t\t} else {\r\n \t\t\t//nodes = (context || doc).createRange().createContextualFragment(selector).childNodes; // not supported in iOS 9\r\n \t\t\tobj = document.createElement(\"template\");\r\n \t\t\tobj.innerHTML = selector;\r\n \t\t\tnodes = obj.content ? obj.content.children : obj.children;\r\n \t\t}\r\n \t}\r\n\r\n \t// build nodes\r\n \tthis.length = 0;\r\n \tArray.from(nodes).forEach(node => { // HTMLCollection objects don't support forEach\r\n \t\tif ([1, 9, 11].indexOf(node.nodeType) > -1 || $.isWindow(node)) { // only element, document, documentFragment and window\r\n \t\t\tthis[this.length++] = node;\r\n \t\t}\r\n \t});\r\n \treturn this;\r\n };\r\n\r\n // alias functions\r\n $.fn = $.prototype;\n\n $.each = (obj, callback) => {\r\n \tconst keys = Object.keys(obj),\r\n \t\tlen = keys.length;\r\n\r\n \tfor (let i = 0; i < len; i++) {\r\n \t\tif (callback.call(obj[keys[i]], keys[i], obj[keys[i]]) === false) {\r\n \t\t\tbreak; // stop if callback returns false\r\n \t\t}\r\n \t}\r\n \treturn obj;\r\n };\n\n $.fn.each = function (callback) {\r\n \t$.each(Array.from(this), callback);\r\n \treturn this;\r\n };\n\n $.isWindow = obj => obj !== null && obj === obj.window;\n\n $.isFunction = func => func && func.constructor === Function;\n\n $.isPlainObject = obj => {\r\n\r\n \t// Basic check for Type object that's not null\r\n \tif (typeof obj === \"object\" && obj !== null) {\r\n\r\n \t\t// If Object.getPrototypeOf supported, use it\r\n \t if (typeof Object.getPrototypeOf == 'function') {\r\n \t\t\tlet proto = Object.getPrototypeOf(obj);\r\n \t\t\treturn proto === Object.prototype || proto === null;\r\n \t }\r\n\r\n \t // Otherwise, use internal class\r\n \t // This should be reliable as if getPrototypeOf not supported, is pre-ES5\r\n \t\treturn Object.prototype.toString.call(obj) === \"[object Object]\";\r\n \t}\r\n\r\n \t// Not an object\r\n \treturn false;\r\n };\n\n $.extend = (...arrs) => {\r\n \tif (arrs[0] === true) {\r\n\r\n \t\t// merge function will recursively merge items\r\n \t\tfunction merge(target, ...sources) {\r\n \t\t\tif (sources.length) {\r\n\r\n \t\t\t\t// work on next source\r\n \t\t\t\tconst source = sources.shift();\r\n \t\t\t\tif ($.isPlainObject(target) && $.isPlainObject(source)) {\r\n\r\n \t\t\t\t\t// loop through each property\r\n \t\t\t\t\tconst keys = Object.keys(source),\r\n \t\t\t\t\t\tlen = keys.length;\r\n \t\t\t\t\tfor (let i = 0; i < len; i++) {\r\n\r\n \t\t\t\t\t\t// merge recursively if source is object, if target is not object, overwrite\r\n \t\t\t\t\t\tif ($.isPlainObject(source[keys[i]])) {\r\n \t\t\t\t\t\t\ttarget[keys[i]] = $.isPlainObject(target[keys[i]]) ? merge(target[keys[i]], source[keys[i]]) : source[keys[i]];\r\n\r\n \t\t\t\t\t\t// when source property is value just overwrite\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\ttarget[keys[i]] = source[keys[i]];\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// merge next source\r\n \t\t\t return merge(target, ...sources);\r\n \t\t\t}\r\n \t\t\treturn target;\r\n \t\t}\r\n \t\treturn merge.apply(null, arrs.slice(1));\r\n \t} else {\r\n \t\treturn Object.assign.apply(null, arrs);\r\n \t}\r\n };\n\n $.isArray = arr => Array.isArray(arr);\n\n $.param = obj => {\r\n \tlet params = [],\r\n \t\tadd = (key, value, params) => {\r\n \t\t\tlet isArr = $.isArray(value);\r\n \t\t\tif (isArr || typeof value === \"object\") {\r\n \t\t\t\t$.each(value, (i, val) => {\r\n \t\t\t\t\tparams = add(key + \"[\" + (isArr ? \"\" : i) + \"]\", val, params);\r\n \t\t\t\t});\r\n \t\t\t} else {\r\n \t\t\t\tparams.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(value));\r\n \t\t\t}\r\n \t\t\treturn params;\r\n \t\t};\r\n\r\n \t// process values\r\n \t$.each(obj, (key, item) => {\r\n \t\tparams = add(key, item, params);\r\n \t});\r\n \treturn params.join(\"&\");\r\n };\n\n $.ajax = (url, settings) => {\r\n\r\n \t// normalise args\r\n \tif (typeof url === \"object\") {\r\n \t\tsettings = url;\r\n \t} else {\r\n \t\tif (typeof settings !== \"object\") {\r\n \t\t\tsettings = {};\r\n \t\t}\r\n \t\tsettings.url = url;\r\n \t}\r\n\r\n \t// set default settings\r\n \tsettings = $.extend({\r\n \t\tmethod: \"GET\",\r\n \t\tcache: null, // start will null so we can see if explicitly set\r\n \t\tdata: null,\r\n \t\tdataType: null, // only changes behavior with json, jsonp, script\r\n \t\tasync: true,\r\n \t\tcrossDomain: false,\r\n \t\tscriptCharset: null,\r\n \t\tjsonp: \"callback\",\r\n \t\tjsonpCallback: \"dabby\" + Date.now(),\r\n \t\theaders: {\r\n \t\t\t\"X-Requested-With\": \"XMLHttpRequest\"\r\n \t\t},\r\n \t\txhr: () => new XMLHttpRequest(),\r\n \t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n \t\tcontext: null,\r\n \t\tstatusCode: {},\r\n \t\tusername: null,\r\n \t\tpassword: null\r\n \t}, settings);\r\n\r\n \t// determine datatype\r\n \tif (!settings.dataType && /\\.js($|\\?)/.test(settings.url)) {\r\n \t\tsettings.dataType = \"script\";\r\n \t}\r\n\r\n \tlet sync = [\"script\", \"jsonp\"].indexOf(settings.dataType) > -1,\r\n \t\tscript, data;\r\n\r\n \t// add data to query string\r\n \tif (settings.data) {\r\n \t\tif (typeof settings.data === \"string\" || settings.data instanceof FormData) {\r\n \t\t\tdata = settings.data;\r\n \t\t} else {\r\n \t\t\tdata = $.param(settings.data);\r\n \t\t}\r\n \t}\r\n \tif (data && settings.method === \"GET\") {\r\n \t\tsettings.url += (settings.url.indexOf(\"?\") > -1 ? \"&\" : \"?\") + data;\r\n \t}\r\n\r\n \t// add cache buster\r\n \tif (settings.cache || (settings.cache === null && sync)) {\r\n \t\tsettings.url += (settings.url.indexOf(\"?\") > -1 ? \"&\" : \"?\") + \"_=\" + (+new Date());\r\n \t}\r\n\r\n \t// fetch script\r\n \tif (sync || settings.crossDomain) {\r\n \t\tscript = document.createElement(\"script\");\r\n \t\tif (settings.scriptCharset) {\r\n \t\t\tscript.charset = settings.scriptCharset;\r\n \t\t}\r\n\r\n \t\t// add callback parameter\r\n \t\tif (settings.dataType === \"jsonp\") {\r\n \t\t\tsettings.url += (settings.url.indexOf(\"?\") > -1 ? \"&\" : \"?\") + settings.jsonp + \"=\" + settings.jsonpCallback;\r\n \t\t}\r\n\r\n \t\t// setup event callbacks\r\n \t\t$.each({\r\n \t\t\tload: \"success\",\r\n \t\t\terror: \"error\"\r\n \t\t}, (key, value) => {\r\n \t\t\tscript.addEventListener(key, () => {\r\n \t\t\t\tlet response = settings.dataType === \"jsonp\" ? window[settings.jsonpCallback] || null : null;\r\n \t\t\t\t[settings[value], settings.complete].forEach(callback => {\r\n \t\t\t\t\tif (callback) {\r\n \t\t\t\t\t\tcallback.apply(settings.context, callback === settings.complete ? [null, value] : [response, value]);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t}, {once: true});\r\n \t\t});\r\n\r\n \t\tscript.src = settings.url;\r\n \t\tscript.async = settings.async;\r\n \t\tdocument.head.appendChild(script);\r\n\r\n \t// make xhr request\r\n \t} else {\r\n \t\tconst xhr = settings.xhr(),\r\n \t\t\tcallback = (xhr, status) => {\r\n \t\t\t\tlet response = xhr.responseText;\r\n\r\n \t\t\t\t// parse JSON\r\n \t\t\t\tif ([\"json\", null, undefined].indexOf(settings.dataType) > -1) {\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tresponse = JSON.parse(response);\r\n \t\t\t\t\t} catch (e) {\r\n \t\t\t\t\t\t// do nothing\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// run callbacks\r\n \t\t\t\t[settings.statusCode[xhr.status], settings[status], settings.complete].forEach(callback => {\r\n \t\t\t\t\tif (callback) {\r\n \t\t\t\t\t\tconst success = [settings.statusCode[xhr.status], settings[\"success\"]].indexOf(callback) > -1;\r\n \t\t\t\t\t\tcallback.apply(settings.context, success ? [response, status, xhr] : [xhr, status]);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t};\r\n\r\n \t\t// callbacks\r\n \t\txhr.onload = () => {\r\n \t\t\tconst types = {\r\n \t\t\t\t200: \"success\",\r\n \t\t\t\t204: \"nocontent\",\r\n \t\t\t\t304: \"notmodified\"\r\n \t\t\t};\r\n \t\t\tcallback(xhr, types[xhr.status] || \"error\");\r\n \t\t};\r\n \t\txhr.ontimeout = () => {\r\n \t\t\tcallback(xhr, \"timeout\");\r\n \t\t};\r\n \t\txhr.onabort = () => {\r\n \t\t\tcallback(xhr, \"abort\");\r\n \t\t};\r\n\r\n \t\txhr.open(settings.method, settings.url, settings.async, settings.username, settings.password);\r\n\r\n \t\t// add headers\r\n \t\tif (settings.contentType) {\r\n \t\t\tsettings.headers[\"Content-Type\"] = settings.contentType;\r\n \t\t}\r\n \t\t$.each(settings.headers, (key, value) => {\r\n \t\t\txhr.setRequestHeader(key, value);\r\n \t\t});\r\n\r\n \t\t// send request\r\n \t\txhr.send(settings.method === \"GET\" ? null : data);\r\n \t\treturn xhr;\r\n \t}\r\n };\n\n [\"get\", \"post\"].forEach(name => {\r\n \t$[name] = (url, data, success, type) => {\r\n \t\tconst isFunc = $.isFunction(data);\r\n \t\tlet settings = typeof(url) === \"object\" ? url : {\r\n \t\t\turl: url,\r\n \t\t\tdata: isFunc ? {} : data,\r\n \t\t\tsuccess: isFunc ? data : success,\r\n \t\t\tdataType: isFunc ? success : type\r\n \t\t};\r\n \t\tsettings.method = name.toUpperCase();\r\n \t\treturn $.ajax(settings);\r\n \t};\r\n });\n\n $.getScript = (url, success) => $.ajax({\r\n \turl: url,\r\n \tdataType: \"script\",\r\n \tsuccess: success\r\n });\n\n var filterNodes = (dabby, filter, context, not) => {\r\n \tlet func,\r\n \t\tnodes = dabby.nodeType ? [dabby] : Array.from(dabby);\r\n\r\n \t// sort out args\r\n \tif (typeof context === \"boolean\") {\r\n \t\tnot = context;\r\n \t\tcontext = null;\r\n \t}\r\n\r\n \t// function\r\n \tif ($.isFunction(filter)) {\r\n \t\tfunc = filter;\r\n\r\n \t// nodes\r\n \t} else {\r\n\r\n \t\t// normalise filters\r\n \t\tif (typeof(filter) === \"string\") {\r\n \t\t\tfilter = [filter];\r\n \t\t} else {\r\n \t\t\tfilter = Array.from($(filter, context));\r\n \t\t}\r\n\r\n \t\t// filter function\r\n \t\tfunc = (n, node) => {\r\n \t\t\tlet i = filter.length;\r\n \t\t\twhile (i--) {\r\n \t\t\t\tif (typeof(filter[i]) === \"string\" && node.matches ? node.matches(filter[i]) : node === filter[i]) {\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn false;\r\n \t\t};\r\n \t}\r\n \treturn nodes.filter((item, i) => func.call(item, i, item) !== Boolean(not), nodes);\r\n }\n\n [\"filter\", \"not\", \"is\"].forEach(name => {\r\n \t$.fn[name] = function (selector) {\r\n \t\tconst nodes = filterNodes(this, selector, name === \"not\");\r\n \t\treturn name === \"is\" ? !!nodes.length : $(nodes);\r\n \t};\r\n });\n\n $.fn.load = function (url, data, success) {\r\n \tif (this[0]) {\r\n\r\n \t\t// get selector from URL\r\n \t\turl = url.split(\" \", 2);\r\n \t\tconst uri = url[0],\r\n \t\t\tselector = url[1];\r\n\r\n \t\t// check for data\r\n \t\tif ($.isFunction(data)) {\r\n \t\t\tsuccess = data;\r\n \t\t\tdata = undefined;\r\n \t\t}\r\n\r\n \t\t// make AJAX request\r\n \t\t$.ajax(uri, {\r\n \t\t\tdata: data,\r\n \t\t\ttype: data instanceof Object ? \"POST\" : \"GET\",\r\n \t\t\tsuccess: (response, status, xhr) => {\r\n\r\n \t\t\t\t// if a selector is specified, find it in the returned document\r\n \t\t\t\tlet html = \"\",\r\n \t\t\t\t\ti = this.length;\r\n\r\n \t\t\t\t// refine by selector if supplied\r\n \t\t\t\tif (selector) {\r\n \t\t\t\t\t$(response).filter(selector).each((key, obj) => {\r\n \t\t\t\t\t\thtml += obj.outerHTML;\r\n \t\t\t\t\t});\r\n \t\t\t\t} else {\r\n \t\t\t\t\thtml = response;\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// set HTML to nodes in collection\r\n \t\t\t\twhile (i--) {\r\n \t\t\t\t\tthis[i].innerHTML = html;\r\n\r\n \t\t\t\t\t// fire success callback on nodes\r\n \t\t\t\t\tif (success) {\r\n \t\t\t\t\t\tsuccess.call(this[i], response, status, xhr);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t});\r\n \t}\r\n \treturn this;\r\n };\n\n var getVal = (val, obj, i, current) => {\r\n\r\n \t// retrieve as function\r\n \tif ($.isFunction(val)) {\r\n \t\tval = val.call(obj, i, $.isFunction(current) ? current() : current); // current can be a function\r\n \t}\r\n \treturn val;\r\n }\n\n $.map = (obj, callback) => {\r\n \tconst keys = Object.keys(obj),\r\n \t\tlen = keys.length;\r\n \tlet arr = [],\r\n \t\ti = 0,\r\n \t\tresult;\r\n\r\n \tfor (; i < len; i++) {\r\n \t\tresult = callback.call(window, obj[keys[i]], keys[i]);\r\n \t\tif (![null, undefined].indexOf(result) > -1) {\r\n \t\t\tarr.push(result);\r\n \t\t}\r\n \t}\r\n \treturn arr;\r\n };\n\n $.fn.val = function (value) {\r\n\r\n \t// set value\r\n \tif (value !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\tlet val = getVal(value, this[i], i, () => $(this[i]).val());\r\n \t\t\tif (this[i].multiple) {\r\n \t\t\t\tval = $.map($.isArray(val) ? val : [val], item => String(item)); // convert to string\r\n \t\t\t\t$(\"option\", this[i]).each((key, obj) => {\r\n \t\t\t\t\tobj.selected = val.indexOf(String(obj.value)) > -1;\r\n \t\t\t\t});\r\n \t\t\t} else {\r\n \t\t\t\tthis[i].value = String(val);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// read value from first node\r\n \t} else if (this[0]) {\r\n\r\n \t\t// get multiple values\r\n \t\tif (this[0].multiple) {\r\n \t\t\tlet values = [];\r\n \t\t\t$(\"option\", this[0]).each((key, obj) => {\r\n \t\t\t\tif (obj.selected) {\r\n \t\t\t\t\tvalues.push(String(obj.value));\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t\treturn values;\r\n\r\n \t\t// get radio box value\r\n \t\t} else if (this[0].type === \"radio\") {\r\n \t\t\tlet obj = this.filter(\"[name='\" + this[0].name + \"']:checked\")[0];\r\n \t\t\treturn obj ? String(obj.value) : undefined;\r\n\r\n \t\t// get single value\r\n \t\t} else if (this[0].type !== \"checkbox\" || this[0].checked) {\r\n \t\t\treturn String(this[0].value);\r\n \t\t}\r\n \t}\r\n };\n\n $.fn.serialize = function () {\r\n \tconst selector = \"input[name]:not([type=file]):not([type=submit]),textarea[name],select[name]\",\r\n \t\tobj = this.is(selector) ? this.filter(selector) : $(selector, this),\r\n \t\tadd = (name, value, params) => {\r\n \t\t\tlet match;\r\n\r\n \t\t\tif ((match = name.match(/([^\\[]*)\\[([^\\]]*)\\](.*)/)) !== null) {\r\n \t\t\t\tname = match[1];\r\n \t\t\t\tlet arr = add(match[2] + match[3], value, params[name] || {});\r\n \t\t\t\tvalue = arr;\r\n \t\t\t}\r\n\r\n \t\t\tif (name !== \"\") {\r\n \t\t\t\tparams[name] = value;\r\n \t\t\t} else {\r\n \t\t\t\tif (!$.isArray(params)) {\r\n \t\t\t\t\tparams = [];\r\n \t\t\t\t}\r\n \t\t\t\tparams = params.concat($.isArray(value) ? value : [value]);\r\n \t\t\t}\r\n \t\t\treturn params;\r\n \t\t};\r\n\r\n \tlet params = {};\r\n\r\n \t// process values\r\n \tobj.each((key, obj) => {\r\n \t\tconst value = $(obj).val();\r\n \t\tif (!obj.disabled && value !== undefined) {\r\n \t\t\tparams = add(obj.getAttribute(\"name\"), value, params);\r\n \t\t}\r\n \t});\r\n \treturn $.param(params);\r\n };\n\n $.fn.add = function (nodes, context) {\r\n \tnodes = $(nodes, context);\r\n \tlet len = this.length,\r\n \t\ti = nodes.length;\r\n\r\n \tthis.length += i;\r\n \twhile (i--) {\r\n \t\tthis[i + len] = nodes[i];\r\n \t}\r\n \treturn this;\r\n };\n\n [\"parent\", \"parents\", \"parentsUntil\"].forEach(func => {\r\n \t$.fn[func] = function (selector, filter) {\r\n \t\tconst all = func.indexOf(\"s\") > -1,\r\n \t\t\tuntil = func.indexOf(\"U\") > -1;\r\n \t\tlet nodes = [],\r\n \t\t\ti = this.length,\r\n \t\t\tparent;\r\n\r\n \t\twhile (i--) {\r\n \t\t\tparent = this[i].parentNode;\r\n \t\t\twhile (parent && parent.nodeType === Node.ELEMENT_NODE) {\r\n \t\t\t\tnodes.push(parent);\r\n \t\t\t\tif (!all || (until && filterNodes(parent, selector).length)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tparent = parent.parentNode;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\tif (selector) {\r\n \t\t\tnodes = filterNodes(nodes, selector);\r\n \t\t}\r\n \t\treturn $(nodes);\r\n \t};\r\n });\n\n $.fn.get = function (i) {\r\n \treturn i === undefined ? Array.from(this) : this[i >= 0 ? i : i + this.length];\r\n };\n\n // add and remove event handlers\r\n [\"on\", \"one\", \"off\"].forEach(name => {\r\n \t$.fn[name] = function (events, selector, data, callback) {\r\n \t\tlet i = this.length;\r\n\r\n \t\tevents = events.split(\" \");\r\n\r\n \t\t// sort out args\r\n \t\tif ($.isFunction(selector)) {\r\n \t\t\tcallback = selector;\r\n \t\t\tselector = null;\r\n \t\t} else if ($.isFunction(data)) {\r\n \t\t\tcallback = data;\r\n \t\t\tdata = null;\r\n \t\t}\r\n\r\n \t\t// attach event\r\n \t\twhile (i--) {\r\n \t\t\tlet e = events.length;\r\n\r\n \t\t\t// record the original function\r\n \t\t\tif (name !== \"off\") {\r\n \t\t\t\tif (!this[i].events) {\r\n \t\t\t\t\tthis[i].events = [];\r\n \t\t\t\t}\r\n \t\t\t\tlet fn = function (evt) { // delegate function\r\n \t\t\t\t\tlet target = [this];\r\n \t\t\t\t\tif (selector) {\r\n \t\t\t\t\t\tlet t = $(evt.target);\r\n \t\t\t\t\t\ttarget = t.add(t.parents()).filter(selector).get(); // is the selector in the targets parents?\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (target) {\r\n \t\t\t\t\t\tif (data) { // set data to event object\r\n \t\t\t\t\t\t\tevt.data = data;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tfor (let i = 0, len = target.length; i < len; i++) {\r\n \t\t\t\t\t\t\tif (callback.call(target[i], evt, evt.args) === false) {\r\n \t\t\t\t\t\t\t\tevt.preventDefault();\r\n \t\t\t\t\t\t\t\tevt.stopPropagation();\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t};\r\n \t\t\t\tthis[i].events.push({\r\n \t\t\t\t\tevents: events,\r\n \t\t\t\t\tcallback: callback,\r\n \t\t\t\t\tselector: selector,\r\n \t\t\t\t\tfunc: fn,\r\n \t\t\t\t\tonce: name === \"one\"\r\n \t\t\t\t});\r\n\r\n \t\t\t\t// trigger\r\n \t\t\t\twhile (e--) {\r\n \t\t\t\t\tthis[i].addEventListener(events[e], fn, {once: name === \"one\", capture: !!selector});\r\n \t\t\t\t}\r\n\r\n \t\t\t// find the original function\r\n \t\t\t} else if (this[i].events.length) {\r\n \t\t\t\twhile (e--) {\r\n \t\t\t\t\tthis[i].events.forEach((evt, n) => {\r\n \t\t\t\t\t\tconst index = evt.events.indexOf(events[e]);\r\n \t\t\t\t\t\tif (index !== -1 && evt.callback === callback && evt.selector === selector) {\r\n \t\t\t\t\t\t\tthis[i].removeEventListener(events[e], evt.func, {once: evt.once, capture: !!evt.selector}); // must pass same arguments\r\n \t\t\t\t\t\t\tthis[i].events[n].events.splice(index, 1);\r\n \t\t\t\t\t\t\tif (!this[i].events[n].events.length) {\r\n \t\t\t\t\t\t\t\tthis[i].events.splice(n, 1);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t});\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n var events = [\"focusin\", \"focusout\", \"focus\", \"blur\", \"resize\", \"scroll\", \"unload\", \"click\", \"dblclick\", \"mousedown\", \"mouseup\", \"mousemove\", \"mouseover\", \"mouseout\", \"mouseenter\", \"mouseleave\", \"contextmenu\", \"change\", \"select\", \"keydown\", \"keypress\", \"keyup\", \"error\", \"submit\"];\n\n $.fn.attr = function (prop, value) {\r\n \tlet isArr = $.isArray(prop),\r\n \t\ti,\r\n \t\tarr = {};\r\n\r\n \t// set properties\r\n \tif (isArr || value || value === null) {\r\n \t\ti = this.length;\r\n\r\n \t\t// normalise to array\r\n \t\tif (!isArr) {\r\n \t\t\tarr[prop] = value;\r\n \t\t\tprop = arr;\r\n \t\t}\r\n\r\n \t\twhile (i--) {\r\n \t\t\t$.each(prop, (key, val) => {\r\n \t\t\t\tif (events.indexOf(key) > -1) {\r\n \t\t\t\t\t$(this[i]).on(key, val);\r\n \t\t\t\t} else if (key === \"style\") {\r\n \t\t\t\t\tthis[i].style.cssText = val;\r\n \t\t\t\t} else if (key === \"class\") {\r\n \t\t\t\t\tthis[i].className = val;\r\n \t\t\t\t} else if (key === \"text\") {\r\n \t\t\t\t\tthis[i].textContent = val;\r\n \t\t\t\t} else if (value === null) {\r\n \t\t\t\t\tthis[i].removeAttribute(key);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis[i].setAttribute(key, val);\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// retrieve properties\r\n \t} else if (this[0]) {\r\n \t\tif (prop === \"style\") {\r\n \t\t\treturn this[0].style.cssText;\r\n \t\t}\r\n \t\tif (prop === \"class\") {\r\n \t\t\treturn this[0].className;\r\n \t\t}\r\n \t\treturn this[0].getAttribute(prop);\r\n \t}\r\n };\n\n [\"addClass\", \"removeClass\", \"toggleClass\"].forEach(name => {\r\n \t$.fn[name] = function (cls) {\r\n\r\n \t\t// remove \"Class\" from name for classList method\r\n \t\tlet func = name.substr(0, name.length - 5),\r\n \t\t\ti = this.length;\r\n\r\n \t\t// manage classes on nodes\r\n \t\twhile (i--) {\r\n \t\t\tlet arr = getVal(cls, this[i], i, this[i].className);\r\n \t\t\tif (typeof arr === \"string\") {\r\n \t\t\t\tarr = arr.split(\" \");\r\n \t\t\t}\r\n \t\t\tconst len = arr.length;\r\n \t\t\tfor (let n = 0; n < len; n++) {\r\n \t\t\t\tthis[i].classList[func](arr[n]);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n var dasherise = prop => prop.replace(/[A-Z]/g, (letter) => \"-\" + letter.toLowerCase());\n\n var setCss = (dabby, props, value) => {\r\n\r\n \t// set vars\r\n \tlet name = props,\r\n \t\tkeys,\r\n \t\tk,\r\n \t\tremove;\r\n\r\n \t// normalise props\r\n \tif (typeof props === \"string\") {\r\n \t\tprops = {};\r\n \t\tprops[name] = value;\r\n \t}\r\n\r\n \t// cache properties for loop\r\n \tkeys = Object.keys(props);\r\n \tk = keys.length;\r\n\r\n \t// set properties\r\n \twhile (k--) {\r\n \t\tlet i = dabby.length;\r\n \t\twhile (i--) {\r\n \t\t\tlet val = props[keys[k]] === \"\" ? undefined : getVal(props[keys[k]], dabby[i], k, dabby[i].style[keys[k]]);\r\n \t\t\tif (!isNaN(val)) {\r\n \t\t\t\tval += \"px\";\r\n \t\t\t}\r\n \t\t\tdabby[i].style[remove ? \"removeProperty\" : \"setProperty\"](dasherise(keys[k]), val);\r\n \t\t}\r\n \t}\r\n \treturn dabby;\r\n }\n\n $.fn.css = function (props, value) {\r\n\r\n \t// set the values\r\n \tif (value !== undefined || $.isPlainObject(props)) {\r\n \t\treturn setCss(this, props, value);\r\n\r\n \t// retrieve value from first property\r\n \t} else if (this[0]) {\r\n \t\tlet name = props,\r\n \t\t\ti,\r\n \t\t\tstyle = getComputedStyle(this[0], \"\"),\r\n \t\t\toutput = {},\r\n \t\t\tret = false;\r\n\r\n \t\tif (typeof name === \"string\") {\r\n \t\t\tprops = [name];\r\n \t\t\tret = true;\r\n \t\t}\r\n \t\ti = props.length;\r\n \t\twhile (i--) {\r\n \t\t\toutput[props[i]] = style.getPropertyValue(dasherise(props[i]));\r\n \t\t\tif (ret) {\r\n \t\t\t\treturn output[props[i]];\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn output;\r\n \t}\r\n };\n\n var camelise = prop => prop.replace(/-([a-z])/gi, (text, letter) => letter.toUpperCase());\n\n $.fn.data = function (name, data) {\r\n\r\n \t// convert data to object\r\n \tif (typeof name === \"object\") {\r\n \t\tdata = name;\r\n \t} else if (data !== undefined) {\r\n \t\tlet temp = {};\r\n \t\ttemp[name] = data;\r\n \t\tdata = temp;\r\n \t}\r\n\r\n \t// set value\r\n \tif (data !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\t$.each(data, (key, value) => {\r\n \t\t\t\tthis[i].dataset[camelise(key)] = typeof value === \"object\" ? JSON.stringify(value) : value;\r\n \t\t\t});\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get value\r\n \t} else if (this[0] && this[0].dataset) {\r\n \t\tlet parse = value => {\r\n \t\t\ttry {\r\n \t\t\t\treturn JSON.parse(value);\r\n \t\t\t} catch (e) {\r\n \t\t\t\treturn value;\r\n \t\t\t}\r\n \t\t};\r\n\r\n \t\t// all properties\r\n \t\tif (name === undefined) {\r\n \t\t\tlet arr = {};\r\n \t\t\t$.each(this[0].dataset, (key, value) => {\r\n \t\t\t\tarr[key] = parse(value);\r\n \t\t\t});\r\n \t\t\treturn arr;\r\n\r\n \t\t// retrieve specific property\r\n \t\t} else {\r\n \t\t\tname = camelise(name);\r\n \t\t\tif (this[0].dataset.hasOwnProperty(name)) {\r\n \t\t\t\treturn parse(this[0].dataset[name]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n };\n\n $.fn.hasClass = function (cls) {\r\n \tlet i = this.length;\r\n \twhile (i--) {\r\n \t\tif (this[i].classList.contains(cls)) {\r\n \t\t\treturn true;\r\n \t\t}\r\n \t}\r\n \treturn false;\r\n };\n\n var getProp = prop => {\r\n \tlet properties = {\r\n \t\t\"for\": \"htmlFor\",\r\n \t\t\"class\": \"className\",\r\n \t\t\"tabindex\": \"tabIndex\",\r\n \t\t\"readonly\": \"readOnly\",\r\n \t\t\"maxlength\": \"maxLength\",\r\n \t\t\"cellspacing\": \"cellSpacing\",\r\n \t\t\"cellpadding\": \"cellPadding\",\r\n \t\t\"rowspan\": \"rowSpan\",\r\n \t\t\"colspan\": \"colSpan\",\r\n \t\t\"usemap\": \"useMap\",\r\n \t\t\"frameborder\": \"frameBorder\",\r\n \t\t\"contenteditable\": \"contentEditable\"\r\n \t};\r\n \tprop = prop.toLowerCase();\r\n \treturn properties[prop] || prop;\r\n }\n\n $.fn.prop = function (prop, value) {\r\n \tprop = getProp(prop);\r\n\r\n \t// set\r\n \tif (value !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\tthis[i][prop] = getVal(value, this[i], i, this[i][prop]);\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get\r\n \t} else if (this[0]) {\r\n \t\treturn this[0][prop];\r\n \t}\r\n };\n\n $.fn.removeProp = function (prop) {\r\n \tif (this[0]) {\r\n \t\tlet i = this.length;\r\n \t\tprop = getProp(prop);\r\n\r\n \t\twhile (i--) {\r\n \t\t\tdelete this[i][prop];\r\n \t\t}\r\n \t\treturn this;\r\n \t}\r\n };\n\n $.fn.map = function (callback) {\r\n \tconst len = this.length;\r\n \tlet values = [],\r\n \t\ti = 0;\r\n\r\n \tfor (; i < len; i++) {\r\n \t\tvalues.push(callback.call(this[i], i, this[i]));\r\n \t}\r\n \treturn values;\r\n };\n\n $.fn.offset = function (coords) {\r\n \tconst doc = document.documentElement;\r\n \tlet rect,\r\n \t\ti = this.length,\r\n \t\tpos;\r\n\r\n \t// set\r\n \tif (coords) {\r\n \t\twhile (i--) {\r\n\r\n \t\t\t// if coords is callback, generate value\r\n \t\t\trect = this[i].getBoundingClientRect();\r\n \t\t\tlet itemCoords = Object.create(getVal(coords, this[i], i, $(this[i]).offset())); // copy the object\r\n\r\n \t\t\tif (itemCoords.top !== undefined && itemCoords.left !== undefined) {\r\n \t\t\t\tlet style = getComputedStyle(this[i]);\r\n \t\t\t\tpos = style.getPropertyValue(\"position\");\r\n\r\n \t\t\t\t// set position relative if static\r\n \t\t\t\tif (pos === \"static\") {\r\n \t\t\t\t\tthis[i].style.position = \"relative\";\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// add current offset\r\n \t\t\t\titemCoords.top += parseFloat(style.getPropertyValue(\"top\")) || 0;\r\n \t\t\t\titemCoords.left += parseFloat(style.getPropertyValue(\"left\")) || 0;\r\n\r\n \t\t\t\t// remove parent offset and viewport scroll\r\n \t\t\t\tif (pos !== \"fixed\") {\r\n \t\t\t\t\titemCoords.top -= doc.scrollTop + rect.top;\r\n \t\t\t\t\titemCoords.left -= doc.scrollLeft + rect.left;\r\n \t\t\t\t}\r\n\r\n \t\t\t\t// set offset\r\n \t\t\t\tthis[i].style.top = itemCoords.top + \"px\";\r\n \t\t\t\tthis[i].style.left = itemCoords.left + \"px\";\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get\r\n \t} else if (this[0]) {\r\n \t\tpos = this[0].style.position === \"fixed\";\r\n \t\trect = this[0].getBoundingClientRect();\r\n \t\treturn {\r\n \t\t\ttop: rect.top + (pos ? 0 : doc.scrollTop),\r\n \t\t\tleft: rect.left + (pos ? 0 : doc.scrollLeft)\r\n \t\t};\r\n \t}\r\n };\n\n $.fn.offsetParent = function () {\r\n \treturn $(this[0] ? this[0].offsetParent : null);\r\n };\n\n $.fn.position = function () {\r\n \tif (this[0]) {\r\n \t\treturn {left: this[0].offsetLeft, top: this[0].offsetTop};\r\n \t}\r\n };\n\n [\"scrollLeft\", \"scrollTop\"].forEach(item => {\r\n \t$.fn[item] = function (pos) {\r\n\r\n \t\t// set\r\n \t\tif (pos !== undefined) {\r\n \t\t\tlet i = this.length,\r\n \t\t\t\ttl = item.indexOf(\"Top\") > -1 ? \"top\" : \"left\";\r\n \t\t\twhile (i--) {\r\n \t\t\t\tlet val = getVal(pos, this, i, this[i][item]);\r\n \t\t\t\tif ($.isWindow(this[i])) {\r\n \t\t\t\t\tlet obj = {};\r\n \t\t\t\t\tobj[tl] = val;\r\n \t\t\t\t\tthis[i].scroll(obj);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis[i][item] = val;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn this;\r\n\r\n \t\t// get\r\n \t\t} else if (this[0]) {\r\n \t\t\tif ($.isWindow(this[0])) {\r\n \t\t\t\titem = item === \"scrollTop\" ? \"pageYOffset\" : \"pageXOffset\";\r\n \t\t\t}\r\n \t\t\treturn this[0][item];\r\n \t\t}\r\n \t};\r\n });\n\n [\"width\", \"height\", \"innerWidth\", \"innerHeight\", \"outerWidth\", \"outerHeight\"].forEach(dim => {\r\n\r\n \tconst getAdditionalLength = (obj, wh, props) => {\r\n \t\tconst style = getComputedStyle(obj);\r\n \t\tlet i = props.length,\r\n \t\t\tvalue = 0,\r\n \t\t\tsuffix;\r\n\r\n \t\twhile (i--) {\r\n \t\t\tsuffix = props[i] === \"border\" ? \"-width\" : \"\";\r\n \t\t\tvalue += parseFloat(style.getPropertyValue(props[i] + (wh === \"width\" ? \"-left\" : \"-top\") + suffix)) || 0;\r\n \t\t\tvalue += parseFloat(style.getPropertyValue(props[i] + (wh === \"width\" ? \"-right\" : \"-bottom\") + suffix)) || 0;\r\n \t\t}\r\n \t\treturn value;\r\n \t};\r\n\r\n \t$.fn[dim] = function (val) {\r\n \t\tconst valtype = typeof(val),\r\n \t\t\twh = dim.toLowerCase().indexOf(\"width\") > -1 ? \"width\" : \"height\", // width or height\r\n \t\t\tio = dim.indexOf(\"inner\") > -1 ? \"inner\" : (dim.indexOf(\"outer\") > -1 ? \"outer\" : \"\"); // inner outer or neither\r\n \t\tlet i = this.length,\r\n \t\t\tvalue,\r\n \t\t\twhu,\r\n \t\t\tprops,\r\n \t\t\tparam;\r\n\r\n \t\t// set value\r\n \t\tif (val !== undefined && valtype !== \"boolean\") {\r\n \t\t\twhile (i--) {\r\n\r\n \t\t\t\t// set base value\r\n \t\t\t\tvalue = getVal(val, this[i], i, this[i][dim]);\r\n \t\t\t\tif (!isNaN(val)) {\r\n \t\t\t\t\tvalue += \"px\";\r\n \t\t\t\t}\r\n \t\t\t\tthis[i].style[wh] = value; // set here so we can convert to px\r\n\r\n \t\t\t\t// add additional lengths\r\n \t\t\t\tif (io) {\r\n \t\t\t\t\tvalue = parseFloat(getComputedStyle(this[i]).getPropertyValue(wh));\r\n \t\t\t\t\tprops = [\"padding\"];\r\n \t\t\t\t\tif (io === \"outer\") {\r\n \t\t\t\t\t\tprops.push(\"border\");\r\n \t\t\t\t\t}\r\n \t\t\t\t\tvalue -= getAdditionalLength(this[i], wh, props);\r\n \t\t\t\t\tif (!isNaN(val)) {\r\n \t\t\t\t\t\tvalue += \"px\";\r\n \t\t\t\t\t}\r\n \t\t\t\t\tthis[i].style[wh] = value;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\treturn this;\r\n\r\n \t\t// get value\r\n \t\t} else if (this[0]) {\r\n \t\t\twhu = wh === \"width\" ? \"Width\" : \"Height\";\r\n\r\n \t\t\t// document\r\n \t\t\tif (this[0].nodeType === Node.DOCUMENT_NODE) {\r\n \t\t\t\treturn this[0].documentElement[\"scroll\" + whu];\r\n\r\n \t\t\t// element\r\n \t\t\t} else if (!$.isWindow(this[0])) {\r\n \t\t\t\tparam = io === \"outer\" ? \"offset\" : \"client\";\r\n \t\t\t\tvalue = this[0][param + whu];\r\n\r\n \t\t\t\t// add padding on, or if outer and margins requested, add margins on\r\n \t\t\t\tif (io === \"\" || (io === \"outer\" && val === true)) {\r\n \t\t\t\t\tvalue += getAdditionalLength(this[0], wh, [io ? \"margin\" : \"padding\"]) * (io ? 1 : -1); // add margin, minus padding\r\n \t\t\t\t}\r\n \t\t\t\treturn value;\r\n\r\n \t\t\t// window\r\n \t\t\t} else if (io === \"inner\") {\r\n \t\t\t\treturn this[0].document.documentElement[\"client\" + whu];\r\n \t\t\t} else {\r\n \t\t\t\treturn this[0][\"inner\" + whu];\r\n \t\t\t}\r\n \t\t}\r\n \t};\r\n });\n\n $.fn.trigger = function (name, data) {\r\n \tconst evt = new CustomEvent(name, {bubbles: true, cancelable: true});\r\n \tlet i = this.length;\r\n\r\n \t// copy extra data to event object\r\n \tif (data) {\r\n \t\tevt.args = data;\r\n \t}\r\n \twhile (i--) {\r\n \t\tthis[i].dispatchEvent(evt);\r\n \t\t/*if (this[i].dispatchEvent(evt) && this[i][name]) {\r\n \t\t\tthis[i][name]();\r\n \t\t}*/\r\n \t}\r\n \treturn this;\r\n };\n\n events.forEach(event => {\r\n \t$.fn[event] = function (data, callback) {\r\n \t\treturn data ? this.on(event, data, callback) : this.trigger(event);\r\n \t};\r\n });\n\n $.fn.clone = function () {\r\n \tlet nodes = [],\r\n \t\ti = this.length;\r\n\r\n \twhile (i--) {\r\n \t\tnodes[i] = this[i].cloneNode(true);\r\n \t}\r\n \treturn $(nodes);\r\n };\n\n $.fn.empty = function () {\r\n \tlet i = this.length;\r\n \twhile (i--) {\r\n \t\twhile (this[i].firstChild && this[i].removeChild(this[i].firstChild));\r\n \t}\r\n \treturn this;\r\n };\n\n $.fn.html = function (html) {\r\n\r\n \t// set\r\n \tif (html !== undefined) {\r\n \t\tlet i = this.length;\r\n \t\twhile (i--) {\r\n \t\t\tthis[i].innerHTML = getVal(html, this[i], i, this[i].innerHTML);\r\n \t\t}\r\n \t\treturn this;\r\n\r\n \t// get\r\n \t} else if (this[0]) {\r\n \t\treturn this[0].innerHTML;\r\n \t}\r\n };\n\n $.each({\r\n \tbefore: \"beforeBegin\",\r\n \tprepend: \"afterBegin\",\r\n \tappend: \"beforeEnd\",\r\n \tafter: \"afterEnd\"\r\n }, (name, pos) => {\r\n \t$.fn[name] = function (html) {\r\n \t\tconst pre = [\"before\", \"prepend\"].indexOf(name) > -1,\r\n \t\t\tisFunc = $.isFunction(html);\r\n \t\tlet i = this.length,\r\n \t\t\telems = $();\r\n\r\n \t\tif (!isFunc) { // multiple arguments containing nodes?\r\n \t\t\t$.each(arguments, (i, arg) => {\r\n \t\t\t\telems.add(arg);\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\twhile (i--) {\r\n \t\t\tif (isFunc) {\r\n \t\t\t\telems = $(getVal(html, this[i], i, this[i].innerHTML));\r\n \t\t\t}\r\n \t\t\tlet backwards = elems.length, // for counting down\r\n \t\t\t\tforwards = -1; // for counting up\r\n \t\t\twhile (pre ? backwards-- : ++forwards < backwards) { // insert forwards or backwards?\r\n \t\t\t\tlet obj = elems[pre ? backwards : forwards];\r\n\r\n \t\t\t\t// clone if i !== 0\r\n \t\t\t\tif (i) {\r\n \t\t\t\t\tobj = obj.cloneNode(true);\r\n \t\t\t\t}\r\n \t\t\t\tthis[i].insertAdjacentElement(pos, obj);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n $.each({\r\n \tinsertBefore: \"before\",\r\n \tprependTo: \"prepend\",\r\n \tappendTo: \"append\",\r\n \tinsertAfter: \"after\"\r\n }, (name, func) => {\r\n \t$.fn[name] = function (selector) {\r\n \t\tlet i = this.length,\r\n \t\t\tobj = $(selector);\r\n\r\n \t\twhile (i--) {\r\n \t\t\tobj[func](this[i]);\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n [\"remove\", \"detach\"].forEach(func => {\r\n \t$.fn[func] = function (selector) {\r\n \t\tlet i = this.length,\r\n \t\t\tnodes = [];\r\n\r\n \t\t// detach selected nodes\r\n \t\twhile (i--) {\r\n \t\t\tif (!selector || filterNodes(this[i], selector).length) {\r\n \t\t\t\tnodes.push(this[i].parentNode.removeChild(this[i]));\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// create a new dabby object to return\r\n \t\treturn func === \"detach\" ? $(nodes) : this;\r\n \t};\r\n });\n\n [\"replaceWith\", \"replaceAll\"].forEach(name => {\r\n \t$.fn[name] = function (html) {\r\n \t\tconst all = name === \"replaceAll\",\r\n \t\t\tsource = all ? $(html) : this;\r\n \t\tlet target = all ? this : html,\r\n \t\t\tisFunc = $.isFunction(target);\r\n\r\n \t\tif (!isFunc) {\r\n \t\t\ttarget = $(target);\r\n \t\t}\r\n\r\n \t\tlet i = source.length;\r\n\r\n \t\twhile (i--) {\r\n \t\t\tlet n = target.length,\r\n \t\t\t\tparent = source[i].parentNode;\r\n \t\t\twhile (n--) {\r\n \t\t\t\tconst replace = isFunc ? getVal(target[n], n, target[n]) : target[n];\r\n \t\t\t\tif (n) {\r\n \t\t\t\t\tsource[i].insertAdjacentElement(\"beforebegin\", replace.cloneNode(true));\r\n \t\t\t\t} else {\r\n \t\t\t\t\tsource[i] = parent.replaceChild(i ? replace.cloneNode(true) : replace, source[i]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn this;\r\n \t};\r\n });\n\n $.fn.slice = function (start, end) {\r\n \treturn $(this.get().slice(start, end));\r\n };\n\n $.fn.text = function (text) {\r\n \tconst get = text === undefined;\r\n \tlet len = this.length,\r\n \t\toutput = [],\r\n \t\ti = 0;\r\n \tfor (; i < len; i++) {\r\n \t\tif (get) {\r\n \t\t\toutput.push(this[i].textContent);\r\n \t\t} else {\r\n \t\t\tthis[i].textContent = getVal(text, this[i], i, this[i].textContent);\r\n \t\t}\r\n \t}\r\n \treturn get ? output.join(\" \") : this;\r\n };\n\n $.fn.unwrap = function (selector) {\r\n \tthis.parent(selector).not(\"body\").each((key, obj) => {\r\n \t\tconst parent = obj.parentNode;\r\n\r\n \t\t$(obj.children).each((i, node) => {\r\n \t\t\tparent.insertBefore(node, obj);\r\n \t\t});\r\n \t\tparent.removeChild(obj);\r\n \t});\r\n \treturn this;\r\n };\n\n $.fn.wrapAll = function (html) {\r\n \tif (this[0]) {\r\n\r\n \t\t// set variables\r\n \t\tlet len = this.length,\r\n \t\t\ti = 0,\r\n \t\t\tnode = $(getVal(html, this[0])).get(0).cloneNode(true);\r\n\r\n \t\t// insert clone into parent\r\n \t\tthis[0].parentNode.insertBefore(node, null);\r\n\r\n \t\t// find innermost child of node\r\n \t\twhile (node.firstElementChild) {\r\n \t\t\tnode = node.firstElementChild;\r\n \t\t}\r\n\r\n \t\t// attach nodes to the new node\r\n \t\tfor (; i < len; i++) {\r\n \t\t\tnode.appendChild(this[i]);\r\n \t\t}\r\n \t}\r\n \treturn this;\r\n };\n\n $.fn.wrap = function (html) {\r\n \tlet i = this.length;\r\n\r\n \twhile (i--) {\r\n \t\t$(this[i]).wrapAll(getVal(html, this[i], i));\r\n \t}\r\n \treturn this;\r\n };\n\n $.fn.children = function (selector) {\r\n \tlet nodes = [],\r\n \t\ti = this.length;\r\n\r\n \twhile (i--) {\r\n \t\tnodes = nodes.concat(Array.from(this[i].children));\r\n \t}\r\n\r\n \t// filter nodes by selector\r\n \tif (selector) {\r\n \t\tnodes = filterNodes(nodes, selector);\r\n \t}\r\n \treturn $(nodes);\r\n };\n\n $.fn.closest = function (selector, context) {\r\n \tlet i = this.length,\r\n \t\tnodes = [],\r\n \t\tparents,\r\n \t\tnode;\r\n\r\n \twhile (i--) {\r\n \t\tparents = [];\r\n \t\tnode = this[i];\r\n \t\twhile (node) {\r\n \t\t\tparents.push(node);\r\n \t\t\tnode = node.parentNode;\r\n \t\t}\r\n \t\tparents = filterNodes(parents, selector, context);\r\n \t\tif (parents[0]) {\r\n \t\t\tnodes.push(parents[0]);\r\n \t\t}\r\n \t}\r\n \treturn $(nodes);\r\n };\n\n $.fn.eq = function (i) {\r\n \tconst key = i < 0 ? i + this.length : i;\r\n \treturn $(this[key] || null);\r\n };\n\n $.fn.find = function (selector) {\r\n \treturn $(selector, this);\r\n };\n\n $.fn.first = function () {\r\n \treturn $(this[0]);\r\n };\n\n $.fn.has = function (selector) {\r\n \treturn $(this.get().filter(node => !!$(selector, node).length));\r\n };\n\n $.fn.index = function (selector) {\r\n \tlet index = -1;\r\n\r\n \tif (this[0]) {\r\n \t\tlet nodes,\r\n \t\t\tsubject = this[0],\r\n \t\t\ttype = typeof selector,\r\n \t\t\ti;\r\n\r\n \t\t// if no selector, match against first elements siblings\r\n \t\tif (type === \"undefined\") {\r\n \t\t\tnodes = this[0].parentNode.children;\r\n\r\n \t\t// if selector is string, match first node in current collection against resulting collection\r\n \t\t} else if (type === \"string\") {\r\n \t\t\tnodes = $(selector);\r\n\r\n \t\t// if element or collection match the element or first node against current collection\r\n \t\t} else {\r\n \t\t\tnodes = this;\r\n \t\t\tsubject = $(selector)[0];\r\n \t\t}\r\n\r\n \t\ti = nodes.length;\r\n \t\twhile (i--) {\r\n \t\t\tif (nodes[i] === subject) {\r\n \t\t\t\treturn i;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \treturn index;\r\n };\n\n $.fn.last = function () {\r\n \treturn this.eq(-1);\r\n };\n\n [\"next\", \"nextAll\", \"nextUntil\", \"prev\", \"prevAll\", \"prevUntil\"].forEach(func => {\r\n \t$.fn[func] = function (selector, filter) {\r\n \t\tconst next = func.indexOf(\"next\") > -1,\r\n \t\t\tall = func.indexOf(\"All\") > -1,\r\n \t\t\tuntil = func.indexOf(\"Until\") > -1,\r\n \t\t\tmethod = next ? \"nextElementSibling\" : \"previousElementSibling\";\r\n \t\tlet nodes = [],\r\n \t\t\ti = this.length,\r\n \t\t\tsibling;\r\n\r\n \t\t// look through each node and get siblings\r\n \t\twhile (i--) {\r\n \t\t\tsibling = this[i][method];\r\n \t\t\twhile (sibling) {\r\n \t\t\t\tnodes.push(sibling);\r\n \t\t\t\tif (all || (until && filterNodes(sibling, selector).length)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tsibling = sibling[method];\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\t// swap args for *Until methods\r\n \t\tif (until) {\r\n \t\t\tselector = filter;\r\n \t\t}\r\n\r\n \t\t// filter siblings by selector\r\n \t\tif (selector) {\r\n \t\t\tnodes = filterNodes(nodes, selector);\r\n \t\t}\r\n\r\n \t\t// return new collection\r\n \t\treturn $(nodes);\r\n \t};\r\n });\n\n $.fn.siblings = function (selector) {\r\n \tlet i = this.length,\r\n \t\tnodes = [];\r\n\r\n \twhile (i--) {\r\n \t\tArray.from(this[i].parentNode.children).forEach(child => {\r\n \t\t\tif (child !== this[i]) {\r\n \t\t\t\tnodes.push(child);\r\n \t\t\t}\r\n \t\t});\r\n \t}\r\n \treturn $(selector ? filterNodes(nodes, selector) : nodes);\r\n };\n\n // ajax\r\n // attributes\r\n // core\r\n // dimensions\r\n // events\r\n // manipulation\r\n // traversal\r\n // utilities\n\n return $;\n\n})));\n"],"file":"dabby.es5.js"} \ No newline at end of file diff --git a/dist/dabby.es5.min.js b/dist/dabby.es5.min.js index ff18453..56554a6 100644 --- a/dist/dabby.es5.min.js +++ b/dist/dabby.es5.min.js @@ -1,3 +1,3 @@ -/*! dabbyjs v0.9.5 by Will Earp - https://github.com/hexydec/dabby */ +/*! dabbyjs v0.9.6 by Will Earp - https://github.com/hexydec/dabby */ function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.$=e()}(this,function(){"use strict";if(Array.from||(Array.from=function(t,e,n){var r=[].slice.call(t);return"function"==typeof e&&(r=r.map(e,n)),r}),"function"!=typeof window.CustomEvent){var t=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n};t.prototype=window.Event.prototype,window.CustomEvent=t}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector),NodeList.prototype.forEach||(NodeList.prototype.forEach=function(t,e){e=e||window;for(var n=0;n<\/\1)>$/i))?(a.push(document.createElement(i[1])),r instanceof Object&&(o=e(a),e.each(r,function(t,e){o.attr(t,e)}))):((o=document.createElement("template")).innerHTML=n,a=o.content?o.content.children:o.children)}return this.length=0,Array.from(a).forEach(function(t){([1,9,11].indexOf(t.nodeType)>-1||e.isWindow(t))&&(s[s.length++]=t)}),this};e.fn=e.prototype,e.each=function(t,e){for(var n=Object.keys(t),r=n.length,i=0;i1?r-1:0),o=1;o-1;if(n.data&&(i="string"==typeof n.data||n.data instanceof FormData?n.data:e.param(n.data)),i&&"GET"===n.method&&(n.url+=(n.url.indexOf("?")>-1?"&":"?")+i),(n.cache||null===n.cache&&o)&&(n.url+=(n.url.indexOf("?")>-1?"&":"?")+"_="+ +new Date),!o&&!n.crossDomain){var s=n.xhr(),a=function(t,e){var r=t.responseText;if(["json",null,void 0].indexOf(n.dataType)>-1)try{r=JSON.parse(r)}catch(t){}[n.statusCode[t.status],n[e],n.complete].forEach(function(i){if(i){var o=[n.statusCode[t.status],n.success].indexOf(i)>-1;i.apply(n.context,o?[r,e,t]:[t,e])}})};return s.onload=function(){a(s,{200:"success",204:"nocontent",304:"notmodified"}[s.status]||"error")},s.ontimeout=function(){a(s,"timeout")},s.onabort=function(){a(s,"abort")},s.open(n.method,n.url,n.async,n.username,n.password),n.contentType&&(n.headers["Content-Type"]=n.contentType),e.each(n.headers,function(t,e){s.setRequestHeader(t,e)}),s.send("GET"===n.method?null:i),s}r=document.createElement("script"),n.scriptCharset&&(r.charset=n.scriptCharset),"jsonp"===n.dataType&&(n.url+=(n.url.indexOf("?")>-1?"&":"?")+n.jsonp+"="+n.jsonpCallback),e.each({load:"success",error:"error"},function(t,e){r.addEventListener(t,function(){var t="jsonp"===n.dataType?window[n.jsonpCallback]||null:null;[n[e],n.complete].forEach(function(r){r&&r.apply(n.context,r===n.complete?[null,e]:[t,e])})},{once:!0})}),r.src=n.url,r.async=n.async,document.head.appendChild(r)},["get","post"].forEach(function(t){e[t]=function(n,r,i,o){var s=e.isFunction(r),a="object"===_typeof(n)?n:{url:n,data:s?{}:r,success:s?r:i,dataType:s?i:o};return a.method=t.toUpperCase(),e.ajax(a)}}),e.getScript=function(t,n){return e.ajax({url:t,dataType:"script",success:n})};var n=function(t,n,r,i){var o,s=t.nodeType?[t]:Array.from(t);return"boolean"==typeof r&&(i=r,r=null),e.isFunction(n)?o=n:(n="string"==typeof n?[n]:Array.from(e(n,r)),o=function(t,e){for(var r=n.length;r--;)if("string"==typeof n[r]&&e.matches?e.matches(n[r]):e===n[r])return!0;return!1}),s.filter(function(t,e){return o.call(t,e,t)!==Boolean(i)},s)};["filter","not","is"].forEach(function(t){e.fn[t]=function(r){var i=n(this,r,"not"===t);return"is"===t?!!i.length:e(i)}}),e.fn.load=function(t,n,r){var i=this;if(this[0]){var o=(t=t.split(" ",2))[0],s=t[1];e.isFunction(n)&&(r=n,n=void 0),e.ajax(o,{data:n,type:n instanceof Object?"POST":"GET",success:function(t,n,o){var a="",f=i.length;for(s?e(t).filter(s).each(function(t,e){a+=e.outerHTML}):a=t;f--;)i[f].innerHTML=a,r&&r.call(i[f],t,n,o)}})}return this};var r=function(t,n,r,i){return e.isFunction(t)&&(t=t.call(n,r,e.isFunction(i)?i():i)),t};e.map=function(t,e){for(var n,r=Object.keys(t),i=r.length,o=[],s=0;s-1&&o.push(n);return o},e.fn.val=function(t){var n=this;if(void 0!==t){var i=function(){for(var i=n.length,o=function(){var o=r(t,n[i],i,function(){return e(n[i]).val()});n[i].multiple?(o=e.map(e.isArray(o)?o:[o],function(t){return String(t)}),e("option",n[i]).each(function(t,e){e.selected=o.indexOf(String(e.value))>-1})):n[i].value=String(o)};i--;)o();return{v:n}}();if("object"===_typeof(i))return i.v}else if(this[0]){if(this[0].multiple){var o=[];return e("option",this[0]).each(function(t,e){e.selected&&o.push(String(e.value))}),o}if("radio"===this[0].type){var s=this.filter("[name='"+this[0].name+"']:checked")[0];return s?String(s.value):void 0}if("checkbox"!==this[0].type||this[0].checked)return String(this[0].value)}},e.fn.serialize=function(){var t="input[name]:not([type=file]):not([type=submit]),textarea[name],select[name]",n={};return(this.is(t)?this.filter(t):e(t,this)).each(function(t,r){var i=e(r).val();r.disabled||void 0===i||(n=function t(n,r,i){var o;null!==(o=n.match(/([^\[]*)\[([^\]]*)\](.*)/))&&(n=o[1],r=t(o[2]+o[3],r,i[n]||{}));return""!==n?i[n]=r:(e.isArray(i)||(i=[]),i=i.concat(e.isArray(r)?r:[r])),i}(r.getAttribute("name"),i,n))}),e.param(n)},e.fn.add=function(t,n){t=e(t,n);var r=this.length,i=t.length;for(this.length+=i;i--;)this[i+r]=t[i];return this},["parent","parents","parentsUntil"].forEach(function(t){e.fn[t]=function(r,i){for(var o,s=t.indexOf("s")>-1,a=t.indexOf("U")>-1,f=[],c=this.length;c--;)for(o=this[c].parentNode;o&&o.nodeType===Node.ELEMENT_NODE&&(f.push(o),!(!s||a&&n(o,r).length));)o=o.parentNode;return r&&(f=n(f,r)),e(f)}}),e.fn.get=function(t){return void 0===t?Array.from(this):this[t>=0?t:t+this.length]},["on","one","off"].forEach(function(t){e.fn[t]=function(n,r,i,o){var s=this,a=this.length;n=n.split(" "),e.isFunction(r)?(o=r,r=null):e.isFunction(i)&&(o=i,i=null);for(var f=function(){var f=n.length;if("off"!==t){s[a].events||(s[a].events=[]);var c=function(t){var n=[this];if(r){var s=e(t.target);n=s.add(s.parents()).filter(r).get()}if(n){i&&(t.data=i);for(var a=0,f=n.length;a-1?e(o[r]).on(t,s):"style"===t?o[r].style.cssText=s:"class"===t?o[r].className=s:"text"===t?o[r].textContent=s:null===n?o[r].removeAttribute(t):o[r].setAttribute(t,s)});return this}if(this[0])return"style"===t?this[0].style.cssText:"class"===t?this[0].className:this[0].getAttribute(t)},["addClass","removeClass","toggleClass"].forEach(function(t){e.fn[t]=function(e){for(var n=t.substr(0,t.length-5),i=this.length;i--;){var o=r(e,this[i],i,this[i].className);"string"==typeof o&&(o=o.split(" "));for(var s=o.length,a=0;a-1?"top":"left";i--;){var s=r(n,this,i,this[i][t]);if(e.isWindow(this[i])){var a={};a[o]=s,this[i].scroll(a)}else this[i][t]=s}return this}if(this[0])return e.isWindow(this[0])&&(t="scrollTop"===t?"pageYOffset":"pageXOffset"),this[0][t]}}),["width","height","innerWidth","innerHeight","outerWidth","outerHeight"].forEach(function(t){var n=function(t,e,n){for(var r,i=getComputedStyle(t),o=n.length,s=0;o--;)r="border"===n[o]?"-width":"",s+=parseFloat(i.getPropertyValue(n[o]+("width"===e?"-left":"-top")+r))||0,s+=parseFloat(i.getPropertyValue(n[o]+("width"===e?"-right":"-bottom")+r))||0;return s};e.fn[t]=function(i){var o,s,a,f,c=_typeof(i),l=t.toLowerCase().indexOf("width")>-1?"width":"height",u=t.indexOf("inner")>-1?"inner":t.indexOf("outer")>-1?"outer":"",h=this.length;if(void 0!==i&&"boolean"!==c){for(;h--;)o=r(i,this[h],h,this[h][t]),isNaN(i)||(o+="px"),this[h].style[l]=o,u&&(o=parseFloat(getComputedStyle(this[h]).getPropertyValue(l)),a=["padding"],"outer"===u&&a.push("border"),o-=n(this[h],l,a),isNaN(i)||(o+="px"),this[h].style[l]=o);return this}if(this[0])return s="width"===l?"Width":"Height",this[0].nodeType===Node.DOCUMENT_NODE?this[0].documentElement["scroll"+s]:e.isWindow(this[0])?"inner"===u?this[0].document.documentElement["client"+s]:this[0]["inner"+s]:(f="outer"===u?"offset":"client",o=this[0][f+s],(""===u||"outer"===u&&!0===i)&&(o+=n(this[0],l,[u?"margin":"padding"])*(u?1:-1)),o)}}),e.fn.trigger=function(t,e){var n=new CustomEvent(t,{bubbles:!0,cancelable:!0}),r=this.length;for(e&&(n.args=e);r--;)this[r].dispatchEvent(n);return this},i.forEach(function(t){e.fn[t]=function(e,n){return e?this.on(t,e,n):this.trigger(t)}}),e.fn.clone=function(){for(var t=[],n=this.length;n--;)t[n]=this[n].cloneNode(!0);return e(t)},e.fn.empty=function(){for(var t=this.length;t--;)for(;this[t].firstChild&&this[t].removeChild(this[t].firstChild););return this},e.fn.html=function(t){if(void 0!==t){for(var e=this.length;e--;)this[e].innerHTML=r(t,this[e],e,this[e].innerHTML);return this}if(this[0])return this[0].innerHTML},e.each({before:"beforeBegin",prepend:"afterBegin",append:"beforeEnd",after:"afterEnd"},function(t,n){e.fn[t]=function(i){var o=["before","prepend"].indexOf(t)>-1,s=e.isFunction(i),a=this.length,f=e();for(s||e.each(arguments,function(t,e){f.add(e)});a--;){s&&(f=e(r(i,this[a],a,this[a].innerHTML)));for(var c=f.length,l=-1;o?c--:++l-1,a=t.indexOf("All")>-1,f=t.indexOf("Until")>-1,c=s?"nextElementSibling":"previousElementSibling",l=[],u=this.length;u--;)for(o=this[u][c];o&&(l.push(o),!(a||f&&n(o,r).length));)o=o[c];return f&&(r=i),r&&(l=n(l,r)),e(l)}}),e.fn.siblings=function(t){for(var r=this,i=this.length,o=[];i--;)Array.from(this[i].parentNode.children).forEach(function(t){t!==r[i]&&o.push(t)});return e(t?n(o,t):o)},e}); \ No newline at end of file diff --git a/dist/dabby.js b/dist/dabby.js index 6d10bfa..3fb5af9 100644 --- a/dist/dabby.js +++ b/dist/dabby.js @@ -1,4 +1,4 @@ -/*! dabbyjs v0.9.5 by Will Earp - https://github.com/hexydec/dabby */ +/*! dabbyjs v0.9.6 by Will Earp - https://github.com/hexydec/dabby */ const $ = function dabby(selector, context) { let nodes = [], diff --git a/package.json b/package.json index 45a7aa5..965ccd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dabbyjs", - "version": "0.9.5", + "version": "0.9.6", "homepage": "https://hexydec.github.io/dabby", "author": "Will Earp ", "description": "A lightweight modular jQuery clone library built for modern browsers", @@ -26,8 +26,6 @@ "devDependencies": { "@babel/core": "^7.1.0", "@babel/preset-env": "^7.1.0", - "@comandeer/babel-plugin-banner": "^4.0.0", - "babel-plugin-uglify": "^1.0.2", "babel-preset-minify": "^0.4.3", "grunt": "^1.0.3", "grunt-babel": "^8.0.0", @@ -37,9 +35,7 @@ "grunt-rollup": "^9.0.0", "load-grunt-tasks": "^3.5.2", "qunitjs": "^2.4.1", - "rollup": "^0.66.1", - "rollup-plugin-babel": "^4.0.3", - "rollup-plugin-uglify": "^6.0.0" + "rollup": "^0.66.1" }, "repository": { "type": "git",