diff --git a/bower.json b/bower.json
index be47d97901e..6f0eee8fbff 100644
--- a/bower.json
+++ b/bower.json
@@ -13,11 +13,12 @@
"tests"
],
"dependencies": {
- "jquery": "~2.2.4",
+ "jquery": "~3.1.0",
"angular": "~1.5.9",
"angular-route": "~1.5.9",
"angular-mocks": "~1.5.9",
"angular-sanitize": "~1.5.9",
+ "angular-native-dragdrop": "~1.2.2",
"angular-bindonce": "~0.3.3"
}
}
diff --git a/public/vendor/angular-native-dragdrop/.bower.json b/public/vendor/angular-native-dragdrop/.bower.json
new file mode 100644
index 00000000000..337c894a30e
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/.bower.json
@@ -0,0 +1,36 @@
+{
+ "name": "angular-native-dragdrop",
+ "version": "1.2.2",
+ "homepage": "http://angular-dragdrop.github.io/angular-dragdrop",
+ "authors": [
+ "ganarajpr"
+ ],
+ "description": "Angular HTML5 Drag and Drop directive written in pure with no dependency on JQuery.",
+ "main": "draganddrop.js",
+ "keywords": [
+ "angular",
+ "drag",
+ "drop",
+ "html5"
+ ],
+ "dependencies": {
+ "angular": "^1.3"
+ },
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "_release": "1.2.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "1.2.2",
+ "commit": "e630636fdc39fef815c1c534340aa16caf76a04c"
+ },
+ "_source": "https://github.com/angular-dragdrop/angular-dragdrop.git",
+ "_target": "~1.2.2",
+ "_originalSource": "angular-native-dragdrop"
+}
\ No newline at end of file
diff --git a/public/vendor/angular-native-dragdrop/Gulpfile.js b/public/vendor/angular-native-dragdrop/Gulpfile.js
new file mode 100644
index 00000000000..51f0f72c484
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/Gulpfile.js
@@ -0,0 +1,25 @@
+/* jshint -W097 */
+'use strict';
+
+/* global require */
+var jshint = require('gulp-jshint');
+var stylish = require('jshint-stylish');
+var uglify = require('gulp-uglify');
+var rename = require('gulp-rename');
+var gulp = require('gulp');
+
+gulp.task('lint', function() {
+ return gulp.src('./draganddrop.js')
+ .pipe(jshint())
+ .pipe(jshint.reporter(stylish));
+});
+gulp.task('compress', function() {
+ return gulp.src('./draganddrop.js')
+ .pipe(uglify())
+ .pipe(rename({
+ extname: '.min.js'
+ }))
+ .pipe(gulp.dest('./'));
+});
+
+gulp.task('default', ['lint', 'compress']);
diff --git a/public/vendor/angular-native-dragdrop/LICENSE b/public/vendor/angular-native-dragdrop/LICENSE
new file mode 100644
index 00000000000..d239cb9e0d3
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/LICENSE
@@ -0,0 +1,10 @@
+
+The MIT License
+
+Copyright (c) 2015 Ganaraj P R, [Nebithi](http://www.nebithi.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/public/vendor/angular-native-dragdrop/bower.json b/public/vendor/angular-native-dragdrop/bower.json
new file mode 100644
index 00000000000..7bcd7bca24a
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/bower.json
@@ -0,0 +1,27 @@
+{
+ "name": "angular-native-dragdrop",
+ "version": "1.2.1",
+ "homepage": "http://angular-dragdrop.github.io/angular-dragdrop",
+ "authors": [
+ "ganarajpr"
+ ],
+ "description": "Angular HTML5 Drag and Drop directive written in pure with no dependency on JQuery.",
+ "main": "draganddrop.js",
+ "keywords": [
+ "angular",
+ "drag",
+ "drop",
+ "html5"
+ ],
+ "dependencies": {
+ "angular": "^1.3"
+ },
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/public/vendor/angular-native-dragdrop/demo/css/styles.css b/public/vendor/angular-native-dragdrop/demo/css/styles.css
new file mode 100644
index 00000000000..4dd18383697
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/demo/css/styles.css
@@ -0,0 +1,29 @@
+body {
+ background-color: #f8f7f8;
+}
+
+.heading {
+ border-bottom: 1px solid #b7b7b7;
+ padding-bottom: 10px;
+ margin-bottom: 10px;
+}
+
+.topRow {
+ margin-bottom: 30px;
+}
+
+.on-drag-enter {
+ background-color : #677ba6;
+}
+
+.on-drag-enter-custom {
+ background-color : #d78cc7;
+}
+
+.on-drag-hover {
+ background-color : #3eb352;
+}
+
+.on-drag-hover-custom {
+ background-color : #d7a931;
+}
\ No newline at end of file
diff --git a/public/vendor/angular-native-dragdrop/demo/index.html b/public/vendor/angular-native-dragdrop/demo/index.html
new file mode 100644
index 00000000000..a2ec1028ef8
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/demo/index.html
@@ -0,0 +1,178 @@
+
+
+
+
+
+ Angular DragDrop (Demo)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Drag and drop between the two lists.
+
+
+
+
Beasts
+
+
Left column of beasts is not draggable and accepts both beasts and priests
+
+
+
+
+
+
+
+ {{man}}
+
+
+
+
+
+
+ {{woman}}
+
+
+
+
+
+
+
+
Priests
+
+
+
+
+
+
+
+ {{man}}
+
+
+
+
+
+
+ {{woman}}
+
+
+
+
+
+
+
+
Terrorists
+
+
Each terrorist list item accepts a new terrorist. Shows inserting into a particular
+ position in an array.
+
+
+
+
+
+
+
+
+ {{man}}
+
+
+
+
+
+
+ {{woman}}
+
+
+
+
+
+
+
+
Custom Drag Image
+
+
You may specify a drag-image-element-id to use as the drag image. You can use the
+ ghost image
+ technique for the custom drag image.
+
+
+
+
+
+
+
+
+ {{man}}
+
+
+
+
+
+
+ {{woman}}
+
+
+
+
+
+
Custom drag image #1
+
Custom drag image #2
+
+
+
+
+
diff --git a/public/vendor/angular-native-dragdrop/demo/js/app.js b/public/vendor/angular-native-dragdrop/demo/js/app.js
new file mode 100644
index 00000000000..e839e205c82
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/demo/js/app.js
@@ -0,0 +1,54 @@
+angular.module('app', [
+ 'hljs',
+ 'ang-drag-drop'
+]).controller('MainCtrl', function($scope) {
+ $scope.men = [
+ 'John',
+ 'Jack',
+ 'Mark',
+ 'Ernie',
+ 'Mike (Locked)'
+ ];
+
+
+ $scope.women = [
+ 'Jane',
+ 'Jill',
+ 'Betty',
+ 'Mary'
+ ];
+
+ $scope.addText = '';
+
+ $scope.dropValidateHandler = function($drop, $event, $data) {
+ if ($data === 'Mike (Locked)') {
+ return false;
+ }
+ if ($drop.element[0] === $event.srcElement.parentNode) {
+ // Don't allow moving to same container
+ return false;
+ }
+ return true;
+ };
+
+ $scope.dropSuccessHandler = function($event, index, array) {
+ array.splice(index, 1);
+ };
+
+ $scope.dropFailureHandler = function($event, index, array) {
+ alert(array[index] + ' could be dropped into left list!')
+ };
+
+ $scope.onDrop = function($event, $data, array, index) {
+ if (index !== undefined) {
+ array.splice(index, 0, $data);
+ } else {
+ array.push($data);
+ }
+ };
+
+ $scope.getCustomDragElementId = function (index) {
+ return 'customDrag' + (index % 2);
+ }
+
+});
diff --git a/public/vendor/angular-native-dragdrop/docs/examples.md b/public/vendor/angular-native-dragdrop/docs/examples.md
new file mode 100644
index 00000000000..5530a7601ee
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/docs/examples.md
@@ -0,0 +1,8 @@
+#Examples
+
+##Simple Usage
+
+
+
+##With drop validation
+
\ No newline at end of file
diff --git a/public/vendor/angular-native-dragdrop/docs/getting-started.md b/public/vendor/angular-native-dragdrop/docs/getting-started.md
new file mode 100644
index 00000000000..2fd3f5b353e
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/docs/getting-started.md
@@ -0,0 +1,26 @@
+#Installation
+
+##Download
+Download the file [**draganddrop.min.js**](https://raw.githubusercontent.com/angular-dragdrop/angular-dragdrop/master/draganddrop.min.js) or [**draganddrop.js**](https://raw.githubusercontent.com/angular-dragdrop/angular-dragdrop/master/draganddrop.js).
+
+##Bower
+
+You can also install via Bower using
+
+`bower install angular-native-dragdrop --save`
+
+---
+
+#Usage
+
+##Step - 1 **Add script**
+```
+
+```
+
+##Step - 2 **Include in app**
+```
+ myApp = angular.module('myApp','ang-drag-drop');
+```
+
+##Step - 3 ***Profit!!***
diff --git a/public/vendor/angular-native-dragdrop/docs/index.md b/public/vendor/angular-native-dragdrop/docs/index.md
new file mode 100644
index 00000000000..b5370fc23b5
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/docs/index.md
@@ -0,0 +1,120 @@
+# Angular Drag and Drop
+**A Native ( without jquery ) Drag and Drop directive for AngularJS using HTML5 Drag and Drop**
+
+---
+
+##ui-draggable(expression)
+
+Directive in module ang-drag-drop (since 1.0.5 - old module name ngDragDrop)
+
+The ui-draggable attribute tells Angular that the element is draggable. ui-draggable takes an expression as the attribute value. The expression should evaluate to either true or false. You can toggle the draggability of an element using this expression.
+
+###Additional Attributes
+
+####_**drag**_(variable)
+
+The class used to mark child elements of draggable object to be used as drag handle. Default class name is `drag-handle`
+
+**NOTE**: If attribute is not present drag handle feature is not active.
+
+
+
+####_**drag-handle-class**_(string)
+
+The `drag` property is used to assign the data that needs to be passed along with the dragging element.
+
+
+
+
+####_**on-drop-success**_(function)
+
+The `on-drop-success` attribute takes a function. We can consider this to be an on-drop-success handler function. This can be useful if you need to do some post processing after the dragged element is dropped successfully on the drop site.
+
+**NOTE**: This callback function is only called when the drop succeeds.
+You can request the `drag-end` event ( very similiar to requesting the click event in `ng-click` ) by passing `$event` in the event handler.
+
+
+
+####_**on-drop-failure**_(function)
+
+The `on-drop-failure` attribute takes a function. We can consider this to be an on-drop-failure handler function. This can be useful if you need to do some post processing after the dragged element is dropped unsuccessfully on any drop site.
+
+**NOTE**: This callback function is only called when the drop fails.
+You can request the `drag-end` event ( very similiar to requesting the click event in `ng-click` ) by passing `$event` in the event handler.
+
+
+
+####_**drag-channel**_(string)
+
+The `on-drop-failure` attribute takes a function. We can consider this to be an on-drop-failure handler function. This can be useful if you need to do some post processing after the dragged element is dropped unsuccessfully on any drop site.
+
+**NOTE**: This callback function is only called when the drop fails.
+You can request the `drag-end` event ( very similiar to requesting the click event in `ng-click` ) by passing `$event` in the event handler.
+
+
+
+###Usage
+
+
+
+###Events
+
+On start of dragging an Angular Event `ANGULAR_DRAG_START` is dispatched from the `$rootScope`. The event also carries carries the information about the channel in which the dragging has started.
+
+On end of dragging an Angular Event `ANGULAR_DRAG_END` is dispatched from the `$rootScope`. The event also carries carries the information about the channel in which the dragging has started.
+
+When hovering a draggable element on top of a drop area an Angular Event `ANGULAR_HOVER` is dispatched from the `$rootScope`. The event also carries the information about the channel in which the dragging has started.
+
+---
+
+##ui-on-drop(expression)
+
+Directive in module ang-drag-drop (since 1.0.5 - old module name ngDragDrop)
+
+The `ui-on-drop` attribute tells Angular that the element is a drop site. `ui-on-drop` takes a function as the attribute value. The function will be called when a valid dragged element is dropped in that location. A valid dragged element is one which has the same channel as the drop location.
+
+**NOTE** : This callback function is only called when the drop succeeds.
+The `ui-on-drop` callback can request additional parameters. The data that is dragged is available to the callback as $data and its channel as `$channel`. Apart from this the drop event is exposed as `$event`.
+
+###Additional Attributes
+
+####_**drop-channel**_(variable)
+
+The channel that the drop site accepts. The dragged element should have the same channel as this drop site for it to be droppable at this location. It is possible to provide comma separated list of channels.
+
+**NOTE**: Also special value of `drag-channel` attribute is available to accept dragged element with any channel value — *
+
+
+
+####_**drop-validate**_(function)
+
+Extra validation that makes sure that the drop site accepts the dragged element beyond having the same channel. If not defined, no extra validation is made.
+
+**NOTE**: This callback function is called only if the channel condition is met, when the element starts being dragged
+
+
+
+
+####_**drag-enter-class**_(string)
+
+The class that will be added to the the droppable element when a dragged element ( which is droppable ) enters the drop location. The default value for this is `on-drag-enter`
+
+
+
+####_**drag-hover-class**_(string)
+
+The class that will be added to the drop area element when hovering with an element. The default value for this is `on-drag-hover`
+
+
+
+###Usage
+
+
+
+###Events
+
+On start of dragging an Angular Event `ANGULAR_DRAG_START` is dispatched from the `$rootScope`. The event also carries carries the information about the channel in which the dragging has started.
+
+On end of dragging an Angular Event `ANGULAR_DRAG_END` is dispatched from the `$rootScope`. The event also carries carries the information about the channel in which the dragging has started.
+
+When hovering a draggable element on top of a drop area an Angular Event `ANGULAR_HOVER` is dispatched from the `$rootScope`. The event also carries the information about the channel in which the dragging has started.
\ No newline at end of file
diff --git a/public/vendor/angular-native-dragdrop/draganddrop.js b/public/vendor/angular-native-dragdrop/draganddrop.js
index 089c8f0e7f9..f1866c8374b 100755
--- a/public/vendor/angular-native-dragdrop/draganddrop.js
+++ b/public/vendor/angular-native-dragdrop/draganddrop.js
@@ -6,8 +6,12 @@
}
function determineEffectAllowed(e) {
+ if(e.originalEvent) {
+ e.dataTransfer = e.originalEvent.dataTransfer;
+ }
+
// Chrome doesn't set dropEffect, so we have to work it out ourselves
- if (e.dataTransfer && e.dataTransfer.dropEffect === 'none') {
+ if (typeof e.dataTransfer !== 'undefined' && e.dataTransfer.dropEffect === 'none') {
if (e.dataTransfer.effectAllowed === 'copy' ||
e.dataTransfer.effectAllowed === 'move') {
e.dataTransfer.dropEffect = e.dataTransfer.effectAllowed;
@@ -22,10 +26,6 @@
return;
}
- if (window.jQuery && (-1 === window.jQuery.event.props.indexOf('dataTransfer'))) {
- window.jQuery.event.props.push('dataTransfer');
- }
-
var module = angular.module('ang-drag-drop', []);
module.directive('uiDraggable', ['$parse', '$rootScope', '$dragImage', function($parse, $rootScope, $dragImage) {
@@ -61,6 +61,10 @@
}
function dragendHandler(e) {
+ if(e.originalEvent) {
+ e.dataTransfer = e.originalEvent.dataTransfer;
+ }
+
setTimeout(function() {
element.unbind('$destroy', dragendHandler);
}, 0);
@@ -75,25 +79,52 @@
scope.$evalAsync(function() {
onDropSuccessFn(scope, {$event: e});
});
- } else {
- if (attrs.onDropFailure) {
- var onDropFailureFn = $parse(attrs.onDropFailure);
- scope.$evalAsync(function() {
- onDropFailureFn(scope, {$event: e});
- });
- }
+ }
+ }else if (e.dataTransfer && e.dataTransfer.dropEffect === 'none'){
+ if (attrs.onDropFailure) {
+ var onDropFailureFn = $parse(attrs.onDropFailure);
+ scope.$evalAsync(function() {
+ onDropFailureFn(scope, {$event: e});
+ });
}
}
element.removeClass(draggingClass);
}
- function dragstartHandler(e) {
- var isDragAllowed = !isDragHandleUsed || dragTarget.classList.contains(dragHandleClass);
+ function setDragElement(e, dragImageElementId) {
+ var dragImageElementFn;
- if (dragTarget.classList.contains("resize-panel-handle")) {
- return;
+ if(e.originalEvent) {
+ e.dataTransfer = e.originalEvent.dataTransfer;
}
+ dragImageElementFn = $parse(dragImageElementId);
+
+ scope.$apply(function() {
+ var elementId = dragImageElementFn(scope, {$event: e}),
+ dragElement;
+
+ if (!(elementId && angular.isString(elementId))) {
+ return;
+ }
+
+ dragElement = document.getElementById(elementId);
+
+ if (!dragElement) {
+ return;
+ }
+
+ e.dataTransfer.setDragImage(dragElement, 0, 0);
+ });
+ }
+
+ function dragstartHandler(e) {
+ if(e.originalEvent) {
+ e.dataTransfer = e.originalEvent.dataTransfer;
+ }
+
+ var isDragAllowed = !isDragHandleUsed || dragTarget.classList.contains(dragHandleClass);
+
if (isDragAllowed) {
var sendChannel = attrs.dragChannel || 'defaultchannel';
var dragData = '';
@@ -125,9 +156,12 @@
}
}
});
+ } else if (attrs.dragImageElementId) {
+ setDragElement(e, attrs.dragImageElementId);
}
- var transferDataObject = {data: dragData, channel: sendChannel}
+ var offset = {x: e.offsetX, y: e.offsetY};
+ var transferDataObject = {data: dragData, channel: sendChannel, offset: offset};
var transferDataText = angular.toJson(transferDataObject);
e.dataTransfer.setData('text', transferDataText);
@@ -153,6 +187,26 @@
var customDragEnterEvent = $parse(attr.onDragEnter);
var customDragLeaveEvent = $parse(attr.onDragLeave);
+ function calculateDropOffset(e) {
+ var offset = {
+ x: e.offsetX,
+ y: e.offsetY
+ };
+ var target = e.target;
+
+ while (target !== element[0]) {
+ offset.x = offset.x + target.offsetLeft;
+ offset.y = offset.y + target.offsetTop;
+
+ target = target.offsetParent;
+ if (!target) {
+ return null;
+ }
+ }
+
+ return offset;
+ }
+
function onDragOver(e) {
if (e.preventDefault) {
e.preventDefault(); // Necessary. Allows us to drop.
@@ -221,6 +275,10 @@
}
function onDrop(e) {
+ if(e.originalEvent) {
+ e.dataTransfer = e.originalEvent.dataTransfer;
+ }
+
if (e.preventDefault) {
e.preventDefault(); // Necessary. Allows us to drop.
}
@@ -231,11 +289,18 @@
var sendData = e.dataTransfer.getData('text');
sendData = angular.fromJson(sendData);
+ var dropOffset = calculateDropOffset(e);
+
+ var position = dropOffset ? {
+ x: dropOffset.x - sendData.offset.x,
+ y: dropOffset.y - sendData.offset.y
+ } : null;
+
determineEffectAllowed(e);
var uiOnDropFn = $parse(attr.uiOnDrop);
scope.$evalAsync(function() {
- uiOnDropFn(scope, {$data: sendData.data, $event: e, $channel: sendData.channel});
+ uiOnDropFn(scope, {$data: sendData.data, $event: e, $channel: sendData.channel, $position: position});
});
element.removeClass(dragEnterClass);
dragging = 0;
@@ -252,6 +317,10 @@
}
function preventNativeDnD(e) {
+ if(e.originalEvent) {
+ e.dataTransfer = e.originalEvent.dataTransfer;
+ }
+
if (e.preventDefault) {
e.preventDefault();
}
@@ -300,7 +369,7 @@
});
- var deregisterDragEnd = $rootScope.$on('ANGULAR_DRAG_END', function(_, e, channel) {
+ var deregisterDragEnd = $rootScope.$on('ANGULAR_DRAG_END', function() {
element.unbind('dragover', onDragOver);
element.unbind('dragenter', onDragEnter);
element.unbind('dragleave', onDragLeave);
diff --git a/public/vendor/angular-native-dragdrop/draganddrop.min.js b/public/vendor/angular-native-dragdrop/draganddrop.min.js
new file mode 100755
index 00000000000..3ae7432907c
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/draganddrop.min.js
@@ -0,0 +1 @@
+!function(e){"use strict";function a(){return"ondrag"in document.createElement("a")}function n(e){e.originalEvent&&(e.dataTransfer=e.originalEvent.dataTransfer),"undefined"!=typeof e.dataTransfer&&"none"===e.dataTransfer.dropEffect&&("copy"===e.dataTransfer.effectAllowed||"move"===e.dataTransfer.effectAllowed?e.dataTransfer.dropEffect=e.dataTransfer.effectAllowed:"copyMove"!==e.dataTransfer.effectAllowed&&"copymove"!==e.dataTransfer.effectAllowed||(e.dataTransfer.dropEffect=e.ctrlKey?"copy":"move"))}if(!a())return void e.module("ang-drag-drop",[]);var r=e.module("ang-drag-drop",[]);r.directive("uiDraggable",["$parse","$rootScope","$dragImage",function(a,r,t){return function(o,d,f){function i(e){e.originalEvent&&(e.dataTransfer=e.originalEvent.dataTransfer),setTimeout(function(){d.unbind("$destroy",i)},0);var t=f.dragChannel||"defaultchannel";if(r.$broadcast("ANGULAR_DRAG_END",e,t),n(e),e.dataTransfer&&"none"!==e.dataTransfer.dropEffect){if(f.onDropSuccess){var s=a(f.onDropSuccess);o.$evalAsync(function(){s(o,{$event:e})})}}else if(e.dataTransfer&&"none"===e.dataTransfer.dropEffect&&f.onDropFailure){var l=a(f.onDropFailure);o.$evalAsync(function(){l(o,{$event:e})})}d.removeClass(c)}function s(n,r){var t;n.originalEvent&&(n.dataTransfer=n.originalEvent.dataTransfer),t=a(r),o.$apply(function(){var a,r=t(o,{$event:n});r&&e.isString(r)&&(a=document.getElementById(r),a&&n.dataTransfer.setDragImage(a,0,0))})}function l(n){n.originalEvent&&(n.dataTransfer=n.originalEvent.dataTransfer);var l=!v||u.classList.contains(g);if(l){var p=f.dragChannel||"defaultchannel",$="";f.drag&&($=o.$eval(f.drag));var m=f.dragImage||null;d.addClass(c),d.bind("$destroy",i);var T=!(document.uniqueID||window.opera);if(m&&T){var h=a(f.dragImage);o.$apply(function(){var a=h(o,{$event:n});if(a&&(e.isString(a)&&(a=t.generate(a)),a.image)){var r=a.xOffset||0,d=a.yOffset||0;n.dataTransfer.setDragImage(a.image,r,d)}})}else f.dragImageElementId&&s(n,f.dragImageElementId);var b={x:n.offsetX,y:n.offsetY},D={data:$,channel:p,offset:b},y=e.toJson(D);n.dataTransfer.setData("text",y),n.dataTransfer.effectAllowed="copyMove",r.$broadcast("ANGULAR_DRAG_START",n,p,D)}else n.preventDefault()}var g,u,v=!1,c=f.draggingClass||"on-dragging";d.attr("draggable",!1),o.$watch(f.uiDraggable,function(e){e?(d.attr("draggable",e),d.bind("dragend",i),d.bind("dragstart",l)):(d.removeAttr("draggable"),d.unbind("dragend",i),d.unbind("dragstart",l))}),e.isString(f.dragHandleClass)&&(v=!0,g=f.dragHandleClass.trim()||"drag-handle",d.bind("mousedown",function(e){u=e.target}))}}]),r.directive("uiOnDrop",["$parse","$rootScope",function(a,r){return function(t,o,d){function f(e){for(var a={x:e.offsetX,y:e.offsetY},n=e.target;n!==o[0];)if(a.x=a.x+n.offsetLeft,a.y=a.y+n.offsetTop,n=n.offsetParent,!n)return null;return a}function i(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();var n=a(d.uiOnDragOver);return t.$evalAsync(function(){n(t,{$event:e,$channel:p})}),!1}function s(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),c--,0===c&&(t.$evalAsync(function(){b(t,{$event:e,$channel:p})}),o.addClass(m),o.removeClass(T));var n=a(d.uiOnDragLeave);t.$evalAsync(function(){n(t,{$event:e,$channel:p})})}function l(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),0===c&&(t.$evalAsync(function(){h(t,{$event:e,$channel:p})}),o.removeClass(m),o.addClass(T)),c++;var n=a(d.uiOnDragEnter);t.$evalAsync(function(){n(t,{$event:e,$channel:p})}),r.$broadcast("ANGULAR_HOVER",$)}function g(r){r.originalEvent&&(r.dataTransfer=r.originalEvent.dataTransfer),r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation();var i=r.dataTransfer.getData("text");i=e.fromJson(i);var s=f(r),l=s?{x:s.x-i.offset.x,y:s.y-i.offset.y}:null;n(r);var g=a(d.uiOnDrop);t.$evalAsync(function(){g(t,{$data:i.data,$event:r,$channel:i.channel,$position:l})}),o.removeClass(m),c=0}function u(e,a){if("*"===a)return!0;var n=new RegExp("(\\s|[,])+("+e+")(\\s|[,])+","i");return n.test(","+a+",")}function v(e){return e.originalEvent&&(e.dataTransfer=e.originalEvent.dataTransfer),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.dataTransfer.dropEffect="none",!1}var c=0,p=d.dropChannel||"defaultchannel",$="",m=d.dragEnterClass||"on-drag-enter",T=d.dragHoverClass||"on-drag-hover",h=a(d.onDragEnter),b=a(d.onDragLeave),D=r.$on("ANGULAR_DRAG_START",function(e,n,r,f){$=r;var c=!0;if(u(r,p)||(c=!1),c&&d.dropValidate){var T=a(d.dropValidate);c=T(t,{$drop:{scope:t,element:o},$event:n,$data:f.data,$channel:f.channel})}c?(o.bind("dragover",i),o.bind("dragenter",l),o.bind("dragleave",s),o.bind("drop",g),o.addClass(m)):(o.bind("dragover",v),o.bind("dragenter",v),o.bind("dragleave",v),o.bind("drop",v),o.removeClass(m))}),y=r.$on("ANGULAR_DRAG_END",function(){o.unbind("dragover",i),o.unbind("dragenter",l),o.unbind("dragleave",s),o.unbind("drop",g),o.removeClass(T),o.removeClass(m),o.unbind("dragover",v),o.unbind("dragenter",v),o.unbind("dragleave",v),o.unbind("drop",v)});t.$on("$destroy",function(){D(),y()}),d.$observe("dropChannel",function(e){e&&(p=e)})}}]),r.constant("$dragImageConfig",{height:20,width:200,padding:10,font:"bold 11px Arial",fontColor:"#eee8d5",backgroundColor:"#93a1a1",xOffset:0,yOffset:0}),r.service("$dragImage",["$dragImageConfig",function(a){function n(e,a,n){var t=e.measureText(a).width;if(tn.width;)a=a.substring(0,a.length-1),t=e.measureText(a+r).width;return a+r}var r="…";this.generate=function(r,t){var o=e.extend({},a,t||{}),d=document.createElement("canvas");d.height=o.height,d.width=o.width;var f=d.getContext("2d");f.fillStyle=o.backgroundColor,f.fillRect(0,0,o.width,o.height),f.font=o.font,f.fillStyle=o.fontColor;var i=n(f,r,o);f.fillText(i,4,o.padding+4);var s=new Image;return s.src=d.toDataURL(),{image:s,xOffset:o.xOffset,yOffset:o.yOffset}}}])}(angular);
\ No newline at end of file
diff --git a/public/vendor/angular-native-dragdrop/index.js b/public/vendor/angular-native-dragdrop/index.js
new file mode 100644
index 00000000000..548e0434b32
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/index.js
@@ -0,0 +1,2 @@
+require('./draganddrop');
+module.exports = 'ang-drag-drop';
diff --git a/public/vendor/angular-native-dragdrop/mkdocs.yml b/public/vendor/angular-native-dragdrop/mkdocs.yml
new file mode 100644
index 00000000000..4eca025bd0d
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/mkdocs.yml
@@ -0,0 +1,14 @@
+site_name: Angular Drag and Drop
+
+site_url: http://angular-dragdrop.github.io/angular-dragdrop/
+site_description: Project documentation for angular Drag and Drop.
+
+repo_url: https://github.com/angular-dragdrop/angular-dragdrop
+
+
+theme : flatly
+
+pages:
+- 'index.md'
+- 'getting-started.md'
+- 'examples.md'
\ No newline at end of file
diff --git a/public/vendor/angular-native-dragdrop/package.json b/public/vendor/angular-native-dragdrop/package.json
new file mode 100644
index 00000000000..d74355e7896
--- /dev/null
+++ b/public/vendor/angular-native-dragdrop/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "angular-native-dragdrop",
+ "version": "1.2.2",
+ "description": "Angular HTML5 Drag and Drop directive written in pure with no dependency on JQuery.",
+ "main": "index.js",
+ "scripts": {
+ "test": "gulp"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/angular-dragdrop/angular-dragdrop.git"
+ },
+ "author": "ganarajpr",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/angular-dragdrop/angular-dragdrop/issues"
+ },
+ "homepage": "http://angular-dragdrop.github.io/angular-dragdrop",
+ "devDependencies": {
+ "gulp": "^3.8.11",
+ "gulp-jshint": "^1.9.2",
+ "gulp-rename": "^1.2.2",
+ "gulp-uglify": "^1.4.2",
+ "jshint-stylish": "^1.0.1"
+ }
+}
diff --git a/public/vendor/jquery/.bower.json b/public/vendor/jquery/.bower.json
index 25f5cf87975..f0ada1a41de 100644
--- a/public/vendor/jquery/.bower.json
+++ b/public/vendor/jquery/.bower.json
@@ -12,14 +12,14 @@
"library"
],
"homepage": "https://github.com/jquery/jquery-dist",
- "version": "2.2.4",
- "_release": "2.2.4",
+ "version": "3.1.0",
+ "_release": "3.1.0",
"_resolution": {
"type": "version",
- "tag": "2.2.4",
- "commit": "c0185ab7c75aab88762c5aae780b9d83b80eda72"
+ "tag": "3.1.0",
+ "commit": "6f02bc382c0529d3b4f68f6b2ad21876642dbbfe"
},
"_source": "https://github.com/jquery/jquery-dist.git",
- "_target": "~2.2.4",
+ "_target": "~3.1.0",
"_originalSource": "jquery"
}
\ No newline at end of file
diff --git a/public/vendor/jquery/AUTHORS.txt b/public/vendor/jquery/AUTHORS.txt
index dde64cac7ac..0e22886ad33 100644
--- a/public/vendor/jquery/AUTHORS.txt
+++ b/public/vendor/jquery/AUTHORS.txt
@@ -272,7 +272,24 @@ Christian Grete
Liza Ramo
Julian Alexander Murillo
Joelle Fleurantin
+Jae Sung Park
Jun Sun
+Josh Soref
+Henry Wong
+Jon Dufresne
+Martijn W. van der Lee
Devin Wilson
-Todor Prikumov
+Steve Mao
Zack Hall
+Bernhard M. Wiedemann
+Todor Prikumov
+Jha Naman
+William Robinet
+Alexander Lisianoi
+Vitaliy Terziev
+Joe Trumbull
+Alexander K
+Damian Senn
+Ralin Chimev
+Felipe Sateler
+Christophe Tafani-Dereeper
diff --git a/public/vendor/jquery/dist/core.js b/public/vendor/jquery/dist/core.js
new file mode 100644
index 00000000000..c93c2d92fa6
--- /dev/null
+++ b/public/vendor/jquery/dist/core.js
@@ -0,0 +1,481 @@
+/* global Symbol */
+// Defining this global in .eslintrc would create a danger of using the global
+// unguarded in another place, it seems safer to define global only for this module
+
+define( [
+ "./var/arr",
+ "./var/document",
+ "./var/getProto",
+ "./var/slice",
+ "./var/concat",
+ "./var/push",
+ "./var/indexOf",
+ "./var/class2type",
+ "./var/toString",
+ "./var/hasOwn",
+ "./var/fnToString",
+ "./var/ObjectFunctionString",
+ "./var/support",
+ "./core/DOMEval"
+], function( arr, document, getProto, slice, concat, push, indexOf,
+ class2type, toString, hasOwn, fnToString, ObjectFunctionString,
+ support, DOMEval ) {
+
+"use strict";
+
+var
+ version = "3.1.0",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android <=4.0 only
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([a-z])/g,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ each: function( callback ) {
+ return jQuery.each( this, callback );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map( this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ } ) );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor();
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[ 0 ] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+
+ // Only deal with non-null/undefined values
+ if ( ( options = arguments[ i ] ) != null ) {
+
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
+ ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
+
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray( src ) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject( src ) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend( {
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isFunction: function( obj ) {
+ return jQuery.type( obj ) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+
+ // As of jQuery 3.0, isNumeric is limited to
+ // strings and numbers (primitives or objects)
+ // that can be coerced to finite numbers (gh-2662)
+ var type = jQuery.type( obj );
+ return ( type === "number" || type === "string" ) &&
+
+ // parseFloat NaNs numeric-cast false positives ("")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ !isNaN( obj - parseFloat( obj ) );
+ },
+
+ isPlainObject: function( obj ) {
+ var proto, Ctor;
+
+ // Detect obvious negatives
+ // Use toString instead of jQuery.type to catch host objects
+ if ( !obj || toString.call( obj ) !== "[object Object]" ) {
+ return false;
+ }
+
+ proto = getProto( obj );
+
+ // Objects with no prototype (e.g., `Object.create( null )`) are plain
+ if ( !proto ) {
+ return true;
+ }
+
+ // Objects with prototype are plain iff they were constructed by a global Object function
+ Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
+ return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
+ },
+
+ isEmptyObject: function( obj ) {
+
+ /* eslint-disable no-unused-vars */
+ // See https://github.com/eslint/eslint/issues/6125
+ var name;
+
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+
+ // Support: Android <=2.3 only (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call( obj ) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ DOMEval( code );
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Support: IE <=9 - 11, Edge 12 - 13
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ each: function( obj, callback ) {
+ var length, i = 0;
+
+ if ( isArrayLike( obj ) ) {
+ length = obj.length;
+ for ( ; i < length; i++ ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android <=4.0 only
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArrayLike( Object( arr ) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ // Support: Android <=4.0 only, PhantomJS 1 only
+ // push.apply(_, arraylike) throws on ancient WebKit
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var length, value,
+ i = 0,
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArrayLike( elems ) ) {
+ length = elems.length;
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: Date.now,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+} );
+
+if ( typeof Symbol === "function" ) {
+ jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
+}
+
+// Populate the class2type map
+jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
+function( i, name ) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+} );
+
+function isArrayLike( obj ) {
+
+ // Support: real iOS 8.2 only (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = !!obj && "length" in obj && obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+
+return jQuery;
+} );
diff --git a/public/vendor/jquery/dist/jquery.js b/public/vendor/jquery/dist/jquery.js
index 5c3c456ac48..f2fc2747874 100644
--- a/public/vendor/jquery/dist/jquery.js
+++ b/public/vendor/jquery/dist/jquery.js
@@ -1,20 +1,23 @@
+/*eslint-disable no-unused-vars*/
/*!
- * jQuery JavaScript Library v2.2.4
- * http://jquery.com/
+ * jQuery JavaScript Library v3.1.0
+ * https://jquery.com/
*
* Includes Sizzle.js
- * http://sizzlejs.com/
+ * https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
- * http://jquery.org/license
+ * https://jquery.org/license
*
- * Date: 2016-05-20T17:23Z
+ * Date: 2016-07-07T21:44Z
*/
+( function( global, factory ) {
-(function( global, factory ) {
+ "use strict";
if ( typeof module === "object" && typeof module.exports === "object" ) {
+
// For CommonJS and CommonJS-like environments where a proper `window`
// is present, execute the factory and get jQuery.
// For environments that do not have a `window` with a `document`
@@ -35,17 +38,20 @@
}
// Pass this if window is not defined yet
-}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
+// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
+// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
+// enough that all such attempts are guarded in a try block.
+"use strict";
-// Support: Firefox 18+
-// Can't be in strict mode, several libs including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-//"use strict";
var arr = [];
var document = window.document;
+var getProto = Object.getPrototypeOf;
+
var slice = arr.slice;
var concat = arr.concat;
@@ -60,12 +66,30 @@ var toString = class2type.toString;
var hasOwn = class2type.hasOwnProperty;
+var fnToString = hasOwn.toString;
+
+var ObjectFunctionString = fnToString.call( Object );
+
var support = {};
+ function DOMEval( code, doc ) {
+ doc = doc || document;
+
+ var script = doc.createElement( "script" );
+
+ script.text = code;
+ doc.head.appendChild( script ).parentNode.removeChild( script );
+ }
+/* global Symbol */
+// Defining this global in .eslintrc would create a danger of using the global
+// unguarded in another place, it seems safer to define global only for this module
+
+
+
var
- version = "2.2.4",
+ version = "3.1.0",
// Define a local copy of jQuery
jQuery = function( selector, context ) {
@@ -75,13 +99,13 @@ var
return new jQuery.fn.init( selector, context );
},
- // Support: Android<4.1
+ // Support: Android <=4.0 only
// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
// Matches dashed string for camelizing
rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
+ rdashAlpha = /-([a-z])/g,
// Used by jQuery.camelCase as callback to replace()
fcamelCase = function( all, letter ) {
@@ -95,9 +119,6 @@ jQuery.fn = jQuery.prototype = {
constructor: jQuery,
- // Start with an empty selector
- selector: "",
-
// The default length of a jQuery object is 0
length: 0,
@@ -126,7 +147,6 @@ jQuery.fn = jQuery.prototype = {
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
- ret.context = this.context;
// Return the newly-formed element set
return ret;
@@ -267,41 +287,45 @@ jQuery.extend( {
isNumeric: function( obj ) {
- // parseFloat NaNs numeric-cast false positives (null|true|false|"")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- // adding 1 corrects loss of precision from parseFloat (#15100)
- var realStringObj = obj && obj.toString();
- return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
+ // As of jQuery 3.0, isNumeric is limited to
+ // strings and numbers (primitives or objects)
+ // that can be coerced to finite numbers (gh-2662)
+ var type = jQuery.type( obj );
+ return ( type === "number" || type === "string" ) &&
+
+ // parseFloat NaNs numeric-cast false positives ("")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ !isNaN( obj - parseFloat( obj ) );
},
isPlainObject: function( obj ) {
- var key;
+ var proto, Ctor;
- // Not plain objects:
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
- // - DOM nodes
- // - window
- if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ // Detect obvious negatives
+ // Use toString instead of jQuery.type to catch host objects
+ if ( !obj || toString.call( obj ) !== "[object Object]" ) {
return false;
}
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call( obj, "constructor" ) &&
- !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
- return false;
+ proto = getProto( obj );
+
+ // Objects with no prototype (e.g., `Object.create( null )`) are plain
+ if ( !proto ) {
+ return true;
}
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
+ // Objects with prototype are plain iff they were constructed by a global Object function
+ Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
+ return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
},
isEmptyObject: function( obj ) {
+
+ /* eslint-disable no-unused-vars */
+ // See https://github.com/eslint/eslint/issues/6125
var name;
+
for ( name in obj ) {
return false;
}
@@ -313,7 +337,7 @@ jQuery.extend( {
return obj + "";
}
- // Support: Android<4.0, iOS<6 (functionish RegExp)
+ // Support: Android <=2.3 only (functionish RegExp)
return typeof obj === "object" || typeof obj === "function" ?
class2type[ toString.call( obj ) ] || "object" :
typeof obj;
@@ -321,32 +345,11 @@ jQuery.extend( {
// Evaluates a script in a global context
globalEval: function( code ) {
- var script,
- indirect = eval;
-
- code = jQuery.trim( code );
-
- if ( code ) {
-
- // If the code includes a valid, prologue position
- // strict mode pragma, execute code by injecting a
- // script tag into the document.
- if ( code.indexOf( "use strict" ) === 1 ) {
- script = document.createElement( "script" );
- script.text = code;
- document.head.appendChild( script ).parentNode.removeChild( script );
- } else {
-
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
-
- indirect( code );
- }
- }
+ DOMEval( code );
},
// Convert dashed to camelCase; used by the css and data modules
- // Support: IE9-11+
+ // Support: IE <=9 - 11, Edge 12 - 13
// Microsoft forgot to hump their vendor prefix (#9572)
camelCase: function( string ) {
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
@@ -377,7 +380,7 @@ jQuery.extend( {
return obj;
},
- // Support: Android<4.1
+ // Support: Android <=4.0 only
trim: function( text ) {
return text == null ?
"" :
@@ -406,6 +409,8 @@ jQuery.extend( {
return arr == null ? -1 : indexOf.call( arr, elem, i );
},
+ // Support: Android <=4.0 only, PhantomJS 1 only
+ // push.apply(_, arraylike) throws on ancient WebKit
merge: function( first, second ) {
var len = +second.length,
j = 0,
@@ -510,15 +515,9 @@ jQuery.extend( {
support: support
} );
-// JSHint would error on this code due to the Symbol not being defined in ES5.
-// Defining this global in .jshintrc would create a danger of using the global
-// unguarded in another place, it seems safer to just disable JSHint for these
-// three lines.
-/* jshint ignore: start */
if ( typeof Symbol === "function" ) {
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}
-/* jshint ignore: end */
// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
@@ -528,7 +527,7 @@ function( i, name ) {
function isArrayLike( obj ) {
- // Support: iOS 8.2 (not reproducible in simulator)
+ // Support: real iOS 8.2 only (not reproducible in simulator)
// `in` check used to prevent JIT error (gh-2145)
// hasOwn isn't used here due to false negatives
// regarding Nodelist length in IE
@@ -544,14 +543,14 @@ function isArrayLike( obj ) {
}
var Sizzle =
/*!
- * Sizzle CSS Selector Engine v2.2.1
- * http://sizzlejs.com/
+ * Sizzle CSS Selector Engine v2.3.0
+ * https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
- * Date: 2015-10-17
+ * Date: 2016-01-04
*/
(function( window ) {
@@ -592,9 +591,6 @@ var i,
return 0;
},
- // General-purpose constants
- MAX_NEGATIVE = 1 << 31,
-
// Instance methods
hasOwn = ({}).hasOwnProperty,
arr = [],
@@ -603,7 +599,7 @@ var i,
push = arr.push,
slice = arr.slice,
// Use a stripped-down indexOf as it's faster than native
- // http://jsperf.com/thor-indexof-vs-for/5
+ // https://jsperf.com/thor-indexof-vs-for/5
indexOf = function( list, elem ) {
var i = 0,
len = list.length;
@@ -623,7 +619,7 @@ var i,
whitespace = "[\\x20\\t\\r\\n\\f]",
// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+ identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
@@ -680,9 +676,9 @@ var i,
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
rsibling = /[+~]/,
- rescape = /'|\\/g,
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ // CSS escapes
+ // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
funescape = function( _, escaped, escapedWhitespace ) {
var high = "0x" + escaped - 0x10000;
@@ -698,13 +694,39 @@ var i,
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
},
+ // CSS string/identifier serialization
+ // https://drafts.csswg.org/cssom/#common-serializing-idioms
+ rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
+ fcssescape = function( ch, asCodePoint ) {
+ if ( asCodePoint ) {
+
+ // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
+ if ( ch === "\0" ) {
+ return "\uFFFD";
+ }
+
+ // Control characters and (dependent upon position) numbers get escaped as code points
+ return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+ }
+
+ // Other potentially-special ASCII characters get backslash-escaped
+ return "\\" + ch;
+ },
+
// Used for iframes
// See setDocument()
// Removing the function wrapper causes a "Permission Denied"
// error in IE
unloadHandler = function() {
setDocument();
- };
+ },
+
+ disabledAncestor = addCombinator(
+ function( elem ) {
+ return elem.disabled === true;
+ },
+ { dir: "parentNode", next: "legend" }
+ );
// Optimize for push.apply( _, NodeList )
try {
@@ -736,7 +758,7 @@ try {
}
function Sizzle( selector, context, results, seed ) {
- var m, i, elem, nid, nidselect, match, groups, newSelector,
+ var m, i, elem, nid, match, groups, newSelector,
newContext = context && context.ownerDocument,
// nodeType defaults to 9, since context defaults to document
@@ -829,7 +851,7 @@ function Sizzle( selector, context, results, seed ) {
// Capture the context ID, setting it first if necessary
if ( (nid = context.getAttribute( "id" )) ) {
- nid = nid.replace( rescape, "\\$&" );
+ nid = nid.replace( rcssescape, fcssescape );
} else {
context.setAttribute( "id", (nid = expando) );
}
@@ -837,9 +859,8 @@ function Sizzle( selector, context, results, seed ) {
// Prefix every selector in the list
groups = tokenize( selector );
i = groups.length;
- nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
while ( i-- ) {
- groups[i] = nidselect + " " + toSelector( groups[i] );
+ groups[i] = "#" + nid + " " + toSelector( groups[i] );
}
newSelector = groups.join( "," );
@@ -900,22 +921,22 @@ function markFunction( fn ) {
/**
* Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
+ * @param {Function} fn Passed the created element and returns a boolean result
*/
function assert( fn ) {
- var div = document.createElement("div");
+ var el = document.createElement("fieldset");
try {
- return !!fn( div );
+ return !!fn( el );
} catch (e) {
return false;
} finally {
// Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
+ if ( el.parentNode ) {
+ el.parentNode.removeChild( el );
}
// release memory in IE
- div = null;
+ el = null;
}
}
@@ -942,8 +963,7 @@ function addHandle( attrs, handler ) {
function siblingCheck( a, b ) {
var cur = b && a,
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
+ a.sourceIndex - b.sourceIndex;
// Use IE sourceIndex if available on both nodes
if ( diff ) {
@@ -984,6 +1004,34 @@ function createButtonPseudo( type ) {
};
}
+/**
+ * Returns a function to use in pseudos for :enabled/:disabled
+ * @param {Boolean} disabled true for :disabled; false for :enabled
+ */
+function createDisabledPseudo( disabled ) {
+ // Known :disabled false positives:
+ // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
+ // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
+ return function( elem ) {
+
+ // Check form elements and option elements for explicit disabling
+ return "label" in elem && elem.disabled === disabled ||
+ "form" in elem && elem.disabled === disabled ||
+
+ // Check non-disabled form elements for fieldset[disabled] ancestors
+ "form" in elem && elem.disabled === false && (
+ // Support: IE6-11+
+ // Ancestry is covered for us
+ elem.isDisabled === disabled ||
+
+ // Otherwise, assume any non-