@angular/cdk 8.0.0-beta.2 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.md +2 -2
  2. package/_overlay.scss +4 -4
  3. package/bundles/cdk-a11y.umd.js +227 -79
  4. package/bundles/cdk-a11y.umd.js.map +1 -1
  5. package/bundles/cdk-a11y.umd.min.js +1 -1
  6. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  7. package/bundles/cdk-accordion.umd.js +20 -8
  8. package/bundles/cdk-accordion.umd.js.map +1 -1
  9. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  10. package/bundles/cdk-bidi.umd.js +5 -5
  11. package/bundles/cdk-bidi.umd.min.js +1 -1
  12. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  13. package/bundles/cdk-coercion.umd.js +5 -5
  14. package/bundles/cdk-collections.umd.js +38 -15
  15. package/bundles/cdk-collections.umd.js.map +1 -1
  16. package/bundles/cdk-collections.umd.min.js +1 -1
  17. package/bundles/cdk-collections.umd.min.js.map +1 -1
  18. package/bundles/cdk-drag-drop.umd.js +571 -180
  19. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  20. package/bundles/cdk-drag-drop.umd.min.js +2 -2
  21. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  22. package/bundles/cdk-keycodes.umd.js +7 -3
  23. package/bundles/cdk-keycodes.umd.js.map +1 -1
  24. package/bundles/cdk-keycodes.umd.min.js.map +1 -1
  25. package/bundles/cdk-layout.umd.js +83 -30
  26. package/bundles/cdk-layout.umd.js.map +1 -1
  27. package/bundles/cdk-layout.umd.min.js +1 -1
  28. package/bundles/cdk-layout.umd.min.js.map +1 -1
  29. package/bundles/cdk-observers.umd.js +30 -11
  30. package/bundles/cdk-observers.umd.js.map +1 -1
  31. package/bundles/cdk-observers.umd.min.js +1 -1
  32. package/bundles/cdk-observers.umd.min.js.map +1 -1
  33. package/bundles/cdk-overlay.umd.js +229 -108
  34. package/bundles/cdk-overlay.umd.js.map +1 -1
  35. package/bundles/cdk-overlay.umd.min.js +2 -2
  36. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  37. package/bundles/cdk-platform.umd.js +17 -10
  38. package/bundles/cdk-platform.umd.js.map +1 -1
  39. package/bundles/cdk-platform.umd.min.js +1 -1
  40. package/bundles/cdk-platform.umd.min.js.map +1 -1
  41. package/bundles/cdk-portal.umd.js +32 -13
  42. package/bundles/cdk-portal.umd.js.map +1 -1
  43. package/bundles/cdk-portal.umd.min.js.map +1 -1
  44. package/bundles/cdk-scrolling.umd.js +184 -62
  45. package/bundles/cdk-scrolling.umd.js.map +1 -1
  46. package/bundles/cdk-scrolling.umd.min.js +1 -1
  47. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  48. package/bundles/cdk-stepper.umd.js +30 -12
  49. package/bundles/cdk-stepper.umd.js.map +1 -1
  50. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  51. package/bundles/cdk-table.umd.js +384 -74
  52. package/bundles/cdk-table.umd.js.map +1 -1
  53. package/bundles/cdk-table.umd.min.js +1 -1
  54. package/bundles/cdk-table.umd.min.js.map +1 -1
  55. package/bundles/cdk-text-field.umd.js +61 -21
  56. package/bundles/cdk-text-field.umd.js.map +1 -1
  57. package/bundles/cdk-text-field.umd.min.js +1 -1
  58. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  59. package/bundles/cdk-tree.umd.js +85 -29
  60. package/bundles/cdk-tree.umd.js.map +1 -1
  61. package/bundles/cdk-tree.umd.min.js.map +1 -1
  62. package/bundles/cdk.umd.js +2 -2
  63. package/bundles/cdk.umd.js.map +1 -1
  64. package/bundles/cdk.umd.min.js +1 -1
  65. package/bundles/cdk.umd.min.js.map +1 -1
  66. package/drag-drop/typings/directives/drag.d.ts +11 -2
  67. package/drag-drop/typings/drag-events.d.ts +17 -0
  68. package/drag-drop/typings/drag-ref.d.ts +9 -5
  69. package/drag-drop/typings/drop-list-ref.d.ts +9 -3
  70. package/drag-drop/typings/index.metadata.json +1 -1
  71. package/esm2015/a11y.js +229 -81
  72. package/esm2015/a11y.js.map +1 -1
  73. package/esm2015/accordion.js +22 -10
  74. package/esm2015/accordion.js.map +1 -1
  75. package/esm2015/bidi.js +8 -8
  76. package/esm2015/cdk.js +4 -4
  77. package/esm2015/cdk.js.map +1 -1
  78. package/esm2015/coercion.js +7 -7
  79. package/esm2015/collections.js +41 -18
  80. package/esm2015/collections.js.map +1 -1
  81. package/esm2015/drag-drop.js +540 -181
  82. package/esm2015/drag-drop.js.map +1 -1
  83. package/esm2015/keycodes.js +9 -5
  84. package/esm2015/keycodes.js.map +1 -1
  85. package/esm2015/layout.js +89 -36
  86. package/esm2015/layout.js.map +1 -1
  87. package/esm2015/observers.js +33 -14
  88. package/esm2015/observers.js.map +1 -1
  89. package/esm2015/overlay.js +232 -110
  90. package/esm2015/overlay.js.map +1 -1
  91. package/esm2015/platform.js +20 -13
  92. package/esm2015/platform.js.map +1 -1
  93. package/esm2015/portal.js +34 -15
  94. package/esm2015/portal.js.map +1 -1
  95. package/esm2015/scrolling.js +180 -58
  96. package/esm2015/scrolling.js.map +1 -1
  97. package/esm2015/stepper.js +32 -14
  98. package/esm2015/stepper.js.map +1 -1
  99. package/esm2015/table.js +369 -69
  100. package/esm2015/table.js.map +1 -1
  101. package/esm2015/text-field.js +64 -24
  102. package/esm2015/text-field.js.map +1 -1
  103. package/esm2015/tree.js +86 -30
  104. package/esm2015/tree.js.map +1 -1
  105. package/esm5/a11y.es5.js +230 -82
  106. package/esm5/a11y.es5.js.map +1 -1
  107. package/esm5/accordion.es5.js +22 -10
  108. package/esm5/accordion.es5.js.map +1 -1
  109. package/esm5/bidi.es5.js +8 -8
  110. package/esm5/cdk.es5.js +4 -4
  111. package/esm5/cdk.es5.js.map +1 -1
  112. package/esm5/coercion.es5.js +7 -7
  113. package/esm5/collections.es5.js +42 -19
  114. package/esm5/collections.es5.js.map +1 -1
  115. package/esm5/drag-drop.es5.js +574 -183
  116. package/esm5/drag-drop.es5.js.map +1 -1
  117. package/esm5/keycodes.es5.js +9 -5
  118. package/esm5/keycodes.es5.js.map +1 -1
  119. package/esm5/layout.es5.js +86 -33
  120. package/esm5/layout.es5.js.map +1 -1
  121. package/esm5/observers.es5.js +33 -14
  122. package/esm5/observers.es5.js.map +1 -1
  123. package/esm5/overlay.es5.js +232 -111
  124. package/esm5/overlay.es5.js.map +1 -1
  125. package/esm5/platform.es5.js +20 -13
  126. package/esm5/platform.es5.js.map +1 -1
  127. package/esm5/portal.es5.js +34 -15
  128. package/esm5/portal.es5.js.map +1 -1
  129. package/esm5/scrolling.es5.js +187 -65
  130. package/esm5/scrolling.es5.js.map +1 -1
  131. package/esm5/stepper.es5.js +32 -14
  132. package/esm5/stepper.es5.js.map +1 -1
  133. package/esm5/table.es5.js +386 -72
  134. package/esm5/table.es5.js.map +1 -1
  135. package/esm5/text-field.es5.js +64 -24
  136. package/esm5/text-field.es5.js.map +1 -1
  137. package/esm5/tree.es5.js +87 -31
  138. package/esm5/tree.es5.js.map +1 -1
  139. package/layout/typings/breakpoints-observer.d.ts +3 -3
  140. package/layout/typings/index.metadata.json +1 -1
  141. package/layout/typings/media-matcher.d.ts +2 -2
  142. package/overlay/typings/index.metadata.json +1 -1
  143. package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -3
  144. package/package.json +8 -8
  145. package/portal/typings/portal.d.ts +2 -2
  146. package/schematics/ng-update/data/attribute-selectors.js +1 -1
  147. package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
  148. package/schematics/ng-update/data/class-names.js +3 -3
  149. package/schematics/ng-update/data/class-names.js.map +1 -1
  150. package/schematics/ng-update/data/constructor-checks.js +1 -1
  151. package/schematics/ng-update/data/constructor-checks.js.map +1 -1
  152. package/schematics/ng-update/data/input-names.js +1 -1
  153. package/schematics/ng-update/data/input-names.js.map +1 -1
  154. package/schematics/ng-update/data/method-call-checks.js +1 -1
  155. package/schematics/ng-update/data/method-call-checks.js.map +1 -1
  156. package/schematics/ng-update/data/property-names.js +4 -4
  157. package/schematics/ng-update/data/property-names.js.map +1 -1
  158. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +1 -1
  159. package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +1 -1
  160. package/schematics/tsconfig.tsbuildinfo +5811 -0
  161. package/schematics/utils/ast.d.ts +1 -1
  162. package/schematics/utils/build-component.js +1 -1
  163. package/schematics/utils/build-component.js.map +1 -1
  164. package/schematics/utils/get-project.d.ts +1 -1
  165. package/schematics/utils/project-main-file.d.ts +1 -1
  166. package/schematics/utils/project-style-file.d.ts +1 -1
  167. package/schematics/utils/project-targets.d.ts +1 -1
  168. package/schematics/utils/schematic-options.d.ts +1 -1
  169. package/table/typings/cell.d.ts +3 -2
  170. package/table/typings/index.metadata.json +1 -1
  171. package/table/typings/public-api.d.ts +1 -0
  172. package/table/typings/row.d.ts +5 -4
  173. package/table/typings/sticky-styler.d.ts +5 -5
  174. package/table/typings/table-errors.d.ts +10 -0
  175. package/table/typings/text-column.d.ts +80 -0
  176. package/typings/drag-drop/directives/drag.d.ts +11 -2
  177. package/typings/drag-drop/drag-events.d.ts +17 -0
  178. package/typings/drag-drop/drag-ref.d.ts +9 -5
  179. package/typings/drag-drop/drop-list-ref.d.ts +9 -3
  180. package/typings/drag-drop/index.metadata.json +1 -1
  181. package/typings/esm5/drag-drop/directives/drag.d.ts +11 -2
  182. package/typings/esm5/drag-drop/drag-events.d.ts +17 -0
  183. package/typings/esm5/drag-drop/drag-ref.d.ts +9 -5
  184. package/typings/esm5/drag-drop/drop-list-ref.d.ts +9 -3
  185. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  186. package/typings/esm5/index.metadata.json +1 -1
  187. package/typings/esm5/layout/breakpoints-observer.d.ts +3 -3
  188. package/typings/esm5/layout/index.metadata.json +1 -1
  189. package/typings/esm5/layout/media-matcher.d.ts +2 -2
  190. package/typings/esm5/overlay/index.metadata.json +1 -1
  191. package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
  192. package/typings/esm5/portal/portal.d.ts +2 -2
  193. package/typings/esm5/table/cell.d.ts +3 -2
  194. package/typings/esm5/table/index.metadata.json +1 -1
  195. package/typings/esm5/table/public-api.d.ts +1 -0
  196. package/typings/esm5/table/row.d.ts +5 -4
  197. package/typings/esm5/table/sticky-styler.d.ts +5 -5
  198. package/typings/esm5/table/table-errors.d.ts +10 -0
  199. package/typings/esm5/table/text-column.d.ts +80 -0
  200. package/typings/index.metadata.json +1 -1
  201. package/typings/layout/breakpoints-observer.d.ts +3 -3
  202. package/typings/layout/index.metadata.json +1 -1
  203. package/typings/layout/media-matcher.d.ts +2 -2
  204. package/typings/overlay/index.metadata.json +1 -1
  205. package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
  206. package/typings/portal/portal.d.ts +2 -2
  207. package/typings/schematics/utils/ast.d.ts +1 -1
  208. package/typings/schematics/utils/get-project.d.ts +1 -1
  209. package/typings/schematics/utils/project-main-file.d.ts +1 -1
  210. package/typings/schematics/utils/project-style-file.d.ts +1 -1
  211. package/typings/schematics/utils/project-targets.d.ts +1 -1
  212. package/typings/schematics/utils/schematic-options.d.ts +1 -1
  213. package/typings/table/cell.d.ts +3 -2
  214. package/typings/table/index.metadata.json +1 -1
  215. package/typings/table/public-api.d.ts +1 -0
  216. package/typings/table/row.d.ts +5 -4
  217. package/typings/table/sticky-styler.d.ts +5 -5
  218. package/typings/table/table-errors.d.ts +10 -0
  219. package/typings/table/text-column.d.ts +80 -0
