Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/backend/node_modules/react-dnd-html5-backend/dist/umd/ReactDnDHTML5Backend.min.js
Назад
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).ReactDnDHTML5Backend={})}(this,(function(e){"use strict";function t(e){var t=null;return function(){return null==t&&(t=e()),t}}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var n=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.entered=[],this.isNodeInDocument=t}var t,n,a;return t=e,(n=[{key:"enter",value:function(e){var t=this,r=this.entered.length;return this.entered=function(e,t){var r=new Set,n=function(e){return r.add(e)};e.forEach(n),t.forEach(n);var a=[];return r.forEach((function(e){return a.push(e)})),a}(this.entered.filter((function(r){return t.isNodeInDocument(r)&&(!r.contains||r.contains(e))})),[e]),0===r&&this.entered.length>0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&r(t.prototype,n),a&&r(t,a),e}(),a=t((function(){return/firefox/i.test(navigator.userAgent)})),i=t((function(){return Boolean(window.safari)}));function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=t.length,a=[],i=0;i<n;i++)a.push(i);a.sort((function(e,r){return t[e]<t[r]?-1:1}));for(var o,s,u=[],c=[],d=0;d<n-1;d++)o=t[d+1]-t[d],s=r[d+1]-r[d],u.push(o),c.push(s/o);for(var f=[c[0]],l=0;l<u.length-1;l++){var g=c[l],h=c[l+1];if(g*h<=0)f.push(0);else{o=u[l];var v=u[l+1],p=o+v;f.push(3*p/((p+v)/g+(p+o)/h))}}f.push(c[c.length-1]);for(var m,D=[],y=[],w=0;w<f.length-1;w++){m=c[w];var T=f[w],E=1/u[w],b=T+f[w+1]-m-m;D.push((m-T-b)*E),y.push(b*E*E)}this.xs=t,this.ys=r,this.c1s=f,this.c2s=D,this.c3s=y}var t,r,n;return t=e,(r=[{key:"interpolate",value:function(e){var t=this.xs,r=this.ys,n=this.c1s,a=this.c2s,i=this.c3s,o=t.length-1;if(e===t[o])return r[o];for(var s,u=0,c=i.length-1;u<=c;){var d=t[s=Math.floor(.5*(u+c))];if(d<e)u=s+1;else{if(!(d>e))return r[s];c=s-1}}var f=e-t[o=Math.max(0,c)],l=f*f;return r[o]+n[o]*f+a[o]*l+i[o]*f*l}}])&&o(t.prototype,r),n&&o(t,n),e}(),u=1;function c(e){var t=e.nodeType===u?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function d(e){return{x:e.clientX,y:e.clientY}}function f(e,t,r,n,o){var u,d,f="IMG"===(u=t).nodeName&&(a()||!document.documentElement.contains(u)),l=c(f?e:t),g={x:r.x-l.x,y:r.y-l.y},h=e.offsetWidth,v=e.offsetHeight,p=n.anchorX,m=n.anchorY,D=function(e,t,r,n){var a=e?t.width:r,o=e?t.height:n;return i()&&e&&(o/=window.devicePixelRatio,a/=window.devicePixelRatio),{dragPreviewWidth:a,dragPreviewHeight:o}}(f,t,h,v),y=D.dragPreviewWidth,w=D.dragPreviewHeight,T=o.offsetX,E=o.offsetY,b=0===E||E;return{x:0===T||T?T:new s([0,.5,1],[g.x,g.x/h*y,g.x+y-h]).interpolate(p),y:b?E:(d=new s([0,.5,1],[g.y,g.y/v*w,g.y+w-v]).interpolate(m),i()&&f&&(d+=(window.devicePixelRatio-1)*w),d)}}var l,g="__NATIVE_FILE__",h="__NATIVE_URL__",v="__NATIVE_TEXT__",p=Object.freeze({__proto__:null,FILE:g,URL:h,TEXT:v});function m(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function D(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var y=(D(l={},g,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),D(l,h,{exposeProperties:{urls:function(e,t){return m(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),D(l,v,{exposeProperties:{text:function(e,t){return m(e,t,"")}},matchesTypes:["Text","text/plain"]}),l);function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var T=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.item={},this.initializeExposedProperties()}var t,r,n;return t=e,(r=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var r={};Object.keys(this.config.exposeProperties).forEach((function(n){r[n]={value:t.config.exposeProperties[n](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,r)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&w(t.prototype,r),n&&w(t,n),e}();function E(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(y).filter((function(e){return y[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var O=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.globalContext=t}var t,r,n;return t=e,(r=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&b(t.prototype,r),n&&b(t,n),e}();function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){I(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function I(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var L,P=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.getSourceClientOffset=function(e){return c(i.sourceNodes.get(e))},this.endDragNativeItem=function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)},this.isNodeInDocument=function(e){return i.document&&i.document.body&&document.body.contains(e)},this.endDragIfSourceWasRemovedFromDOM=function(){var e=i.currentDragSourceNode;i.isNodeInDocument(e)||i.clearCurrentDragSourceNode()&&i.actions.endDrag()},this.handleTopDragStartCapture=function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]},this.handleTopDragStart=function(e){if(!e.defaultPrevented){var t=i.dragStartSourceIds;i.dragStartSourceIds=null;var r=d(e);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:r});var n=e.dataTransfer,a=E(n);if(i.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){var o=i.monitor.getSourceId(),s=i.sourceNodes.get(o),u=i.sourcePreviewNodes.get(o)||s;if(u){var c=i.getCurrentSourcePreviewNodeOptions(),l=f(s,u,r,{anchorX:c.anchorX,anchorY:c.anchorY},{offsetX:c.offsetX,offsetY:c.offsetY});n.setDragImage(u,l.x,l.y)}}try{n.setData("application/json",{})}catch(e){}i.setCurrentDragSourceNode(e.target),i.getCurrentSourcePreviewNodeOptions().captureDraggingState?i.actions.publishDragSource():setTimeout((function(){return i.actions.publishDragSource()}),0)}else if(a)i.beginDragNativeItem(a);else{if(n&&!n.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}},this.handleTopDragEndCapture=function(){i.clearCurrentDragSourceNode()&&i.actions.endDrag()},this.handleTopDragEnterCapture=function(e){if(i.dragEnterTargetIds=[],i.enterLeaveCounter.enter(e.target)&&!i.monitor.isDragging()){var t=e.dataTransfer,r=E(t);r&&i.beginDragNativeItem(r,t)}},this.handleTopDragEnter=function(e){var t=i.dragEnterTargetIds;(i.dragEnterTargetIds=[],i.monitor.isDragging())&&(i.altKeyPressed=e.altKey,a()||i.actions.hover(t,{clientOffset:d(e)}),t.some((function(e){return i.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())))},this.handleTopDragOverCapture=function(){i.dragOverTargetIds=[]},this.handleTopDragOver=function(e){var t=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));i.altKeyPressed=e.altKey,i.actions.hover(t||[],{clientOffset:d(e)}),(t||[]).some((function(e){return i.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=function(e){i.isDraggingNativeItem()&&e.preventDefault(),i.enterLeaveCounter.leave(e.target)&&i.isDraggingNativeItem()&&i.endDragNativeItem()},this.handleTopDropCapture=function(e){i.dropTargetIds=[],e.preventDefault(),i.isDraggingNativeItem()&&i.currentNativeSource.loadDataTransfer(e.dataTransfer),i.enterLeaveCounter.reset()},this.handleTopDrop=function(e){var t=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(t,{clientOffset:d(e)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.endDragIfSourceWasRemovedFromDOM()},this.handleSelectStart=function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new O(r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new n(this.isNodeInDocument)}var t,r,i;return t=e,(r=[{key:"setup",value:function(){if(void 0!==this.window){if(this.window.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");this.window.__isReactDndBackendSetUp=!0,this.addEventListeners(this.window)}}},{key:"teardown",value:function(){void 0!==this.window&&(this.window.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.window),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&this.window.cancelAnimationFrame(this.asyncEndDragFrameId))}},{key:"connectDragPreview",value:function(e,t,r){var n=this;return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),function(){n.sourcePreviewNodes.delete(e),n.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,r){var n=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);var a=function(t){return n.handleDragStart(t,e)},i=function(e){return n.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",a),t.addEventListener("selectstart",i),function(){n.sourceNodes.delete(e),n.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",a),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},a=function(t){return r.handleDragOver(t,e)},i=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",a),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",a),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return N({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return N({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(p).some((function(t){return p[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var r=new T(y[e]);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){return t.window&&t.window.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.window&&(this.window.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.window.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}}])&&C(t.prototype,r),i&&C(t,i),e}();e.NativeTypes=p,e.default=function(e,t){return new P(e,t)},e.getEmptyImage=function(){return L||((L=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),L},Object.defineProperty(e,"__esModule",{value:!0})}));
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка