AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 3.21.97.173
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/js/ui/draganddrop/draggable/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/js/ui/draganddrop/draggable/dist/draggable.bundle.min.js
this.BX=this.BX||{};this.BX.UI=this.BX.UI||{};(function(t,e,n){"use strict";class s extends n.Event.BaseEvent{constructor(t){super({data:t})}}class i extends s{}class r extends e.EventEmitter{constructor(t=[],e={}){super();this.originalDragStartEvent=null;this.dragStartEvent=null;this.setEventNamespace("BX.UI.DragAndDrop.Draggable.Sensor");const{dropzone:s}=e;this.containers=n.Type.isArray(t)?[...t]:[t];this.dropzones=n.Type.isArrayLike(s)?[...s]:[s];this.options={delay:0,...e}}getDocument(){return this.options.context.document}addContainer(...t){this.containers=[...this.containers,...t]}removeContainer(...t){this.containers=this.containers.filter((e=>!t.includes(e)))}getContainerByChild(t){return this.containers.find((e=>e.contains(t)))}addDropzone(...t){this.dropzones=[...this.dropzones,...t]}removeDropzone(...t){this.dropzones=this.dropzones.filter((e=>!t.includes(e)))}getDropzoneByChild(t){return this.dropzones.find((e=>e.contains(t)))}getElementFromPoint(t,e){return this.getDocument().elementFromPoint(t,e)}preventDefaultEventAction(t){if(t.cancelable){t.preventDefault()}}isDragging(){return this.dragStartEvent&&!this.dragStartEvent.isDefaultPrevented()}enable(){return this}disable(){return this}getDragElementByChild(t){if(t){const{dragElement:e}=this.options;return t.closest(e)||null}return null}}class o extends s{}class a extends s{}class h extends s{}class l extends r{constructor(t=[],e={}){super(t,e);this.mousedownTimeoutId=null;this.onMouseDown=this.onMouseDown.bind(this);this.onMouseMove=this.onMouseMove.bind(this);this.onMouseUp=this.onMouseUp.bind(this);this.onDragStart=this.onDragStart.bind(this)}enable(){n.Event.bind(this.getDocument(),"mousedown",this.onMouseDown,{capture:true})}disable(){n.Event.unbind(this.getDocument(),"mousedown",this.onMouseDown,{capture:true})}startHandleMouseUp(){n.Event.bind(this.getDocument(),"mouseup",this.onMouseUp)}stopHandleMouseUp(){n.Event.unbind(this.getDocument(),"mouseup",this.onMouseUp)}startHandleMouseMove(){n.Event.bind(this.getDocument(),"mousemove",this.onMouseMove)}stopHandleMouseMove(){n.Event.unbind(this.getDocument(),"mousemove",this.onMouseMove)}startPreventContextMenu(){n.Event.bind(this.getDocument(),"contextmenu",this.preventDefaultEventAction,{capture:true})}stopPreventContextMenu(){n.Event.unbind(this.getDocument(),"contextmenu",this.preventDefaultEventAction,{capture:true})}startPreventNativeDragAndDrop(){n.Event.bind(this.getDocument(),"dragstart",this.preventDefaultEventAction)}stopPreventNativeDragAndDrop(){n.Event.unbind(this.getDocument(),"dragstart",this.preventDefaultEventAction)}onMouseDown(t){if(!t.ctrlKey&&!t.metaKey&&!t.button){this.originalDragStartEvent=t;const e=this.getContainerByChild(t.target);if(e){const e=this.getDragElementByChild(t.target);if(e){this.startHandleMouseUp();this.startPreventNativeDragAndDrop();this.mousedownTimeoutId=setTimeout((()=>{this.onDragStart()}),this.options.delay)}}}}onDragStart(){const t=this.getContainerByChild(this.originalDragStartEvent.target);this.dragStartEvent=new i({clientX:this.originalDragStartEvent.clientX,clientY:this.originalDragStartEvent.clientY,originalSource:this.originalDragStartEvent.target,originalEvent:this.originalDragStartEvent,sourceContainer:t});this.emit("drag:start",this.dragStartEvent);if(this.isDragging()){this.startPreventContextMenu();this.startHandleMouseMove()}}onMouseMove(t){if(this.isDragging()){const{clientX:e,clientY:n}=t;const s=this.getElementFromPoint(e,n);const i=this.getContainerByChild(s);const{originalSource:r,sourceContainer:a}=this.dragStartEvent.data;const h=new o({clientX:e,clientY:n,originalSource:r,sourceContainer:a,over:s,overContainer:i,originalEvent:t});this.emit("drag:move",h)}}onMouseUp(t){clearTimeout(this.mousedownTimeoutId);this.stopHandleMouseUp();this.stopPreventNativeDragAndDrop();if(this.isDragging()){const{clientX:e,clientY:n}=t;const s=this.getElementFromPoint(e,n);const i=this.getContainerByChild(s);const{originalSource:r,sourceContainer:o}=this.dragStartEvent.data;const l=new a({clientX:e,clientY:n,originalSource:r,sourceContainer:o,over:s,overContainer:i,originalEvent:t});this.emit("drag:end",l);if(!l.isDefaultPrevented()){const a=this.getDropzoneByChild(s);if(a){const l=new h({clientX:e,clientY:n,originalSource:r,sourceContainer:o,over:s,overContainer:i,originalEvent:t,dropzone:a});this.emit("drag:drop",l)}}this.stopPreventContextMenu();this.stopHandleMouseMove()}this.originalDragStartEvent=null}}let c=false;n.Event.bind("touchmove",(t=>{if(c){t.preventDefault()}}),{passive:false});class g extends r{constructor(t=[],e={}){super(t,e);this.tapTimeoutId=null;this.touchMoved=false;this.onTouchStart=this.onTouchStart.bind(this);this.onTouchEnd=this.onTouchEnd.bind(this);this.onTouchMove=this.onTouchMove.bind(this);this.onDragStart=this.onDragStart.bind(this)}enable(){n.Event.bind(this.getDocument(),"touchstart",this.onTouchStart)}disable(){n.Event.unbind(this.getDocument(),"touchstart",this.onTouchStart)}isTouchMoved(){return this.touchMoved}startPreventScrolling(){c=true}stopPreventScrolling(){c=false}startPreventContextMenu(){n.Event.bind(this.getDocument(),"contextmenu",this.preventDefaultEventAction,{capture:true})}stopPreventContextMenu(){n.Event.unbind(this.getDocument(),"contextmenu",this.preventDefaultEventAction,{capture:true})}startHandleTouchEvents(){n.Event.bind(this.getDocument(),"touchmove",this.onTouchMove);n.Event.bind(this.getDocument(),"touchend",this.onTouchEnd);n.Event.bind(this.getDocument(),"touchcancel",this.onTouchEnd)}stopHandleTouchEvents(){n.Event.unbind(this.getDocument(),"touchmove",this.onTouchMove);n.Event.unbind(this.getDocument(),"touchend",this.onTouchEnd);n.Event.unbind(this.getDocument(),"touchcancel",this.onTouchEnd)}onTouchStart(t){const e=this.getContainerByChild(t.target);if(e){const e=this.getDragElementByChild(t.target);if(e){this.originalDragStartEvent=t;this.startHandleTouchEvents();this.startPreventContextMenu();this.startPreventScrolling();this.tapTimeoutId=setTimeout((()=>{if(!this.isTouchMoved()){this.onDragStart()}}),this.options.delay)}}}onDragStart(){const t=this.originalDragStartEvent.touches[0]||this.originalDragStartEvent.changedTouches[0];const e=this.getContainerByChild(this.originalDragStartEvent.target);this.dragStartEvent=new i({clientX:t.clientX,clientY:t.clientY,originalSource:this.originalDragStartEvent.target,originalEvent:this.originalDragStartEvent,sourceContainer:e});this.emit("drag:start",this.dragStartEvent)}onTouchMove(t){this.touchMoved=true;if(this.isDragging()){const e=t.touches[0]||t.changedTouches[0];const{clientX:n,clientY:s}=e;const i=this.getElementFromPoint(n,s);const r=this.getContainerByChild(i);const{originalSource:a,sourceContainer:h}=this.dragStartEvent.data;const l=new o({clientX:n,clientY:s,originalSource:a,sourceContainer:h,over:i,overContainer:r,originalEvent:t});this.emit("drag:move",l)}}onTouchEnd(t){clearTimeout(this.tapTimeoutId);this.stopPreventScrolling();this.stopPreventContextMenu();this.stopHandleTouchEvents();if(this.isDragging()){const e=t.touches[0]||t.changedTouches[0];const{clientX:n,clientY:s}=e;const i=this.getElementFromPoint(n,s);const r=this.getContainerByChild(i);const{originalSource:o,sourceContainer:l}=this.dragStartEvent.data;const c=new a({clientX:n,clientY:s,originalSource:o,sourceContainer:l,over:i,overContainer:r,originalEvent:t});this.emit("drag:end",c);if(!c.isDefaultPrevented()){const e=this.getDropzoneByChild(i);if(e){const a=new h({clientX:n,clientY:s,originalSource:o,sourceContainer:l,over:i,overContainer:r,originalEvent:t,dropzone:e});this.emit("drag:drop",a)}}}this.originalDragStartEvent=null;this.dragStartEvent=null;this.touchMoved=false}}class u extends s{}class d extends s{}class p extends s{}class m extends s{}class D extends s{}class v extends s{}class f extends s{}class E extends s{}class b extends s{}class C extends s{}class y extends s{}class S extends s{}class O extends s{}class x extends s{}let T=t=>t,P,M,w;const z=[l,g];const B=Symbol("options");const X=Symbol("sensors");const A=Symbol("containers");const L=Symbol("dropzones");class N extends e.EventEmitter{constructor(t={}){super(t);this[B]={delay:0,sensors:[],draggable:".ui-draggable--item",type:"move",transitionDuration:150,dropzone:[],context:window,offset:{x:0,y:0}};this[A]=[];this[L]=[];this[X]=[];this.dragStartEvent=null;this.setEventNamespace("BX.UI.DragAndDrop.Draggable");this.cache=new n.Cache.MemoryCache;this.onDragStart=this.onDragStart.bind(this);this.onDragMove=this.onDragMove.bind(this);this.onDragEnd=this.onDragEnd.bind(this);this.onDragDrop=this.onDragDrop.bind(this);if(n.Type.isArray(t.container)||n.Type.isDomNode(t.container)||t.container instanceof NodeList){if(t.container instanceof NodeList){this.addContainer(...t.container)}else{this.addContainer(...[t.container].flat())}}else{throw new Error("Option container not a HTMLElement, Array of HTMLElement or NodeList")}if(!n.Type.isNil(t.dropzone)&&(n.Type.isArray(t.dropzone)||n.Type.isDomNode(t.dropzone)||t.dropzone instanceof NodeList)){if(t.dropzone instanceof NodeList){this.addDropzone(...t.dropzone)}else{this.addDropzone(...[t.dropzone].flat())}}this.setOptions({...this.getOptions(),...t});const{sensors:e}=this.getOptions();this.addSensor(...z,...e)}getDocument(){return this.getOptions().context.document}getOptions(){return this[B]}setOptions(t){this[B]={...t};if(!n.Type.isString(this[B].dragElement)){this[B].dragElement=this[B].draggable}if(!n.Type.isPlainObject(this[B].offset)){this[B].offset={x:0,y:0}}if(!n.Type.isNumber(this[B].offset.x)){this[B].offset.x=0}if(!n.Type.isNumber(this[B].offset.y)){this[B].offset.y=0}this.invalidateCache()}isDragging(){return this.dragStartEvent&&!this.dragStartEvent.isDefaultPrevented()}getSensors(){return this[X]}addSensor(...t){const e=t.map((t=>{const e=new t(this.getContainers(),this.getOptions());e.subscribe("drag:start",this.onDragStart);e.subscribe("drag:move",this.onDragMove);e.subscribe("drag:end",this.onDragEnd);e.subscribe("drag:drop",this.onDragDrop);e.enable();return e}));this[X]=[...this.getSensors(),...e]}removeSensor(...t){const e=this.getSensors().filter((e=>t.includes(e.constructor)));e.forEach((t=>{t.unsubscribe("drag:start",this.onDragStart);t.unsubscribe("drag:move",this.onDragMove);t.unsubscribe("drag:end",this.onDragEnd);t.unsubscribe("drag:drop",this.onDragDrop);t.enable()}));this[X]=this.getSensors().filter((t=>!e.includes(t)))}getContainers(){return this[A]}getContainerByChild(t){return this.getContainers().find((e=>e.contains(t)))}addContainer(...t){this[A]=[...this.getContainers(),...t];this[A].forEach((t=>{n.Dom.addClass(t,"ui-draggable--container")}));this.getSensors().forEach((e=>{e.addContainer(...t)}));this.invalidateContainersCache()}removeContainer(...t){this[A]=this.getContainers().filter((e=>!t.includes(e)));this.getSensors().forEach((e=>{e.removeContainer(...t)}));this.invalidateContainersCache()}getDropzones(){return this[L]}getDropzoneByChild(t){return this.getDropzones().find((e=>e.contains(t)))}addDropzone(...t){this[L]=[...this.getDropzones(),...t];this[L].forEach((t=>{n.Dom.addClass(t,"ui-draggable--dropzone")}));this.getSensors().forEach((e=>{e.addDropzone(...t)}))}removeDropzone(...t){this[L]=this.getContainers().filter((e=>!t.includes(e)));this.getSensors().forEach((e=>{e.removeDropzone(...t)}))}getDraggableElements(){return this.cache.remember("draggableElements",(()=>this.getContainers().reduce(((t,e)=>[...t,...this.getDraggableElementsOfContainer(e)]),[])))}getDraggableElementsOfContainer(t){return this.cache.remember(t,(()=>{const e=this.getOptions().draggable;const n=":not(.ui-draggable--draggable)";const s=":not(.ui-draggable--drop-preview)";const i=`${n}${s}`;const r=`${e}${i}`;const o=[...t.querySelectorAll(r)];return o.filter((e=>e.parentElement===t))}))}getLastDraggableElementOfContainer(t){const e=this.getDraggableElementsOfContainer(t);return e[e.length-1]||null}getElementIndex(t){return this.getDraggableElements().indexOf(t)}getDropPreview(){return this.cache.remember("dropPreview",(()=>{const{type:t}=this.getOptions();const e=this.getSource();if(e===null){return n.Tag.render(P||(P=T`<div></div>`))}const s=this.getSourceClientRect();let i=null;if(t===N.CLONE){i=n.Runtime.clone(e);n.Dom.addClass(i,"ui-draggable--drop-preview-clone")}else{i=n.Tag.render(M||(M=T`<div></div>`))}n.Dom.addClass(i,"ui-draggable--drop-preview");n.Dom.style(i,{width:`${s.width}px`,height:`${s.height}px`});return i}))}move(t,{x:e=0,y:s=0}){const{transitionDuration:i}=this.getOptions();requestAnimationFrame((()=>{n.Dom.style(t,{transform:`translate3d(${e}px, ${s}px, 0px)`,transition:`all ${i}ms ease 0s`})}))}setSource(t){this.cache.set("source",t||null)}getSource(){return this.cache.get("source")||null}getSourceClientRect(){return this.cache.remember("sourceClientRect",(()=>this.cache.get("source").getBoundingClientRect()))}adjustDropPreview(t,e={}){const{x:s=false,y:i=false,force:r=true,skipOffset:o=false,transition:a=true}=e;const h=this.getDropPreview();const l=n.Dom.getRelativePosition(t,t.parentElement);const c=n.Dom.getRelativePosition(h,h.parentElement);let g=0;if(c.height!==0&&!o){if(l.height>c.height){if(l.top>c.top){g=l.height-c.height}}else if(l.top>c.top){g=-Math.abs(l.height-c.height)}}const{transitionDuration:u}=this.getOptions();const d=()=>{const t={transition:a?`all ${u}ms ease 0ms`:"null"};if(i){t.top=`${l.top+g}px`}if(s){t.left=`${l.left}px`}n.Dom.style(h,t)};if(r){d()}else{requestAnimationFrame(d)}}showDropPreviewAfter(t){const e=n.Dom.getRelativePosition(t,t.parentElement);const s=n.Text.toNumber(n.Dom.style(t,"margin-bottom"));const i=n.Text.toNumber(n.Dom.style(t,"margin-top"));const r=e.bottom+s+i;const{transitionDuration:o}=this.getOptions();requestAnimationFrame((()=>{n.Dom.style(this.getDropPreview(),{top:`${r}px`,transition:`all ${o}ms ease 0s`})}))}pushDraggableElementToContainer(t,e){const s=this.getLastDraggableElementOfContainer(e);if(s){n.Dom.insertAfter(t,s)}else{n.Dom.append(t,e)}this.invalidateContainersCache()}resetDraggableElementsPosition(t,{transition:e=true}={}){const s=(()=>{if(t){return this.getDraggableElementsOfContainer(t)}return this.getDraggableElements()})();s.forEach((t=>{n.Dom.style(t,{transform:null,transition:e?undefined:"none"})}))}resetDraggableElementsTransition(t){const e=(()=>{if(t){return this.getDraggableElementsOfContainer(t)}return this.getDraggableElements()})();e.forEach((t=>{n.Dom.style(t,{transition:null})}))}getSortOffsetY(){return this.cache.remember("sortOffsetY",(()=>{const t=this.getSource();const e=this.getSourceClientRect();const s=n.Text.toNumber(n.Dom.style(t,"margin-top"));const i=n.Text.toNumber(n.Dom.style(t,"margin-bottom"));return Math.round(e.height+(s+i))}))}getSortOffsetX(){return this.cache.remember("sortOffsetX",(()=>{const t=this.getSource();const e=this.getSourceClientRect();const s=n.Text.toNumber(n.Dom.style(t,"margin-left"));const i=n.Text.toNumber(n.Dom.style(t,"margin-right"));return e.width+(s+i)}))}getElementMiddlePoint(t){const e=t.getBoundingClientRect();return{x:e.left+e.width/2,y:e.top+e.height/2}}getDraggableElementByChild(t){return t.closest(this.getOptions().draggable)}splitDraggableElementsListByPoint(t,e){let n=true;return this.getDraggableElementsOfContainer(t).reduce(((t,s)=>{if(n){const i=this.getElementMiddlePoint(s);if(i.y<e.y){t[0].push(s)}else{t[1].push(s);n=false}}else{t[1].push(s)}return t}),[[],[]])}invalidateContainersCache(){this.cache.delete("draggableElements");this.getContainers().forEach((t=>this.cache.delete(t)))}invalidateCache(){this.cache.delete("source");this.cache.delete("sourceClientRect");this.cache.delete("dropPreview");this.cache.delete("sortOffsetY");this.cache.delete("sortOffsetX");this.cache.delete("sourceLeftOffset");this.cache.delete("sourceLeftMargin");this.invalidateContainersCache()}isDepthEditorEnabled(){const{depth:t,type:e}=this.getOptions();return n.Type.isPlainObject(t)&&(e===N.DROP_PREVIEW||e===N.CLONE)}getDepthProperty(){const{depth:t}=this.getOptions();return t.property||"margin-left"}getDepthMargin(){const{depth:t}=this.getOptions();return n.Text.toNumber(t.margin)||20}getElementDepth(t){return n.Text.toNumber(n.Dom.attr(t,"data-depth"))}setElementDepth(t,e){n.Dom.attr(t,"data-depth",e);const s=this.getDepthMargin();const i=this.getSourceLeftMargin();const r=s*e+i;n.Dom.style(t,this.getDepthProperty(),`${r}px`)}getStartSourceDepth(){return this.dragStartEvent.data.sourceDepth}getSourceWidth(){return this.getSourceClientRect().width}getSourceLeftOffset(){return this.cache.remember("sourceLeftOffset",(()=>{const t=this.getSource();const e=n.Dom.getRelativePosition(t,t.parentElement);const s=this.getStartSourceDepth()*this.getDepthMargin();return e.left-s}))}getSourceLeftMargin(){return this.cache.remember("sourceLeftMargin",(()=>{const t=this.getSource();const e=this.getStartSourceDepth();const s=this.getDepthMargin();const i=e*s;const r=n.Text.toNumber(n.Dom.style(t,this.getDepthProperty()));return r-i}))}setDropPreviewDepth(t){const e=this.getStartSourceDepth();const s=this.getSourceWidth();const i=this.getDepthMargin();const r=this.getSourceLeftOffset();const o=(()=>{const n=Math.abs(e-t);if(t>e){return s-n*i}if(t<e){return s+n*i}return s})();n.Dom.style(this.getDropPreview(),{left:`${t*i+r}px`,width:`${o}px`})}calcDepthByOffset(t){const e=this.getStartSourceDepth();const n=this.getDepthMargin();const s=e*n;return Math.max(0,Math.floor((t+s)/n))}getChildren(t){const e=this.getElementDepth(t);const n=t.getBoundingClientRect();const s=this.getContainerByChild(t);const[,i]=this.splitDraggableElementsListByPoint(s,{x:n.left,y:n.bottom});let r=false;return i.reduce(((t,n)=>{if(!r){const s=this.getElementDepth(n);if(s>e){return[...t,n]}r=true}return t}),[])}getPreviousElement(t){const e=t.getBoundingClientRect();const s=this.getContainerByChild(t);const[i]=this.splitDraggableElementsListByPoint(s,{x:e.left,y:e.top});if(n.Type.isArrayFilled(i)){return i.pop()}return null}onDragStart(t){const{originalSource:e,sourceContainer:s,clientX:i,clientY:r}=t.data;const o=this.getDraggableElementByChild(e);const a=new u({clientX:i,clientY:r,source:o,sourceContainer:s,originalSource:e});this.emit("beforeStart",a);if(a.isDefaultPrevented()){t.preventDefault();return}this.setSource(o);const h=this.getElementDepth(o);const l=this.getSourceClientRect();const c=i-l.left;const g=r-l.top;const{type:p}=this.getOptions();let m=o;if(p!==N.HEADLESS){const t=n.Runtime.clone(o);n.Dom.style(t,"margin",0);m=n.Tag.render(w||(w=T`<div>${0}</div>`),t);n.Dom.style(m,{width:`${l.width}px`,height:`${l.height}px`,top:`${r-g+this.getOptions().offset.y}px`,left:`${i-c+this.getOptions().offset.x}px`});n.Dom.addClass(m,"ui-draggable--draggable");this.pushDraggableElementToContainer(m,s);if(this.isDepthEditorEnabled()){const e=this.getChildren(o);this.childrenElements=e;if(e.length>0){n.Dom.append(n.Runtime.clone(t),m);e.forEach((t=>{n.Dom.style(t,"display","none")}))}}}const D=this.getDropPreview();if(p===N.DROP_PREVIEW||p===N.CLONE){this.pushDraggableElementToContainer(D,s);this.adjustDropPreview(o,{force:true,x:true,y:true,transition:false})}n.Dom.addClass(o,"ui-draggable--source");n.Dom.addClass(this.getDocument().body,"ui-draggable--disable-user-select");n.Dom.addClass(this.getDocument().body,`ui-draggable--type-${this.getOptions().type}`);const v=this.getElementIndex(o);this.dragStartEvent=new d({clientX:i,clientY:r,pointerOffsetX:c,pointerOffsetY:g,draggable:m,dropPreview:D,source:o,sourceIndex:v,sourceContainer:s,sourceDepth:h,originalSource:e});this.emit("start",this.dragStartEvent);if(this.dragStartEvent.isDefaultPrevented()){t.preventDefault()}}onDragMove(t){if(!this.isDragging()){return}const{clientX:e,clientY:s,sourceContainer:i,originalSource:r}=t.data;const{clientX:o,clientY:a,pointerOffsetX:h,pointerOffsetY:l,source:c,sourceIndex:g,draggable:u,dropPreview:d}=this.dragStartEvent.data;const C=e-o;const x=s-a;const T=new p({clientX:e,clientY:s,offsetX:C,offsetY:x,pointerOffsetX:h,pointerOffsetY:l,draggable:u,dropPreview:d,source:c,sourceIndex:g,sourceContainer:i,originalSource:r});this.emit("move",T);if(T.isDefaultPrevented()){t.preventDefault()}if(!n.Type.isDomNode(t.data.over)){return}const P=t.data.over;const M=this.getDraggableElementByChild(P);const w=this.getContainerByChild(P);const{type:z}=this.getOptions();if(z!==N.HEADLESS){n.Dom.style(u,{top:`${s-l+this.getOptions().offset.y}px`,left:`${e-h+this.getOptions().offset.x}px`});if(w&&w.contains(c)&&!this.stopMove){const t=this.getSortOffsetY();const e=this.getDraggableElementsOfContainer(w);const n=e.indexOf(c);e.forEach(((e,i)=>{if(e!==c){const r=e.style.transform;const o=this.getElementMiddlePoint(e);if(o.y===0){return}if(i>n&&s>o.y&&r!==`translate3d(0px, ${-t}px, 0px)`){this.adjustDropPreview(e,{y:true});this.move(e,{y:-t});this.insertType="after";this.insertElement=e}if(i<n&&s<o.y&&r!==`translate3d(0px, ${t}px, 0px)`){this.adjustDropPreview(e,{y:true});this.move(e,{y:t});this.insertType="before";this.insertElement=e}if((i<n&&s>o.y||i>n&&s<o.y)&&r!=="translate3d(0px, 0px, 0px)"&&r!==""){this.adjustDropPreview(e,{y:true});this.move(e,{y:0});this.insertElement=e;if(i<n&&s>o.y){this.insertType="after"}if(i>n&&s<o.y){this.insertType="before"}}}}))}}if(this.isDepthEditorEnabled()){let t=this.calcDepthByOffset(C);const e=this.getPreviousElement(d);if(e){const n=this.getElementDepth(e);const s=0;const i=Math.max(s,n+1);t=Math.max(s,Math.min(t,i))}else{t=0}this.setDropPreviewDepth(t);this.currentDepth=t}if(n.Type.isDomNode(M)&&c!==M){const t=new m({...T.data,over:M,originalOver:P,overContainer:w});this.emit("over",t);if(!t.isDefaultPrevented()){n.Dom.addClass(M,"ui-draggable--over")}if(M!==this.lastOver){const t=new v({...T.data,enter:M,enterContainer:w});this.emit("enter",t)}}this.lastOver=this.lastOver||M;if(!M||M!==this.lastOver){if(this.lastOver){const t=this.getContainerByChild(this.lastOver);const e=new E({...T,out:this.lastOver,outContainer:t});this.emit("out",e);n.Dom.removeClass(this.lastOver,"ui-draggable--over")}this.lastOver=M}const B=this.getDocument().elementFromPoint(e,s);const X=this.getDropzoneByChild(B);if(X){const t=new y({...T.data,dropzone:X});this.emit("dropzone:over",t);if(X!==this.lastOverDropzone){const t=new S({...T.data,dropzone:X});this.emit("dropzone:enter",t)}}this.lastOverDropzone=this.lastOverDropzone||X;if(X!==this.lastOverDropzone){const t=new O({...T.data,dropzone:this.lastOverDropzone});this.emit("dropzone:out",t);this.lastOverDropzone=X}if(w){const t=new D({...T.data,over:w});this.emit("container:over",t);if(w!==this.lastOverContainer){const t=new f({...T.data,enter:w});this.emit("container:enter",t);if(!w.contains(c)){const t=this.getContainerByChild(c);const[i,r]=this.splitDraggableElementsListByPoint(w,{x:e,y:s});if(z===N.DROP_PREVIEW||z===N.CLONE){this.stopMove=true;setTimeout((()=>{this.stopMove=false}),300);this.pushDraggableElementToContainer(this.getDropPreview(),w)}if(z!==N.HEADLESS){this.pushDraggableElementToContainer(c,w)}if(n.Type.isArrayFilled(i)){const t=i[i.length-1];if(z===N.DROP_PREVIEW||z===N.CLONE){this.showDropPreviewAfter(t)}this.insertType="after";this.insertElement=t}else if(n.Type.isArrayFilled(r)){const[t]=r;if(z===N.DROP_PREVIEW||z===N.CLONE){this.adjustDropPreview(r)}this.insertType="before";this.insertElement=t}this.resetDraggableElementsTransition(t);this.resetDraggableElementsPosition(t);if(z!==N.HEADLESS&&n.Type.isArrayFilled(r)){const t=this.getSortOffsetY();r.forEach((e=>{this.move(e,{y:t})}))}}}}this.lastOverContainer=this.lastOverContainer||w;if(w!==this.lastOverContainer){const t=new b({...T.data,out:this.lastOverContainer});this.emit("container:out",t);this.lastOverContainer=w}}onDragEnd(t){const e=new C({...this.dragStartEvent.data,clientX:t.data.clientX,clientY:t.data.clientY,end:this.lastOver,endContainer:this.lastOverContainer});const{source:s,draggable:i}=this.dragStartEvent.data;if(this.getOptions().type!==N.HEADLESS){n.Dom.remove(i)}n.Dom.removeClass(s,"ui-draggable--source");this.getDraggableElements().forEach((t=>{n.Dom.removeClass(t,"ui-draggable--draggable");n.Dom.removeClass(t,"ui-draggable--over")}));n.Dom.remove(this.getDropPreview());this.resetDraggableElementsPosition();this.resetDraggableElementsTransition();if(this.getOptions().type!==N.HEADLESS&&n.Type.isString(this.insertType)){if(this.insertType==="after"){n.Dom.insertAfter(s,this.insertElement)}else{n.Dom.insertBefore(s,this.insertElement)}}if(this.isDepthEditorEnabled()){const t=this.getStartSourceDepth();const e=(()=>{if(n.Type.isNumber(this.currentDepth)){return this.currentDepth-t}return 0})();let i=s;this.childrenElements.forEach((t=>{const s=this.getElementDepth(t);this.setElementDepth(t,s+e);n.Dom.insertAfter(t,i);n.Dom.style(t,"display",null);i=t}));if(n.Type.isNumber(this.currentDepth)){this.setElementDepth(s,this.currentDepth)}}this.lastOver=null;this.lastOverContainer=null;this.insertType=null;this.lastOverDropzone=null;this.childrenElements=[];this.currentDepth=null;this.invalidateCache();n.Dom.removeClass(this.getDocument().body,"ui-draggable--disable-user-select");n.Dom.removeClass(this.getDocument().body,`ui-draggable--type-${this.getOptions().type}`);this.emit("end",e)}onDragDrop(t){const e=new x({...this.dragStartEvent.data,clientX:t.data.clientX,clientY:t.data.clientY,dropzone:t.data.dropzone});this.emit("drop",e)}}N.MOVE="move";N.CLONE="clone";N.DROP_PREVIEW="drop-preview";N.HEADLESS="headless";t.Draggable=N;t.DragStartEvent=d;t.DragMoveEvent=p;t.DragOutEvent=E;t.DragOutContainerEvent=b;t.DragEndEvent=C;t.DragOverEvent=m;t.DragOverContainerEvent=D;t.DragEnterEvent=v;t.DragEnterContainerEvent=f})(this.BX.UI.DragAndDrop=this.BX.UI.DragAndDrop||{},BX.Event,BX);
//# sourceMappingURL=draggable.bundle.map.js

Anon7 - 2022
AnonSec Team