@@ -5,6 +5,6 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/platform"),require("@angular/cdk/coercion"),require("rxjs"),require("@angular/core"),require("@angular/common"),require("@angular/cdk/scrolling"),require("@angular/cdk/bidi"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/cdk/drag-drop",["exports","@angular/cdk/platform","@angular/cdk/coercion","rxjs","@angular/core","@angular/common","@angular/cdk/scrolling","@angular/cdk/bidi","rxjs/operators"],e):e((t.ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.dragDrop={}),t.ng.cdk.platform,t.ng.cdk.coercion,t.rxjs,t.ng.core,t.ng.common,t.ng.cdk.scrolling,t.ng.cdk.bidi,t.rxjs.operators)}(this,function(t,e,i,n,r,o,s,a,c){"use strict";function p(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function d(t,e){var i=e?"":"none";p(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function h(t){var e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function l(t){var e=getComputedStyle(t),i=u(e,"transition-property"),n=i.find(function(t){return"transform"===t||"all"===t});if(!n)return 0;var r=i.indexOf(n),o=u(e,"transition-duration"),s=u(e,"transition-delay");return h(o[r])+h(s[r])}function u(t,e){return t.getPropertyValue(e).split(",").map(function(t){return t.trim()})}function g(t,e){return"translate3d("+Math.round(t)+"px, "+Math.round(e)+"px, 0)"}function _(t){var e=t.cloneNode(!0),i=e.querySelectorAll("[id]");e.removeAttribute("id");for(var n=0;n<i.length;n++)i[n].removeAttribute("id");return e}function f(t,e,i){return Math.max(e,Math.min(i,t))}function m(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function v(t){return t.type.startsWith("touch")}function y(t){return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body}function b(t,e,i){var n=P(e,t.length-1),r=P(i,t.length-1);if(n!==r){for(var o=t[n],s=r<n?-1:1,a=n;a!==r;a+=s)t[a]=t[a+s];t[r]=o}}function D(t,e,i,n){var r=P(i,t.length-1),o=P(n,e.length);t.length&&e.splice(o,0,t.splice(r,1)[0])}function E(t,e,i,n){var r=P(n,e.length);t.length&&e.splice(r,0,t[i])}function P(t,e){return Math.max(0,Math.min(e,t))}function R(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function w(t,e){for(var i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function x(t,e,i){var n=t.top,r=t.bottom,o=t.left,s=t.right;return i>=n&&i<=r&&e>=o&&e<=s}function C(){return{dragStartThreshold:5,pointerDirectionChangeThreshold:5}}function I(t,e){for(var i=t.parentElement;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}var k=e.normalizePassiveListenerOptions({passive:!0}),S=e.normalizePassiveListenerOptions({passive:!1}),T=function(){function t(t,e,i,r,o,s){var a=this;this._config=e,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new n.Subject,this._moveEventSubscriptions=0,this._pointerMoveSubscription=n.Subscription.EMPTY,this._pointerUpSubscription=n.Subscription.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new n.Subject,this.started=new n.Subject,this.released=new n.Subject,this.ended=new n.Subject,this.entered=new n.Subject,this.exited=new n.Subject,this.dropped=new n.Subject,this.moved=new n.Observable(function(t){var e=a._moveEvents.subscribe(t);return a._moveEventSubscriptions++,function(){e.unsubscribe(),a._moveEventSubscriptions--}}),this._pointerDown=function(t){if(a.beforeStarted.next(),a._handles.length){var e=a._handles.find(function(e){var i=t.target;return!!i&&(i===e||e.contains(i))});!e||a._disabledHandles.has(e)||a.disabled||a._initializeDragSequence(e,t)}else a.disabled||a._initializeDragSequence(a._rootElement,t)},this._pointerMove=function(t){if(!a._hasStartedDragging){var e=a._getPointerPositionOnPage(t);return void(Math.abs(e.x-a._pickupPositionOnPage.x)+Math.abs(e.y-a._pickupPositionOnPage.y)>=a._config.dragStartThreshold&&Date.now()>=a._dragStartTime+(a.dragStartDelay||0)&&(a._hasStartedDragging=!0,a._ngZone.run(function(){return a._startDragSequence(t)})))}a._boundaryElement&&(a._previewRect&&(a._previewRect.width||a._previewRect.height)||(a._previewRect=(a._preview||a._rootElement).getBoundingClientRect()));var i=a._getConstrainedPointerPosition(t);if(a._hasMoved=!0,t.preventDefault(),a._updatePointerDirectionDelta(i),a._dropContainer)a._updateActiveDropContainer(i);else{var n=a._activeTransform;if(n.x=i.x-a._pickupPositionOnPage.x+a._passiveTransform.x,n.y=i.y-a._pickupPositionOnPage.y+a._passiveTransform.y,a._applyRootElementTransform(n.x,n.y),"undefined"!=typeof SVGElement&&a._rootElement instanceof SVGElement){var r="translate("+n.x+" "+n.y+")";a._rootElement.setAttribute("transform",r)}}a._moveEventSubscriptions>0&&a._ngZone.run(function(){a._moveEvents.next({source:a,pointerPosition:i,event:t,delta:a._pointerDirectionDelta})})},this._pointerUp=function(t){if(a._dragDropRegistry.isDragging(a)&&(a._removeSubscriptions(),a._dragDropRegistry.stopDragging(a),a._handles&&(a._rootElement.style.webkitTapHighlightColor=a._rootElementTapHighlight),a._hasStartedDragging)){if(a.released.next({source:a}),!a._dropContainer)return a._passiveTransform.x=a._activeTransform.x,a._passiveTransform.y=a._activeTransform.y,a._ngZone.run(function(){return a.ended.next({source:a})}),void a._dragDropRegistry.stopDragging(a);a._animatePreviewToPlaceholder().then(function(){a._cleanupDragArtifacts(t),a._dragDropRegistry.stopDragging(a)})}},this.withRootElement(t),s.registerDragItem(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(t){var e=i.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._placeholder},t.prototype.getRootElement=function(){return this._rootElement},t.prototype.withHandles=function(t){return this._handles=t.map(function(t){return i.coerceElement(t)}),this._handles.forEach(function(t){return d(t,!1)}),this._toggleNativeDragInteractions(),this},t.prototype.withPreviewTemplate=function(t){return this._previewTemplate=t,this},t.prototype.withPlaceholderTemplate=function(t){return this._placeholderTemplate=t,this},t.prototype.withRootElement=function(t){var e=i.coerceElement(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),e.addEventListener("mousedown",this._pointerDown,S),e.addEventListener("touchstart",this._pointerDown,k),this._initialTransform=void 0,this._rootElement=e),this},t.prototype.withBoundaryElement=function(t){return this._boundaryElement=t?i.coerceElement(t):null,this},t.prototype.dispose=function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&m(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._boundaryElement=this._rootElement=this._placeholderTemplate=this._previewTemplate=this._nextSibling=null},t.prototype.isDragging=function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)},t.prototype.reset=function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}},t.prototype.disableHandle=function(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)},t.prototype.enableHandle=function(t){this._disabledHandles.delete(t)},t.prototype.withDirection=function(t){return this._direction=t,this},t.prototype._withDropContainer=function(t){this._dropContainer=t},t.prototype.getFreeDragPosition=function(){return{x:this._passiveTransform.x,y:this._passiveTransform.y}},t.prototype.setFreeDragPosition=function(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this},t.prototype._removeSubscriptions=function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe()},t.prototype._destroyPreview=function(){this._preview&&m(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null},t.prototype._destroyPlaceholder=function(){this._placeholder&&m(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null},t.prototype._startDragSequence=function(t){if(this.started.next({source:this}),v(t)&&(this._lastTouchEventTime=Date.now()),this._dropContainer){var e=this._rootElement;this._nextSibling=e.nextSibling;var i=this._preview=this._createPreviewElement(),n=this._placeholder=this._createPlaceholderElement();e.style.display="none",this._document.body.appendChild(e.parentNode.replaceChild(n,e)),y(this._document).appendChild(i),this._dropContainer.start()}},t.prototype._initializeDragSequence=function(t,e){e.stopPropagation();var i=this.isDragging(),n=v(e),r=!n&&0!==e.button,o=this._rootElement,s=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(i||r||s)){this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor,o.style.webkitTapHighlightColor="transparent"),this._toggleNativeDragInteractions(),this._hasStartedDragging=this._hasMoved=!1,this._initialContainer=this._dropContainer,this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollPosition=this._viewportRuler.getViewportScrollPosition(),this._boundaryElement&&(this._boundaryRect=this._boundaryElement.getBoundingClientRect()),this._pickupPositionInElement=this._previewTemplate&&this._previewTemplate.template?{x:0,y:0}:this._getPointerPositionInElement(t,e);var a=this._pickupPositionOnPage=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:a.x,y:a.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}},t.prototype._cleanupDragArtifacts=function(t){var e=this;this._rootElement.style.display="",this._nextSibling?this._nextSibling.parentNode.insertBefore(this._rootElement,this._nextSibling):this._initialContainer.element.appendChild(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(function(){var i=e._dropContainer,n=i.getItemIndex(e),r=e._getPointerPositionOnPage(t),o=r.x,s=r.y,a=i._isOverContainer(o,s);e.ended.next({source:e}),e.dropped.next({item:e,currentIndex:n,previousIndex:e._initialContainer.getItemIndex(e),container:i,previousContainer:e._initialContainer,isPointerOverContainer:a}),i.drop(e,n,e._initialContainer,a),e._dropContainer=e._initialContainer})},t.prototype._updateActiveDropContainer=function(t){var e=this,i=t.x,n=t.y,r=this._dropContainer._getSiblingContainerFromPosition(this,i,n)||this._initialContainer._getSiblingContainerFromPosition(this,i,n);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,n)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(function(){e.exited.next({item:e,container:e._dropContainer}),e._dropContainer.exit(e),e.entered.next({item:e,container:r}),e._dropContainer=r,e._dropContainer.enter(e,i,n)}),this._dropContainer._sortItem(this,i,n,this._pointerDirectionDelta),this._preview.style.transform=g(i-this._pickupPositionInElement.x,n-this._pickupPositionInElement.y)},t.prototype._createPreviewElement=function(){var t,e=this._previewTemplate,i=e?e.template:null;if(i){var n=e.viewContainer.createEmbeddedView(i,e.context);t=n.rootNodes[0],this._previewRef=n,t.style.transform=g(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var r=this._rootElement,o=r.getBoundingClientRect();t=_(r),t.style.width=o.width+"px",t.style.height=o.height+"px",t.style.transform=g(o.left,o.top)}return p(t.style,{pointerEvents:"none",position:"fixed",top:"0",left:"0",zIndex:"1000"}),d(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._direction),t},t.prototype._animatePreviewToPlaceholder=function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=g(e.left,e.top);var i=l(this._preview);return 0===i?Promise.resolve():this._ngZone.runOutsideAngular(function(){return new Promise(function(e){var n=function(i){(!i||i.target===t._preview&&"transform"===i.propertyName)&&(t._preview.removeEventListener("transitionend",n),e(),clearTimeout(r))},r=setTimeout(n,1.5*i);t._preview.addEventListener("transitionend",n)})})},t.prototype._createPlaceholderElement=function(){var t,e=this._placeholderTemplate,i=e?e.template:null;return i?(this._placeholderRef=e.viewContainer.createEmbeddedView(i,e.context),t=this._placeholderRef.rootNodes[0]):t=_(this._rootElement),t.classList.add("cdk-drag-placeholder"),t},t.prototype._getPointerPositionInElement=function(t,e){var i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():i,o=v(e)?e.targetTouches[0]:e,s=o.pageX-r.left-this._scrollPosition.left,a=o.pageY-r.top-this._scrollPosition.top;return{x:r.left-i.left+s,y:r.top-i.top+a}},t.prototype._getPointerPositionOnPage=function(t){var e=v(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.pageX-this._scrollPosition.left,y:e.pageY-this._scrollPosition.top}},t.prototype._getConstrainedPointerPosition=function(t){var e=this._getPointerPositionOnPage(t),i=this.constrainPosition?this.constrainPosition(e):e,n=this._dropContainer?this._dropContainer.lockAxis:null;if("x"===this.lockAxis||"x"===n?i.y=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==n||(i.x=this._pickupPositionOnPage.x),this._boundaryRect){var r=this._pickupPositionInElement,o=r.x,s=r.y,a=this._boundaryRect,c=this._previewRect,p=a.top+s,d=a.bottom-(c.height-s),h=a.left+o,l=a.right-(c.width-o);i.x=f(i.x,h,l),i.y=f(i.y,p,d)}return i},t.prototype._updatePointerDirectionDelta=function(t){var e=t.x,i=t.y,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-r.x),s=Math.abs(i-r.y);return o>this._config.pointerDirectionChangeThreshold&&(n.x=e>r.x?1:-1,r.x=e),s>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n},t.prototype._toggleNativeDragInteractions=function(){if(this._rootElement&&this._handles){var t=this.disabled||this._handles.length>0;t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,d(this._rootElement,t))}},t.prototype._removeRootElementListeners=function(t){t.removeEventListener("mousedown",this._pointerDown,S),t.removeEventListener("touchstart",this._pointerDown,k)},t.prototype._applyRootElementTransform=function(t,e){var i=g(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?i+" "+this._initialTransform:i},t}(),O=0,L=function(){function t(t,e,i){this._dragDropRegistry=e,this.id="cdk-drop-list-ref-"+O++,this.disabled=!1,this.sortingDisabled=!0,this.enterPredicate=function(){return!0},this.beforeStarted=new n.Subject,this.entered=new n.Subject,this.exited=new n.Subject,this.dropped=new n.Subject,this.sorted=new n.Subject,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",e.registerDropContainer(this),this._document=i,this.element=t instanceof r.ElementRef?t.nativeElement:t}return t.prototype.dispose=function(){this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._dragDropRegistry.removeDropContainer(this)},t.prototype.isDragging=function(){return this._isDragging},t.prototype.start=function(){var t=this;this.beforeStarted.next(),this._isDragging=!0,this._activeDraggables=this._draggables.slice(),this._cacheOwnPosition(),this._cacheItemPositions(),this._siblings.forEach(function(e){return e._startReceiving(t)})},t.prototype.enter=function(t,e,i){this.entered.next({item:t,container:this}),this.start();var n=this.sortingDisabled?this._draggables.indexOf(t):-1;-1===n&&(n=this._getItemIndexFromPointerPosition(t,e,i));var r=this._activeDraggables,o=r.indexOf(t),s=t.getPlaceholderElement(),a=r[n];if(a===t&&(a=r[n+1]),o>-1&&r.splice(o,1),a&&!this._dragDropRegistry.isDragging(a)){var c=a.getRootElement();c.parentElement.insertBefore(s,c),r.splice(n,0,t)}else this.element.appendChild(s),r.push(t);s.style.transform="",this._cacheItemPositions()},t.prototype.exit=function(t){this._reset(),this.exited.next({item:t,container:this})},t.prototype.drop=function(t,e,i,n){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i.getItemIndex(t),container:this,previousContainer:i,isPointerOverContainer:n})},t.prototype.withItems=function(t){var e=this;return this._draggables=t,t.forEach(function(t){return t._withDropContainer(e)}),this},t.prototype.withDirection=function(t){return this._direction=t,this},t.prototype.connectedTo=function(t){return this._siblings=t.slice(),this},t.prototype.withOrientation=function(t){return this._orientation=t,this},t.prototype.getItemIndex=function(t){return this._isDragging?w("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,function(e){return e.drag===t}):this._draggables.indexOf(t)},t.prototype.isReceiving=function(){return this._activeSiblings.size>0},t.prototype._sortItem=function(t,e,i,n){if(!this.sortingDisabled&&this._isPointerNearDropContainer(e,i)){var r=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,n);if(!(-1===o&&r.length>0)){var s="horizontal"===this._orientation,a=w(r,function(e){return e.drag===t}),c=r[o],p=r[a].clientRect,d=c.clientRect,h=a>o?1:-1;this._previousSwap.drag=c.drag,this._previousSwap.delta=s?n.x:n.y;var l=this._getItemOffsetPx(p,d,h),u=this._getSiblingOffsetPx(a,r,h),g=r.slice();b(r,a,o),this.sorted.next({previousIndex:a,currentIndex:o,container:this,item:t}),r.forEach(function(e,i){if(g[i]!==e){var n=e.drag===t,r=n?l:u,o=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,s?(o.style.transform="translate3d("+Math.round(e.offset)+"px, 0, 0)",R(e.clientRect,0,r)):(o.style.transform="translate3d(0, "+Math.round(e.offset)+"px, 0)",R(e.clientRect,r,0))}})}}},t.prototype._cacheOwnPosition=function(){this._clientRect=this.element.getBoundingClientRect()},t.prototype._cacheItemPositions=function(){var t=this,e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(function(e){var i=t._dragDropRegistry.isDragging(e)?e.getPlaceholderElement():e.getRootElement(),n=i.getBoundingClientRect();return{drag:e,offset:0,clientRect:{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height}}}).sort(function(t,i){return e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top})},t.prototype._reset=function(){var t=this;this._isDragging=!1,this._activeDraggables.forEach(function(t){return t.getRootElement().style.transform=""}),this._siblings.forEach(function(e){return e._stopReceiving(t)}),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0},t.prototype._getSiblingOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=e[t].clientRect,o=e[t+-1*i],s=r[n?"width":"height"]*i;if(o){var a=n?"left":"top",c=n?"right":"bottom";-1===i?s-=o.clientRect[a]-r[c]:s+=r[a]-o.clientRect[c]}return s},t.prototype._isPointerNearDropContainer=function(t,e){var i=this._clientRect,n=i.top,r=i.right,o=i.bottom,s=i.left,a=i.width,c=i.height,p=.05*a,d=.05*c;return e>n-d&&e<o+d&&t>s-p&&t<r+p},t.prototype._getItemOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=n?e.left-t.left:e.top-t.top;return-1===i&&(r+=n?e.width-t.width:e.height-t.height),r},t.prototype._getItemIndexFromPointerPosition=function(t,e,i,n){var r=this,o="horizontal"===this._orientation;return w(this._itemPositions,function(s,a,c){var p=s.drag,d=s.clientRect;if(p===t)return c.length<2;if(n){var h=o?n.x:n.y;if(p===r._previousSwap.drag&&h===r._previousSwap.delta)return!1}return o?e>=Math.floor(d.left)&&e<=Math.floor(d.right):i>=Math.floor(d.top)&&i<=Math.floor(d.bottom)})},t.prototype._isOverContainer=function(t,e){return x(this._clientRect,t,e)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){return this._siblings.find(function(n){return n._canReceive(t,e,i)})},t.prototype._canReceive=function(t,e,i){if(!this.enterPredicate(t,this)||!x(this._clientRect,e,i))return!1;var n=this._document.elementFromPoint(e,i);return!!n&&(n===this.element||this.element.contains(n))},t.prototype._startReceiving=function(t){var e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheOwnPosition())},t.prototype._stopReceiving=function(t){this._activeSiblings.delete(t)},t}(),j=e.normalizePassiveListenerOptions({passive:!1,capture:!0}),M=function(){function t(t,e){var i=this;this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new n.Subject,this.pointerUp=new n.Subject,this._preventDefaultWhileDragging=function(t){i._activeDragInstances.size&&t.preventDefault()},this._document=e}return t.prototype.registerDropContainer=function(t){if(!this._dropInstances.has(t)){if(this.getDropContainer(t.id))throw Error('Drop instance with id "'+t.id+'" has already been registered.');this._dropInstances.add(t)}},t.prototype.registerDragItem=function(t){var e=this;this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(function(){e._document.addEventListener("touchmove",e._preventDefaultWhileDragging,j)})},t.prototype.removeDropContainer=function(t){this._dropInstances.delete(t)},t.prototype.removeDragItem=function(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._preventDefaultWhileDragging,j)},t.prototype.startDragging=function(t,e){var i=this;if(this._activeDragInstances.add(t),1===this._activeDragInstances.size){var n=e.type.startsWith("touch"),r=n?"touchmove":"mousemove",o=n?"touchend":"mouseup";this._globalListeners.set(r,{handler:function(t){return i.pointerMove.next(t)},options:j}).set(o,{handler:function(t){return i.pointerUp.next(t)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:j}),n||this._globalListeners.set("wheel",{handler:this._preventDefaultWhileDragging,options:j}),this._ngZone.runOutsideAngular(function(){i._globalListeners.forEach(function(t,e){i._document.addEventListener(e,t.handler,t.options)})})}},t.prototype.stopDragging=function(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()},t.prototype.isDragging=function(t){return this._activeDragInstances.has(t)},t.prototype.getDropContainer=function(t){return Array.from(this._dropInstances).find(function(e){return e.id===t})},t.prototype.ngOnDestroy=function(){var t=this;this._dragInstances.forEach(function(e){return t.removeDragItem(e)}),this._dropInstances.forEach(function(e){return t.removeDropContainer(e)}),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()},t.prototype._clearGlobalListeners=function(){var t=this;this._globalListeners.forEach(function(e,i){t._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()},t.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:r.NgZone},{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]}]},t.ngInjectableDef=r.defineInjectable({factory:function(){return new t(r.inject(r.NgZone),r.inject(o.DOCUMENT))},token:t,providedIn:"root"}),t}(),A={dragStartThreshold:5,pointerDirectionChangeThreshold:5},N=function(){function t(t,e,i,n){this._document=t,this._ngZone=e,this._viewportRuler=i,this._dragDropRegistry=n}return t.prototype.createDrag=function(t,e){return void 0===e&&(e=A),new T(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)},t.prototype.createDropList=function(t){return new L(t,this._dragDropRegistry,this._document)},t.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]},{type:r.NgZone},{type:s.ViewportRuler},{type:M}]},t.ngInjectableDef=r.defineInjectable({factory:function(){return new t(r.inject(o.DOCUMENT),r.inject(r.NgZone),r.inject(s.ViewportRuler),r.inject(M))},token:t,providedIn:"root"}),t}(),F=new r.InjectionToken("CDK_DROP_LIST"),U=F,z=new r.InjectionToken("CDK_DRAG_PARENT"),B=function(){function t(t,e){this.element=t,this._stateChanges=new n.Subject,this._disabled=!1,this._parentDrag=e,d(t.nativeElement,!1)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t),this._stateChanges.next(this)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._stateChanges.complete()},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDragHandle]",host:{class:"cdk-drag-handle"}}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:void 0,decorators:[{type:r.Inject,args:[z]},{type:r.Optional}]}]},t.propDecorators={disabled:[{type:r.Input,args:["cdkDragHandleDisabled"]}]},t}(),H=function(){function t(t){this.templateRef=t}return t.decorators=[{type:r.Directive,args:[{selector:"ng-template[cdkDragPlaceholder]"}]}],t.ctorParameters=function(){return[{type:r.TemplateRef}]},t.propDecorators={data:[{type:r.Input}]},t}(),Z=function(){function t(t){this.templateRef=t}return t.decorators=[{type:r.Directive,args:[{selector:"ng-template[cdkDragPreview]"}]}],t.ctorParameters=function(){return[{type:r.TemplateRef}]},t.propDecorators={data:[{type:r.Input}]},t}(),G=new r.InjectionToken("CDK_DRAG_CONFIG",{providedIn:"root",factory:C}),q=function(){function t(t,e,i,o,s,a,p,d,h){var l=this;this.element=t,this.dropContainer=e,this._document=i,this._ngZone=o,this._viewContainerRef=s,this._dir=p,this._changeDetectorRef=h,this._destroyed=new n.Subject,this.dragStartDelay=0,this._disabled=!1,this.started=new r.EventEmitter,this.released=new r.EventEmitter,this.ended=new r.EventEmitter,this.entered=new r.EventEmitter,this.exited=new r.EventEmitter,this.dropped=new r.EventEmitter,this.moved=new n.Observable(function(t){var e=l._dragRef.moved.pipe(c.map(function(t){return{source:l,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta}})).subscribe(t);return function(){e.unsubscribe()}}),this._dragRef=d.createDrag(t,a),this._dragRef.data=this,this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t),this._dragRef.disabled=this._disabled},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._dragRef.getPlaceholderElement()},t.prototype.getRootElement=function(){return this._dragRef.getRootElement()},t.prototype.reset=function(){this._dragRef.reset()},t.prototype.getFreeDragPosition=function(){return this._dragRef.getFreeDragPosition()},t.prototype.ngAfterViewInit=function(){var t=this;this._ngZone.onStable.asObservable().pipe(c.take(1),c.takeUntil(this._destroyed)).subscribe(function(){t._updateRootElement(),t._handles.changes.pipe(c.startWith(t._handles),c.tap(function(e){var i=e.filter(function(e){return e._parentDrag===t}).map(function(t){return t.element});t._dragRef.withHandles(i)}),c.switchMap(function(t){return n.merge.apply(void 0,t.map(function(t){return t._stateChanges}))}),c.takeUntil(t._destroyed)).subscribe(function(e){var i=t._dragRef,n=e.element.nativeElement;e.disabled?i.disableHandle(n):i.enableHandle(n)}),t.freeDragPosition&&t._dragRef.setFreeDragPosition(t.freeDragPosition)})},t.prototype.ngOnChanges=function(t){var e=t.rootElementSelector,i=t.positionChange;e&&!e.firstChange&&this._updateRootElement(),i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()},t.prototype._updateRootElement=function(){var t=this.element.nativeElement,e=this.rootElementSelector?I(t,this.rootElementSelector):t;if(e&&e.nodeType!==this._document.ELEMENT_NODE)throw Error('cdkDrag must be attached to an element node. Currently attached to "'+e.nodeName+'".');this._dragRef.withRootElement(e||t)},t.prototype._getBoundaryElement=function(){var t=this.boundaryElementSelector;return t?I(this.element.nativeElement,t):null},t.prototype._syncInputs=function(t){var e=this;t.beforeStarted.subscribe(function(){if(!t.isDragging()){var n=e._dir,r=e._placeholderTemplate?{template:e._placeholderTemplate.templateRef,context:e._placeholderTemplate.data,viewContainer:e._viewContainerRef}:null,o=e._previewTemplate?{template:e._previewTemplate.templateRef,context:e._previewTemplate.data,viewContainer:e._viewContainerRef}:null;t.disabled=e.disabled,t.lockAxis=e.lockAxis,t.dragStartDelay=i.coerceNumberProperty(e.dragStartDelay),t.constrainPosition=e.constrainPosition,t.withBoundaryElement(e._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(o),n&&t.withDirection(n.value)}})},t.prototype._handleEvents=function(t){var e=this;t.started.subscribe(function(){e.started.emit({source:e}),e._changeDetectorRef.markForCheck()}),t.released.subscribe(function(){e.released.emit({source:e})}),t.ended.subscribe(function(){e.ended.emit({source:e}),e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:t.container.data,item:e})}),t.exited.subscribe(function(t){e.exited.emit({container:t.container.data,item:e})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e})})},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDrag]",exportAs:"cdkDrag",host:{class:"cdk-drag","[class.cdk-drag-disabled]":"disabled","[class.cdk-drag-dragging]":"_dragRef.isDragging()"},providers:[{provide:z,useExisting:t}]}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:void 0,decorators:[{type:r.Inject,args:[F]},{type:r.Optional},{type:r.SkipSelf}]},{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]},{type:r.NgZone},{type:r.ViewContainerRef},{type:void 0,decorators:[{type:r.Inject,args:[G]}]},{type:a.Directionality,decorators:[{type:r.Optional}]},{type:N},{type:r.ChangeDetectorRef}]},t.propDecorators={_handles:[{type:r.ContentChildren,args:[B,{descendants:!0}]}],_previewTemplate:[{type:r.ContentChild,args:[Z,{static:!1}]}],_placeholderTemplate:[{type:r.ContentChild,args:[H,{static:!1}]}],data:[{type:r.Input,args:["cdkDragData"]}],lockAxis:[{type:r.Input,args:["cdkDragLockAxis"]
9
- }],rootElementSelector:[{type:r.Input,args:["cdkDragRootElement"]}],boundaryElementSelector:[{type:r.Input,args:["cdkDragBoundary"]}],dragStartDelay:[{type:r.Input,args:["cdkDragStartDelay"]}],freeDragPosition:[{type:r.Input,args:["cdkDragFreeDragPosition"]}],disabled:[{type:r.Input,args:["cdkDragDisabled"]}],constrainPosition:[{type:r.Input,args:["cdkDragConstrainPosition"]}],started:[{type:r.Output,args:["cdkDragStarted"]}],released:[{type:r.Output,args:["cdkDragReleased"]}],ended:[{type:r.Output,args:["cdkDragEnded"]}],entered:[{type:r.Output,args:["cdkDragEntered"]}],exited:[{type:r.Output,args:["cdkDragExited"]}],dropped:[{type:r.Output,args:["cdkDragDropped"]}],moved:[{type:r.Output,args:["cdkDragMoved"]}]},t}(),V=function(){function t(){this._items=new Set,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._items.clear()},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDropListGroup]",exportAs:"cdkDropListGroup"}]}],t.propDecorators={disabled:[{type:r.Input,args:["cdkDropListGroupDisabled"]}]},t}(),W=0,K=function(){function t(e,i,o,s,a){var c=this;this.element=e,this._changeDetectorRef=o,this._dir=s,this._group=a,this._destroyed=new n.Subject,this.connectedTo=[],this.orientation="vertical",this.id="cdk-drop-list-"+W++,this._disabled=!1,this._sortingDisabled=!1,this.enterPredicate=function(){return!0},this.dropped=new r.EventEmitter,this.entered=new r.EventEmitter,this.exited=new r.EventEmitter,this.sorted=new r.EventEmitter,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,this._dropListRef.enterPredicate=function(t,e){return c.enterPredicate(t.data,e.data)},this._syncInputs(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),a&&a._items.add(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sortingDisabled",{get:function(){return this._sortingDisabled},set:function(t){this._sortingDisabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._draggables.changes.pipe(c.startWith(this._draggables),c.takeUntil(this._destroyed)).subscribe(function(e){t._dropListRef.withItems(e.map(function(t){return t._dragRef}))})},t.prototype.ngOnDestroy=function(){var e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()},t.prototype.start=function(){this._dropListRef.start()},t.prototype.drop=function(t,e,i,n){this._dropListRef.drop(t._dragRef,e,i._dropListRef,n)},t.prototype.enter=function(t,e,i){this._dropListRef.enter(t._dragRef,e,i)},t.prototype.exit=function(t){this._dropListRef.exit(t._dragRef)},t.prototype.getItemIndex=function(t){return this._dropListRef.getItemIndex(t._dragRef)},t.prototype._sortItem=function(t,e,i,n){return this._dropListRef._sortItem(t._dragRef,e,i,n)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){var n=this._dropListRef._getSiblingContainerFromPosition(t._dragRef,e,i);return n?n.data:null},t.prototype._isOverContainer=function(t,e){return this._dropListRef._isOverContainer(t,e)},t.prototype._syncInputs=function(e){var n=this;this._dir&&this._dir.change.pipe(c.startWith(this._dir.value),c.takeUntil(this._destroyed)).subscribe(function(t){return e.withDirection(t)}),e.beforeStarted.subscribe(function(){var r=i.coerceArray(n.connectedTo).map(function(e){return"string"==typeof e?t._dropLists.find(function(t){return t.id===e}):e});n._group&&n._group._items.forEach(function(t){-1===r.indexOf(t)&&r.push(t)}),e.disabled=n.disabled,e.lockAxis=n.lockAxis,e.sortingDisabled=n.sortingDisabled,e.connectedTo(r.filter(function(t){return t&&t!==n}).map(function(t){return t._dropListRef})).withOrientation(n.orientation)})},t.prototype._handleEvents=function(t){var e=this;t.beforeStarted.subscribe(function(){e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:e,item:t.item.data})}),t.exited.subscribe(function(t){e.exited.emit({container:e,item:t.item.data}),e._changeDetectorRef.markForCheck()}),t.sorted.subscribe(function(t){e.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:e,item:t.item.data})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer}),e._changeDetectorRef.markForCheck()})},t._dropLists=[],t.decorators=[{type:r.Directive,args:[{selector:"[cdkDropList], cdk-drop-list",exportAs:"cdkDropList",providers:[{provide:V,useValue:void 0},{provide:U,useExisting:t}],host:{class:"cdk-drop-list","[id]":"id","[class.cdk-drop-list-disabled]":"disabled","[class.cdk-drop-list-dragging]":"_dropListRef.isDragging()","[class.cdk-drop-list-receiving]":"_dropListRef.isReceiving()"}}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:N},{type:r.ChangeDetectorRef},{type:a.Directionality,decorators:[{type:r.Optional}]},{type:V,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]},t.propDecorators={_draggables:[{type:r.ContentChildren,args:[r.forwardRef(function(){return q}),{descendants:!1}]}],connectedTo:[{type:r.Input,args:["cdkDropListConnectedTo"]}],data:[{type:r.Input,args:["cdkDropListData"]}],orientation:[{type:r.Input,args:["cdkDropListOrientation"]}],id:[{type:r.Input}],lockAxis:[{type:r.Input,args:["cdkDropListLockAxis"]}],disabled:[{type:r.Input,args:["cdkDropListDisabled"]}],sortingDisabled:[{type:r.Input,args:["cdkDropListSortingDisabled"]}],enterPredicate:[{type:r.Input,args:["cdkDropListEnterPredicate"]}],dropped:[{type:r.Output,args:["cdkDropListDropped"]}],entered:[{type:r.Output,args:["cdkDropListEntered"]}],exited:[{type:r.Output,args:["cdkDropListExited"]}],sorted:[{type:r.Output,args:["cdkDropListSorted"]}]},t}(),Y=function(){function t(){}return t.decorators=[{type:r.NgModule,args:[{declarations:[K,V,q,B,Z,H],exports:[K,V,q,B,Z,H],providers:[N]}]}],t}();t.DragDrop=N,t.DragRef=T,t.DropListRef=L,t.CdkDropList=K,t.CDK_DROP_LIST=F,t.CDK_DROP_LIST_CONTAINER=U,t.moveItemInArray=b,t.transferArrayItem=D,t.copyArrayItem=E,t.DragDropModule=Y,t.DragDropRegistry=M,t.CdkDropListGroup=V,t.CDK_DRAG_CONFIG_FACTORY=C,t.CDK_DRAG_CONFIG=G,t.CdkDrag=q,t.CdkDragHandle=B,t.CdkDragPreview=Z,t.CdkDragPlaceholder=H,t.ɵb=z,Object.defineProperty(t,"__esModule",{value:!0})});
8
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/platform"),require("@angular/cdk/coercion"),require("rxjs"),require("@angular/core"),require("@angular/common"),require("@angular/cdk/scrolling"),require("@angular/cdk/bidi"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/cdk/drag-drop",["exports","@angular/cdk/platform","@angular/cdk/coercion","rxjs","@angular/core","@angular/common","@angular/cdk/scrolling","@angular/cdk/bidi","rxjs/operators"],e):e((t.ng=t.ng||{},t.ng.cdk=t.ng.cdk||{},t.ng.cdk.dragDrop={}),t.ng.cdk.platform,t.ng.cdk.coercion,t.rxjs,t.ng.core,t.ng.common,t.ng.cdk.scrolling,t.ng.cdk.bidi,t.rxjs.operators)}(this,function(t,e,i,n,r,o,s,a,c){"use strict";function d(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function p(t,e){var i=e?"":"none";d(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function h(t){var e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function l(t){var e=getComputedStyle(t),i=u(e,"transition-property"),n=i.find(function(t){return"transform"===t||"all"===t});if(!n)return 0;var r=i.indexOf(n),o=u(e,"transition-duration"),s=u(e,"transition-delay");return h(o[r])+h(s[r])}function u(t,e){return t.getPropertyValue(e).split(",").map(function(t){return t.trim()})}function g(t,e){return"translate3d("+Math.round(t)+"px, "+Math.round(e)+"px, 0)"}function _(t){var e=t.cloneNode(!0),i=e.querySelectorAll("[id]"),n=t.querySelectorAll("canvas");e.removeAttribute("id");for(var r=0;r<i.length;r++)i[r].removeAttribute("id");if(n.length)for(var o=e.querySelectorAll("canvas"),r=0;r<n.length;r++){var s=o[r].getContext("2d");s&&s.drawImage(n[r],0,0)}return e}function f(t,e,i){return Math.max(e,Math.min(i,t))}function m(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function v(t){return t.type.startsWith("touch")}function y(t){return t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body}function D(t,e,i){var n=P(e,t.length-1),r=P(i,t.length-1);if(n!==r){for(var o=t[n],s=r<n?-1:1,a=n;a!==r;a+=s)t[a]=t[a+s];t[r]=o}}function b(t,e,i,n){var r=P(i,t.length-1),o=P(n,e.length);t.length&&e.splice(o,0,t.splice(r,1)[0])}function E(t,e,i,n){var r=P(n,e.length);t.length&&e.splice(r,0,t[i])}function P(t,e){return Math.max(0,Math.min(e,t))}function x(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function w(t,e){for(var i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function R(t,e,i){var n=t.top,r=t.bottom,o=t.left,s=t.right;return i>=n&&i<=r&&e>=o&&e<=s}function I(){return{dragStartThreshold:5,pointerDirectionChangeThreshold:5}}function C(t,e){for(var i=t.parentElement;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}var k=e.normalizePassiveListenerOptions({passive:!0}),S=e.normalizePassiveListenerOptions({passive:!1}),O=function(){function t(t,e,i,r,o,s){var a=this;this._config=e,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new n.Subject,this._pointerMoveSubscription=n.Subscription.EMPTY,this._pointerUpSubscription=n.Subscription.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new n.Subject,this.started=new n.Subject,this.released=new n.Subject,this.ended=new n.Subject,this.entered=new n.Subject,this.exited=new n.Subject,this.dropped=new n.Subject,this.moved=this._moveEvents.asObservable(),this._pointerDown=function(t){if(a.beforeStarted.next(),a._handles.length){var e=a._handles.find(function(e){var i=t.target;return!!i&&(i===e||e.contains(i))});!e||a._disabledHandles.has(e)||a.disabled||a._initializeDragSequence(e,t)}else a.disabled||a._initializeDragSequence(a._rootElement,t)},this._pointerMove=function(t){if(!a._hasStartedDragging){var e=a._getPointerPositionOnPage(t);return void(Math.abs(e.x-a._pickupPositionOnPage.x)+Math.abs(e.y-a._pickupPositionOnPage.y)>=a._config.dragStartThreshold&&Date.now()>=a._dragStartTime+(a.dragStartDelay||0)&&(a._hasStartedDragging=!0,a._ngZone.run(function(){return a._startDragSequence(t)})))}a._boundaryElement&&(a._previewRect&&(a._previewRect.width||a._previewRect.height)||(a._previewRect=(a._preview||a._rootElement).getBoundingClientRect()));var i=a._getConstrainedPointerPosition(t);if(a._hasMoved=!0,t.preventDefault(),a._updatePointerDirectionDelta(i),a._dropContainer)a._updateActiveDropContainer(i);else{var n=a._activeTransform;if(n.x=i.x-a._pickupPositionOnPage.x+a._passiveTransform.x,n.y=i.y-a._pickupPositionOnPage.y+a._passiveTransform.y,a._applyRootElementTransform(n.x,n.y),"undefined"!=typeof SVGElement&&a._rootElement instanceof SVGElement){var r="translate("+n.x+" "+n.y+")";a._rootElement.setAttribute("transform",r)}}a._moveEvents.observers.length&&a._ngZone.run(function(){a._moveEvents.next({source:a,pointerPosition:i,event:t,distance:a._getDragDistance(i),delta:a._pointerDirectionDelta})})},this._pointerUp=function(t){if(a._dragDropRegistry.isDragging(a)&&(a._removeSubscriptions(),a._dragDropRegistry.stopDragging(a),a._handles&&(a._rootElement.style.webkitTapHighlightColor=a._rootElementTapHighlight),a._hasStartedDragging)){if(a.released.next({source:a}),!a._dropContainer)return a._passiveTransform.x=a._activeTransform.x,a._passiveTransform.y=a._activeTransform.y,a._ngZone.run(function(){a.ended.next({source:a,distance:a._getDragDistance(a._getPointerPositionOnPage(t))})}),void a._dragDropRegistry.stopDragging(a);a._animatePreviewToPlaceholder().then(function(){a._cleanupDragArtifacts(t),a._dragDropRegistry.stopDragging(a)})}},this.withRootElement(t),s.registerDragItem(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(t){var e=i.coerceBooleanProperty(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._placeholder},t.prototype.getRootElement=function(){return this._rootElement},t.prototype.withHandles=function(t){return this._handles=t.map(function(t){return i.coerceElement(t)}),this._handles.forEach(function(t){return p(t,!1)}),this._toggleNativeDragInteractions(),this},t.prototype.withPreviewTemplate=function(t){return this._previewTemplate=t,this},t.prototype.withPlaceholderTemplate=function(t){return this._placeholderTemplate=t,this},t.prototype.withRootElement=function(t){var e=i.coerceElement(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),e.addEventListener("mousedown",this._pointerDown,S),e.addEventListener("touchstart",this._pointerDown,k),this._initialTransform=void 0,this._rootElement=e),this},t.prototype.withBoundaryElement=function(t){return this._boundaryElement=t?i.coerceElement(t):null,this},t.prototype.dispose=function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&m(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._boundaryElement=this._rootElement=this._placeholderTemplate=this._previewTemplate=this._nextSibling=null},t.prototype.isDragging=function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)},t.prototype.reset=function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}},t.prototype.disableHandle=function(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)},t.prototype.enableHandle=function(t){this._disabledHandles.delete(t)},t.prototype.withDirection=function(t){return this._direction=t,this},t.prototype._withDropContainer=function(t){this._dropContainer=t},t.prototype.getFreeDragPosition=function(){return{x:this._passiveTransform.x,y:this._passiveTransform.y}},t.prototype.setFreeDragPosition=function(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this},t.prototype._removeSubscriptions=function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe()},t.prototype._destroyPreview=function(){this._preview&&m(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null},t.prototype._destroyPlaceholder=function(){this._placeholder&&m(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null},t.prototype._startDragSequence=function(t){if(this.started.next({source:this}),v(t)&&(this._lastTouchEventTime=Date.now()),this._dropContainer){var e=this._rootElement;this._nextSibling=e.nextSibling;var i=this._preview=this._createPreviewElement(),n=this._placeholder=this._createPlaceholderElement();e.style.display="none",this._document.body.appendChild(e.parentNode.replaceChild(n,e)),y(this._document).appendChild(i),this._dropContainer.start()}},t.prototype._initializeDragSequence=function(t,e){e.stopPropagation();var i=this.isDragging(),n=v(e),r=!n&&0!==e.button,o=this._rootElement,s=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(i||r||s)){this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor,o.style.webkitTapHighlightColor="transparent"),this._toggleNativeDragInteractions(),this._hasStartedDragging=this._hasMoved=!1,this._initialContainer=this._dropContainer,this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollPosition=this._viewportRuler.getViewportScrollPosition(),this._boundaryElement&&(this._boundaryRect=this._boundaryElement.getBoundingClientRect()),this._pickupPositionInElement=this._previewTemplate&&this._previewTemplate.template?{x:0,y:0}:this._getPointerPositionInElement(t,e);var a=this._pickupPositionOnPage=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:a.x,y:a.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}},t.prototype._cleanupDragArtifacts=function(t){var e=this;this._rootElement.style.display="",this._nextSibling?this._nextSibling.parentNode.insertBefore(this._rootElement,this._nextSibling):i.coerceElement(this._initialContainer.element).appendChild(this._rootElement),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(function(){var i=e._dropContainer,n=i.getItemIndex(e),r=e._getPointerPositionOnPage(t),o=e._getDragDistance(e._getPointerPositionOnPage(t)),s=i._isOverContainer(r.x,r.y);e.ended.next({source:e,distance:o}),e.dropped.next({item:e,currentIndex:n,previousIndex:e._initialContainer.getItemIndex(e),container:i,previousContainer:e._initialContainer,isPointerOverContainer:s,distance:o}),i.drop(e,n,e._initialContainer,s,o),e._dropContainer=e._initialContainer})},t.prototype._updateActiveDropContainer=function(t){var e=this,i=t.x,n=t.y,r=this._initialContainer._getSiblingContainerFromPosition(this,i,n);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,n)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(function(){e.exited.next({item:e,container:e._dropContainer}),e._dropContainer.exit(e),e._dropContainer=r,e._dropContainer.enter(e,i,n),e.entered.next({item:e,container:r,currentIndex:r.getItemIndex(e)})}),this._dropContainer._sortItem(this,i,n,this._pointerDirectionDelta),this._preview.style.transform=g(i-this._pickupPositionInElement.x,n-this._pickupPositionInElement.y)},t.prototype._createPreviewElement=function(){var t,e=this._previewTemplate,i=e?e.template:null;if(i){var n=e.viewContainer.createEmbeddedView(i,e.context);t=n.rootNodes[0],this._previewRef=n,t.style.transform=g(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var r=this._rootElement,o=r.getBoundingClientRect();t=_(r),t.style.width=o.width+"px",t.style.height=o.height+"px",t.style.transform=g(o.left,o.top)}return d(t.style,{pointerEvents:"none",position:"fixed",top:"0",left:"0",zIndex:"1000"}),p(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._direction),t},t.prototype._animatePreviewToPlaceholder=function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=g(e.left,e.top);var i=l(this._preview);return 0===i?Promise.resolve():this._ngZone.runOutsideAngular(function(){return new Promise(function(e){var n=function(i){(!i||i.target===t._preview&&"transform"===i.propertyName)&&(t._preview.removeEventListener("transitionend",n),e(),clearTimeout(r))},r=setTimeout(n,1.5*i);t._preview.addEventListener("transitionend",n)})})},t.prototype._createPlaceholderElement=function(){var t,e=this._placeholderTemplate,i=e?e.template:null;return i?(this._placeholderRef=e.viewContainer.createEmbeddedView(i,e.context),t=this._placeholderRef.rootNodes[0]):t=_(this._rootElement),t.classList.add("cdk-drag-placeholder"),t},t.prototype._getPointerPositionInElement=function(t,e){var i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,r=n?n.getBoundingClientRect():i,o=v(e)?e.targetTouches[0]:e,s=o.pageX-r.left-this._scrollPosition.left,a=o.pageY-r.top-this._scrollPosition.top;return{x:r.left-i.left+s,y:r.top-i.top+a}},t.prototype._getPointerPositionOnPage=function(t){var e=v(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.pageX-this._scrollPosition.left,y:e.pageY-this._scrollPosition.top}},t.prototype._getConstrainedPointerPosition=function(t){var e=this._getPointerPositionOnPage(t),i=this.constrainPosition?this.constrainPosition(e):e,n=this._dropContainer?this._dropContainer.lockAxis:null;if("x"===this.lockAxis||"x"===n?i.y=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==n||(i.x=this._pickupPositionOnPage.x),this._boundaryRect){var r=this._pickupPositionInElement,o=r.x,s=r.y,a=this._boundaryRect,c=this._previewRect,d=a.top+s,p=a.bottom-(c.height-s),h=a.left+o,l=a.right-(c.width-o);i.x=f(i.x,h,l),i.y=f(i.y,d,p)}return i},t.prototype._updatePointerDirectionDelta=function(t){var e=t.x,i=t.y,n=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-r.x),s=Math.abs(i-r.y);return o>this._config.pointerDirectionChangeThreshold&&(n.x=e>r.x?1:-1,r.x=e),s>this._config.pointerDirectionChangeThreshold&&(n.y=i>r.y?1:-1,r.y=i),n},t.prototype._toggleNativeDragInteractions=function(){if(this._rootElement&&this._handles){var t=this.disabled||this._handles.length>0;t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,p(this._rootElement,t))}},t.prototype._removeRootElementListeners=function(t){t.removeEventListener("mousedown",this._pointerDown,S),t.removeEventListener("touchstart",this._pointerDown,k)},t.prototype._applyRootElementTransform=function(t,e){var i=g(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?i+" "+this._initialTransform:i},t.prototype._getDragDistance=function(t){var e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}},t}(),T=0,L=function(){function t(t,e,i){this._dragDropRegistry=e,this.id="cdk-drop-list-ref-"+T++,this.disabled=!1,this.sortingDisabled=!0,this.enterPredicate=function(){return!0},this.beforeStarted=new n.Subject,this.entered=new n.Subject,this.exited=new n.Subject,this.dropped=new n.Subject,this.sorted=new n.Subject,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",e.registerDropContainer(this),this._document=i,this.element=t instanceof r.ElementRef?t.nativeElement:t}return t.prototype.dispose=function(){this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._dragDropRegistry.removeDropContainer(this)},t.prototype.isDragging=function(){return this._isDragging},t.prototype.start=function(){var t=this;this.beforeStarted.next(),this._isDragging=!0,this._cacheItems(),this._siblings.forEach(function(e){return e._startReceiving(t)})},t.prototype.enter=function(t,e,n){this.start();var r=this.sortingDisabled?this._draggables.indexOf(t):-1;-1===r&&(r=this._getItemIndexFromPointerPosition(t,e,n));var o=this._activeDraggables,s=o.indexOf(t),a=t.getPlaceholderElement(),c=o[r];if(c===t&&(c=o[r+1]),s>-1&&o.splice(s,1),c&&!this._dragDropRegistry.isDragging(c)){var d=c.getRootElement();d.parentElement.insertBefore(a,d),o.splice(r,0,t)}else i.coerceElement(this.element).appendChild(a),o.push(t);a.style.transform="",this._cacheItemPositions(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})},t.prototype.exit=function(t){this._reset(),this.exited.next({item:t,container:this})},t.prototype.drop=function(t,e,i,n,r){void 0===r&&(r={x:0,y:0}),this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:i.getItemIndex(t),container:this,previousContainer:i,isPointerOverContainer:n,distance:r})},t.prototype.withItems=function(t){var e=this;return this._draggables=t,t.forEach(function(t){return t._withDropContainer(e)}),this.isDragging()&&this._cacheItems(),this},t.prototype.withDirection=function(t){return this._direction=t,this},t.prototype.connectedTo=function(t){return this._siblings=t.slice(),this},t.prototype.withOrientation=function(t){return this._orientation=t,this},t.prototype.getItemIndex=function(t){return this._isDragging?w("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,function(e){return e.drag===t}):this._draggables.indexOf(t)},t.prototype.isReceiving=function(){return this._activeSiblings.size>0},t.prototype._sortItem=function(t,e,i,n){if(!this.sortingDisabled&&this._isPointerNearDropContainer(e,i)){var r=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,i,n);if(!(-1===o&&r.length>0)){var s="horizontal"===this._orientation,a=w(r,function(e){return e.drag===t}),c=r[o],d=r[a].clientRect,p=c.clientRect,h=a>o?1:-1;this._previousSwap.drag=c.drag,this._previousSwap.delta=s?n.x:n.y;var l=this._getItemOffsetPx(d,p,h),u=this._getSiblingOffsetPx(a,r,h),g=r.slice();D(r,a,o),this.sorted.next({previousIndex:a,currentIndex:o,container:this,item:t}),r.forEach(function(e,i){if(g[i]!==e){var n=e.drag===t,r=n?l:u,o=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,s?(o.style.transform="translate3d("+Math.round(e.offset)+"px, 0, 0)",x(e.clientRect,0,r)):(o.style.transform="translate3d(0, "+Math.round(e.offset)+"px, 0)",x(e.clientRect,r,0))}})}}},t.prototype._cacheOwnPosition=function(){this._clientRect=i.coerceElement(this.element).getBoundingClientRect()},t.prototype._cacheItemPositions=function(){var t=this,e="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(function(e){var i=t._dragDropRegistry.isDragging(e)?e.getPlaceholderElement():e.getRootElement(),n=i.getBoundingClientRect();return{drag:e,offset:0,clientRect:{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height}}}).sort(function(t,i){return e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top})},t.prototype._reset=function(){var t=this;this._isDragging=!1,this._activeDraggables.forEach(function(t){return t.getRootElement().style.transform=""}),this._siblings.forEach(function(e){return e._stopReceiving(t)}),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0},t.prototype._getSiblingOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=e[t].clientRect,o=e[t+-1*i],s=r[n?"width":"height"]*i;if(o){var a=n?"left":"top",c=n?"right":"bottom";-1===i?s-=o.clientRect[a]-r[c]:s+=r[a]-o.clientRect[c]}return s},t.prototype._isPointerNearDropContainer=function(t,e){var i=this._clientRect,n=i.top,r=i.right,o=i.bottom,s=i.left,a=i.width,c=i.height,d=.05*a,p=.05*c;return e>n-p&&e<o+p&&t>s-d&&t<r+d},t.prototype._getItemOffsetPx=function(t,e,i){var n="horizontal"===this._orientation,r=n?e.left-t.left:e.top-t.top;return-1===i&&(r+=n?e.width-t.width:e.height-t.height),r},t.prototype._getItemIndexFromPointerPosition=function(t,e,i,n){var r=this,o="horizontal"===this._orientation;return w(this._itemPositions,function(s,a,c){var d=s.drag,p=s.clientRect;if(d===t)return c.length<2;if(n){var h=o?n.x:n.y;if(d===r._previousSwap.drag&&h===r._previousSwap.delta)return!1}return o?e>=Math.floor(p.left)&&e<=Math.floor(p.right):i>=Math.floor(p.top)&&i<=Math.floor(p.bottom)})},t.prototype._cacheItems=function(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheOwnPosition()},t.prototype._isOverContainer=function(t,e){return R(this._clientRect,t,e)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){return this._siblings.find(function(n){return n._canReceive(t,e,i)})},t.prototype._canReceive=function(t,e,n){if(!this.enterPredicate(t,this)||!R(this._clientRect,e,n))return!1;var r=this._document.elementFromPoint(e,n);if(!r)return!1;var o=i.coerceElement(this.element);return r===o||o.contains(r)},t.prototype._startReceiving=function(t){var e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheOwnPosition())},t.prototype._stopReceiving=function(t){this._activeSiblings.delete(t)},t}(),j=e.normalizePassiveListenerOptions({passive:!1,capture:!0}),A=function(){function t(t,e){var i=this;this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new n.Subject,this.pointerUp=new n.Subject,this._preventDefaultWhileDragging=function(t){i._activeDragInstances.size&&t.preventDefault()},this._document=e}return t.prototype.registerDropContainer=function(t){if(!this._dropInstances.has(t)){if(this.getDropContainer(t.id))throw Error('Drop instance with id "'+t.id+'" has already been registered.');this._dropInstances.add(t)}},t.prototype.registerDragItem=function(t){var e=this;this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(function(){e._document.addEventListener("touchmove",e._preventDefaultWhileDragging,j)})},t.prototype.removeDropContainer=function(t){this._dropInstances.delete(t)},t.prototype.removeDragItem=function(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._preventDefaultWhileDragging,j)},t.prototype.startDragging=function(t,e){var i=this;if(this._activeDragInstances.add(t),1===this._activeDragInstances.size){var n=e.type.startsWith("touch"),r=n?"touchmove":"mousemove",o=n?"touchend":"mouseup";this._globalListeners.set(r,{handler:function(t){return i.pointerMove.next(t)},options:j}).set(o,{handler:function(t){return i.pointerUp.next(t)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:j}),n||this._globalListeners.set("wheel",{handler:this._preventDefaultWhileDragging,options:j}),this._ngZone.runOutsideAngular(function(){i._globalListeners.forEach(function(t,e){i._document.addEventListener(e,t.handler,t.options)})})}},t.prototype.stopDragging=function(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()},t.prototype.isDragging=function(t){return this._activeDragInstances.has(t)},t.prototype.getDropContainer=function(t){return Array.from(this._dropInstances).find(function(e){return e.id===t})},t.prototype.ngOnDestroy=function(){var t=this;this._dragInstances.forEach(function(e){return t.removeDragItem(e)}),this._dropInstances.forEach(function(e){return t.removeDropContainer(e)}),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()},t.prototype._clearGlobalListeners=function(){var t=this;this._globalListeners.forEach(function(e,i){t._document.removeEventListener(i,e.handler,e.options)}),this._globalListeners.clear()},t.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:r.NgZone},{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]}]},t.ngInjectableDef=r.ɵɵdefineInjectable({factory:function(){return new t(r.ɵɵinject(r.NgZone),r.ɵɵinject(o.DOCUMENT))},token:t,providedIn:"root"}),t}(),M={dragStartThreshold:5,pointerDirectionChangeThreshold:5},N=function(){function t(t,e,i,n){this._document=t,this._ngZone=e,this._viewportRuler=i,this._dragDropRegistry=n}return t.prototype.createDrag=function(t,e){return void 0===e&&(e=M),new O(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)},t.prototype.createDropList=function(t){return new L(t,this._dragDropRegistry,this._document)},t.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]},{type:r.NgZone},{type:s.ViewportRuler},{type:A}]},t.ngInjectableDef=r.ɵɵdefineInjectable({factory:function(){return new t(r.ɵɵinject(o.DOCUMENT),r.ɵɵinject(r.NgZone),r.ɵɵinject(s.ViewportRuler),r.ɵɵinject(A))},token:t,providedIn:"root"}),t}(),F=new r.InjectionToken("CDK_DROP_LIST"),B=F,U=new r.InjectionToken("CDK_DRAG_PARENT"),z=function(){function t(t,e){this.element=t,this._stateChanges=new n.Subject,this._disabled=!1,this._parentDrag=e,p(t.nativeElement,!1)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t),this._stateChanges.next(this)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._stateChanges.complete()},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDragHandle]",host:{class:"cdk-drag-handle"}}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:void 0,decorators:[{type:r.Inject,args:[U]},{type:r.Optional}]}]},t.propDecorators={disabled:[{type:r.Input,args:["cdkDragHandleDisabled"]}]},t}(),H=function(){function t(t){this.templateRef=t}return t.decorators=[{type:r.Directive,args:[{selector:"ng-template[cdkDragPlaceholder]"}]}],t.ctorParameters=function(){return[{type:r.TemplateRef}]},t.propDecorators={data:[{type:r.Input}]},t}(),Z=function(){function t(t){this.templateRef=t}return t.decorators=[{type:r.Directive,args:[{selector:"ng-template[cdkDragPreview]"}]}],t.ctorParameters=function(){return[{type:r.TemplateRef}]},t.propDecorators={data:[{type:r.Input}]},t}(),q=new r.InjectionToken("CDK_DRAG_CONFIG",{providedIn:"root",factory:I}),G=function(){function t(t,e,i,o,s,a,d,p,h){var l=this;this.element=t,this.dropContainer=e,this._document=i,this._ngZone=o,this._viewContainerRef=s,this._dir=d,this._changeDetectorRef=h,this._destroyed=new n.Subject,this.dragStartDelay=0,this._disabled=!1,this.started=new r.EventEmitter,this.released=new r.EventEmitter,this.ended=new r.EventEmitter,this.entered=new r.EventEmitter,this.exited=new r.EventEmitter,this.dropped=new r.EventEmitter,this.moved=new n.Observable(function(t){var e=l._dragRef.moved.pipe(c.map(function(t){return{source:l,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}})).subscribe(t);return function(){e.unsubscribe()}}),this._dragRef=p.createDrag(t,a),this._dragRef.data=this,this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}return Object.defineProperty(t.prototype,"boundaryElementSelector",{get:function(){return"string"==typeof this.boundaryElement?this.boundaryElement:void 0},set:function(t){this.boundaryElement=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t),this._dragRef.disabled=this._disabled},enumerable:!0,configurable:!0}),t.prototype.getPlaceholderElement=function(){return this._dragRef.getPlaceholderElement()},t.prototype.getRootElement=function(){return this._dragRef.getRootElement()},t.prototype.reset=function(){this._dragRef.reset()},t.prototype.getFreeDragPosition=function(){return this._dragRef.getFreeDragPosition()},t.prototype.ngAfterViewInit=function(){var t=this;this._ngZone.onStable.asObservable().pipe(c.take(1),c.takeUntil(this._destroyed)).subscribe(function(){t._updateRootElement(),t._handles.changes.pipe(c.startWith(t._handles),c.tap(function(e){var i=e.filter(function(e){return e._parentDrag===t}).map(function(t){return t.element});t._dragRef.withHandles(i)}),c.switchMap(function(t){return n.merge.apply(void 0,t.map(function(t){return t._stateChanges}))}),c.takeUntil(t._destroyed)).subscribe(function(e){var i=t._dragRef,n=e.element.nativeElement;e.disabled?i.disableHandle(n):i.enableHandle(n)}),t.freeDragPosition&&t._dragRef.setFreeDragPosition(t.freeDragPosition)})},t.prototype.ngOnChanges=function(t){var e=t.rootElementSelector,i=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()},t.prototype._updateRootElement=function(){var t=this.element.nativeElement,e=this.rootElementSelector?C(t,this.rootElementSelector):t;if(e&&e.nodeType!==this._document.ELEMENT_NODE)throw Error('cdkDrag must be attached to an element node. Currently attached to "'+e.nodeName+'".');this._dragRef.withRootElement(e||t)},t.prototype._getBoundaryElement=function(){var t=this.boundaryElement;if(!t)return null;if("string"==typeof t)return C(this.element.nativeElement,t);var e=i.coerceElement(t);if(r.isDevMode()&&!e.contains(this.element.nativeElement))throw Error("Draggable element is not inside of the node passed into cdkDragBoundary.");return e},t.prototype._syncInputs=function(t){var e=this;t.beforeStarted.subscribe(function(){if(!t.isDragging()){var n=e._dir,r=e._placeholderTemplate?{template:e._placeholderTemplate.templateRef,context:e._placeholderTemplate.data,viewContainer:e._viewContainerRef}:null,o=e._previewTemplate?{template:e._previewTemplate.templateRef,context:e._previewTemplate.data,viewContainer:e._viewContainerRef}:null;t.disabled=e.disabled,t.lockAxis=e.lockAxis,t.dragStartDelay=i.coerceNumberProperty(e.dragStartDelay),t.constrainPosition=e.constrainPosition,t.withBoundaryElement(e._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(o),n&&t.withDirection(n.value)}})},t.prototype._handleEvents=function(t){var e=this;t.started.subscribe(function(){e.started.emit({source:e}),e._changeDetectorRef.markForCheck()}),t.released.subscribe(function(){e.released.emit({source:e})}),t.ended.subscribe(function(t){e.ended.emit({source:e,distance:t.distance}),e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:t.container.data,item:e,currentIndex:t.currentIndex})}),t.exited.subscribe(function(t){e.exited.emit({container:t.container.data,item:e})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,
9
+ container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e,distance:t.distance})})},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDrag]",exportAs:"cdkDrag",host:{class:"cdk-drag","[class.cdk-drag-disabled]":"disabled","[class.cdk-drag-dragging]":"_dragRef.isDragging()"},providers:[{provide:U,useExisting:t}]}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:void 0,decorators:[{type:r.Inject,args:[F]},{type:r.Optional},{type:r.SkipSelf}]},{type:void 0,decorators:[{type:r.Inject,args:[o.DOCUMENT]}]},{type:r.NgZone},{type:r.ViewContainerRef},{type:void 0,decorators:[{type:r.Inject,args:[q]}]},{type:a.Directionality,decorators:[{type:r.Optional}]},{type:N},{type:r.ChangeDetectorRef}]},t.propDecorators={_handles:[{type:r.ContentChildren,args:[z,{descendants:!0}]}],_previewTemplate:[{type:r.ContentChild,args:[Z,{static:!1}]}],_placeholderTemplate:[{type:r.ContentChild,args:[H,{static:!1}]}],data:[{type:r.Input,args:["cdkDragData"]}],lockAxis:[{type:r.Input,args:["cdkDragLockAxis"]}],rootElementSelector:[{type:r.Input,args:["cdkDragRootElement"]}],boundaryElement:[{type:r.Input,args:["cdkDragBoundary"]}],dragStartDelay:[{type:r.Input,args:["cdkDragStartDelay"]}],freeDragPosition:[{type:r.Input,args:["cdkDragFreeDragPosition"]}],disabled:[{type:r.Input,args:["cdkDragDisabled"]}],constrainPosition:[{type:r.Input,args:["cdkDragConstrainPosition"]}],started:[{type:r.Output,args:["cdkDragStarted"]}],released:[{type:r.Output,args:["cdkDragReleased"]}],ended:[{type:r.Output,args:["cdkDragEnded"]}],entered:[{type:r.Output,args:["cdkDragEntered"]}],exited:[{type:r.Output,args:["cdkDragExited"]}],dropped:[{type:r.Output,args:["cdkDragDropped"]}],moved:[{type:r.Output,args:["cdkDragMoved"]}]},t}(),V=function(){function t(){this._items=new Set,this._disabled=!1}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this._items.clear()},t.decorators=[{type:r.Directive,args:[{selector:"[cdkDropListGroup]",exportAs:"cdkDropListGroup"}]}],t.propDecorators={disabled:[{type:r.Input,args:["cdkDropListGroupDisabled"]}]},t}(),W=0,K=function(){function t(e,i,o,s,a){var c=this;this.element=e,this._changeDetectorRef=o,this._dir=s,this._group=a,this._destroyed=new n.Subject,this.connectedTo=[],this.orientation="vertical",this.id="cdk-drop-list-"+W++,this._disabled=!1,this._sortingDisabled=!1,this.enterPredicate=function(){return!0},this.dropped=new r.EventEmitter,this.entered=new r.EventEmitter,this.exited=new r.EventEmitter,this.sorted=new r.EventEmitter,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,this._dropListRef.enterPredicate=function(t,e){return c.enterPredicate(t.data,e.data)},this._syncInputs(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),a&&a._items.add(this)}return Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._disabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sortingDisabled",{get:function(){return this._sortingDisabled},set:function(t){this._sortingDisabled=i.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._draggables.changes.pipe(c.startWith(this._draggables),c.takeUntil(this._destroyed)).subscribe(function(e){t._dropListRef.withItems(e.map(function(t){return t._dragRef}))})},t.prototype.ngOnDestroy=function(){var e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()},t.prototype.start=function(){this._dropListRef.start()},t.prototype.drop=function(t,e,i,n){this._dropListRef.drop(t._dragRef,e,i._dropListRef,n)},t.prototype.enter=function(t,e,i){this._dropListRef.enter(t._dragRef,e,i)},t.prototype.exit=function(t){this._dropListRef.exit(t._dragRef)},t.prototype.getItemIndex=function(t){return this._dropListRef.getItemIndex(t._dragRef)},t.prototype._sortItem=function(t,e,i,n){return this._dropListRef._sortItem(t._dragRef,e,i,n)},t.prototype._getSiblingContainerFromPosition=function(t,e,i){var n=this._dropListRef._getSiblingContainerFromPosition(t._dragRef,e,i);return n?n.data:null},t.prototype._isOverContainer=function(t,e){return this._dropListRef._isOverContainer(t,e)},t.prototype._syncInputs=function(e){var n=this;this._dir&&this._dir.change.pipe(c.startWith(this._dir.value),c.takeUntil(this._destroyed)).subscribe(function(t){return e.withDirection(t)}),e.beforeStarted.subscribe(function(){var r=i.coerceArray(n.connectedTo).map(function(e){return"string"==typeof e?t._dropLists.find(function(t){return t.id===e}):e});n._group&&n._group._items.forEach(function(t){-1===r.indexOf(t)&&r.push(t)}),e.disabled=n.disabled,e.lockAxis=n.lockAxis,e.sortingDisabled=n.sortingDisabled,e.connectedTo(r.filter(function(t){return t&&t!==n}).map(function(t){return t._dropListRef})).withOrientation(n.orientation)})},t.prototype._handleEvents=function(t){var e=this;t.beforeStarted.subscribe(function(){e._changeDetectorRef.markForCheck()}),t.entered.subscribe(function(t){e.entered.emit({container:e,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(function(t){e.exited.emit({container:e,item:t.item.data}),e._changeDetectorRef.markForCheck()}),t.sorted.subscribe(function(t){e.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:e,item:t.item.data})}),t.dropped.subscribe(function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),e._changeDetectorRef.markForCheck()})},t._dropLists=[],t.decorators=[{type:r.Directive,args:[{selector:"[cdkDropList], cdk-drop-list",exportAs:"cdkDropList",providers:[{provide:V,useValue:void 0},{provide:B,useExisting:t}],host:{class:"cdk-drop-list","[id]":"id","[class.cdk-drop-list-disabled]":"disabled","[class.cdk-drop-list-dragging]":"_dropListRef.isDragging()","[class.cdk-drop-list-receiving]":"_dropListRef.isReceiving()"}}]}],t.ctorParameters=function(){return[{type:r.ElementRef},{type:N},{type:r.ChangeDetectorRef},{type:a.Directionality,decorators:[{type:r.Optional}]},{type:V,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]},t.propDecorators={_draggables:[{type:r.ContentChildren,args:[r.forwardRef(function(){return G}),{descendants:!1}]}],connectedTo:[{type:r.Input,args:["cdkDropListConnectedTo"]}],data:[{type:r.Input,args:["cdkDropListData"]}],orientation:[{type:r.Input,args:["cdkDropListOrientation"]}],id:[{type:r.Input}],lockAxis:[{type:r.Input,args:["cdkDropListLockAxis"]}],disabled:[{type:r.Input,args:["cdkDropListDisabled"]}],sortingDisabled:[{type:r.Input,args:["cdkDropListSortingDisabled"]}],enterPredicate:[{type:r.Input,args:["cdkDropListEnterPredicate"]}],dropped:[{type:r.Output,args:["cdkDropListDropped"]}],entered:[{type:r.Output,args:["cdkDropListEntered"]}],exited:[{type:r.Output,args:["cdkDropListExited"]}],sorted:[{type:r.Output,args:["cdkDropListSorted"]}]},t}(),Y=function(){function t(){}return t.decorators=[{type:r.NgModule,args:[{declarations:[K,V,G,z,Z,H],exports:[K,V,G,z,Z,H],providers:[N]}]}],t}();t.DragDrop=N,t.DragRef=O,t.DropListRef=L,t.CdkDropList=K,t.CDK_DROP_LIST=F,t.CDK_DROP_LIST_CONTAINER=B,t.moveItemInArray=D,t.transferArrayItem=b,t.copyArrayItem=E,t.DragDropModule=Y,t.DragDropRegistry=A,t.CdkDropListGroup=V,t.CDK_DRAG_CONFIG_FACTORY=I,t.CDK_DRAG_CONFIG=q,t.CdkDrag=G,t.CdkDragHandle=z,t.CdkDragPreview=Z,t.CdkDragPlaceholder=H,t.ɵb=U,Object.defineProperty(t,"__esModule",{value:!0})});
10
10
  //# sourceMappingURL=cdk-drag-drop.umd.min.js.map