uawdijnntqw1x1x1
IP : 216.73.216.110
Hostname : 6.87.74.97.host.secureserver.net
Kernel : Linux 6.87.74.97.host.secureserver.net 4.18.0-553.83.1.el8_10.x86_64 #1 SMP Mon Nov 10 04:22:44 EST 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
emeraadmin
/
.htpasswds
/
..
/
public_html
/
test
/
..
/
node_modules
/
..
/
4d695
/
dnd-core.zip
/
/
PKs[�\�V�{{package.jsonnu�[���{ "_from": "dnd-core@^11.1.3", "_id": "dnd-core@11.1.3", "_inBundle": false, "_integrity": "sha512-QugF55dNW+h+vzxVJ/LSJeTeUw9MCJ2cllhmVThVPEtF16ooBkxj0WBE5RB+AceFxMFo1rO6bJKXtqKl+JNnyA==", "_location": "/dnd-core", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, "raw": "dnd-core@^11.1.3", "name": "dnd-core", "escapedName": "dnd-core", "rawSpec": "^11.1.3", "saveSpec": null, "fetchSpec": "^11.1.3" }, "_requiredBy": [ "/react-dnd", "/react-dnd-html5-backend" ], "_resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-11.1.3.tgz", "_shasum": "f92099ba7245e49729d2433157031a6267afcc98", "_spec": "dnd-core@^11.1.3", "_where": "C:\\xampp\\htdocs\\emeraltd\\node_modules\\react-dnd", "bugs": { "url": "https://github.com/react-dnd/react-dnd/issues" }, "bundleDependencies": false, "dependencies": { "@react-dnd/asap": "^4.0.0", "@react-dnd/invariant": "^2.0.0", "redux": "^4.0.4" }, "deprecated": false, "description": "Drag and drop sans the GUI", "gitHead": "32f16c09f0e8560c2a439f3a7fc2e0e8aec3b973", "homepage": "https://github.com/react-dnd/react-dnd#readme", "license": "MIT", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "name": "dnd-core", "repository": { "type": "git", "url": "git+https://github.com/react-dnd/react-dnd.git" }, "scripts": { "build": "../../../scripts/build_package.sh", "clean": "../../../scripts/clean_package.sh", "start": "../../../scripts/watch_package.sh" }, "sideEffects": false, "types": "./lib/index.d.ts", "version": "11.1.3" } PKs[�\����::lib/contracts.d.tsnu�[���import { DragSource, DropTarget, Identifier } from './interfaces'; export declare function validateSourceContract(source: DragSource): void; export declare function validateTargetContract(target: DropTarget): void; export declare function validateType(type: Identifier | Identifier[], allowArray?: boolean): void; PKs[�\Z�$F}}lib/reducers/refCount.jsnu�[���import { ADD_SOURCE, ADD_TARGET, REMOVE_SOURCE, REMOVE_TARGET, } from '../actions/registry'; export function reduce(state = 0, action) { switch (action.type) { case ADD_SOURCE: case ADD_TARGET: return state + 1; case REMOVE_SOURCE: case REMOVE_TARGET: return state - 1; default: return state; } } PKs[�\G��!lib/reducers/dirtyHandlerIds.d.tsnu�[���import { Action } from '../interfaces'; export declare type State = string[]; export interface DirtyHandlerIdPayload { targetIds: string[]; prevTargetIds: string[]; } export declare function reduce(_state: State | undefined, action: Action<DirtyHandlerIdPayload>): State; PKs[�\���lib/reducers/refCount.d.tsnu�[���import { Action } from '../interfaces'; export declare type State = number; export declare function reduce(state: number | undefined, action: Action<any>): State; PKs[�\h��WWlib/reducers/index.jsnu�[���import { reduce as dragOffset } from './dragOffset'; import { reduce as dragOperation, } from './dragOperation'; import { reduce as refCount } from './refCount'; import { reduce as dirtyHandlerIds, } from './dirtyHandlerIds'; import { reduce as stateId } from './stateId'; import { get } from '../utils/js_utils'; export function reduce(state = {}, action) { return { dirtyHandlerIds: dirtyHandlerIds(state.dirtyHandlerIds, { type: action.type, payload: { ...action.payload, prevTargetIds: get(state, 'dragOperation.targetIds', []), }, }), dragOffset: dragOffset(state.dragOffset, action), refCount: refCount(state.refCount, action), dragOperation: dragOperation(state.dragOperation, action), stateId: stateId(state.stateId), }; } PKs[�\�f�XXlib/reducers/dragOffset.d.tsnu�[���import { XYCoord, Action } from '../interfaces'; export interface State { initialSourceClientOffset: XYCoord | null; initialClientOffset: XYCoord | null; clientOffset: XYCoord | null; } export declare function reduce(state: State | undefined, action: Action<{ sourceClientOffset: XYCoord; clientOffset: XYCoord; }>): State; PKs[�\%�-I��lib/reducers/dragOffset.jsnu�[���import { INIT_COORDS, BEGIN_DRAG, HOVER, END_DRAG, DROP, } from '../actions/dragDrop'; import { areCoordsEqual } from '../utils/equality'; const initialState = { initialSourceClientOffset: null, initialClientOffset: null, clientOffset: null, }; export function reduce(state = initialState, action) { const { payload } = action; switch (action.type) { case INIT_COORDS: case BEGIN_DRAG: return { initialSourceClientOffset: payload.sourceClientOffset, initialClientOffset: payload.clientOffset, clientOffset: payload.clientOffset, }; case HOVER: if (areCoordsEqual(state.clientOffset, payload.clientOffset)) { return state; } return { ...state, clientOffset: payload.clientOffset, }; case END_DRAG: case DROP: return initialState; default: return state; } } PKs[�\��llib/reducers/dirtyHandlerIds.jsnu�[���import { BEGIN_DRAG, PUBLISH_DRAG_SOURCE, HOVER, END_DRAG, DROP, } from '../actions/dragDrop'; import { ADD_SOURCE, ADD_TARGET, REMOVE_SOURCE, REMOVE_TARGET, } from '../actions/registry'; import { areArraysEqual } from '../utils/equality'; import { NONE, ALL } from '../utils/dirtiness'; import { xor } from '../utils/js_utils'; export function reduce( // eslint-disable-next-line @typescript-eslint/no-unused-vars _state = NONE, action) { switch (action.type) { case HOVER: break; case ADD_SOURCE: case ADD_TARGET: case REMOVE_TARGET: case REMOVE_SOURCE: return NONE; case BEGIN_DRAG: case PUBLISH_DRAG_SOURCE: case END_DRAG: case DROP: default: return ALL; } const { targetIds = [], prevTargetIds = [] } = action.payload; const result = xor(targetIds, prevTargetIds); const didChange = result.length > 0 || !areArraysEqual(targetIds, prevTargetIds); if (!didChange) { return NONE; } // Check the target ids at the innermost position. If they are valid, add them // to the result const prevInnermostTargetId = prevTargetIds[prevTargetIds.length - 1]; const innermostTargetId = targetIds[targetIds.length - 1]; if (prevInnermostTargetId !== innermostTargetId) { if (prevInnermostTargetId) { result.push(prevInnermostTargetId); } if (innermostTargetId) { result.push(innermostTargetId); } } return result; } PKs[�\3�glib/reducers/dragOperation.d.tsnu�[���import { Identifier, Action } from '../interfaces'; export interface State { itemType: Identifier | Identifier[] | null; item: any; sourceId: string | null; targetIds: string[]; dropResult: any; didDrop: boolean; isSourcePublic: boolean | null; } export declare function reduce(state: State | undefined, action: Action<{ itemType: Identifier | Identifier[]; item: any; sourceId: string; targetId: string; targetIds: string[]; isSourcePublic: boolean; dropResult: any; }>): State; PKs[�\�DDddlib/reducers/index.d.tsnu�[���import { State as DragOffsetState } from './dragOffset'; import { State as DragOperationState } from './dragOperation'; import { State as RefCountState } from './refCount'; import { State as DirtyHandlerIdsState } from './dirtyHandlerIds'; import { State as StateIdState } from './stateId'; import { Action } from 'interfaces'; export interface State { dirtyHandlerIds: DirtyHandlerIdsState; dragOffset: DragOffsetState; refCount: RefCountState; dragOperation: DragOperationState; stateId: StateIdState; } export declare function reduce(state: State | undefined, action: Action<any>): State; PKs[�\�g�<<lib/reducers/stateId.jsnu�[���export function reduce(state = 0) { return state + 1; } PKs[�\ӧ�jjlib/reducers/dragOperation.jsnu�[���import { BEGIN_DRAG, PUBLISH_DRAG_SOURCE, HOVER, END_DRAG, DROP, } from '../actions/dragDrop'; import { REMOVE_TARGET } from '../actions/registry'; import { without } from '../utils/js_utils'; const initialState = { itemType: null, item: null, sourceId: null, targetIds: [], dropResult: null, didDrop: false, isSourcePublic: null, }; export function reduce(state = initialState, action) { const { payload } = action; switch (action.type) { case BEGIN_DRAG: return { ...state, itemType: payload.itemType, item: payload.item, sourceId: payload.sourceId, isSourcePublic: payload.isSourcePublic, dropResult: null, didDrop: false, }; case PUBLISH_DRAG_SOURCE: return { ...state, isSourcePublic: true, }; case HOVER: return { ...state, targetIds: payload.targetIds, }; case REMOVE_TARGET: if (state.targetIds.indexOf(payload.targetId) === -1) { return state; } return { ...state, targetIds: without(state.targetIds, payload.targetId), }; case DROP: return { ...state, dropResult: payload.dropResult, didDrop: true, targetIds: [], }; case END_DRAG: return { ...state, itemType: null, item: null, sourceId: null, dropResult: null, didDrop: false, isSourcePublic: null, targetIds: [], }; default: return state; } } PKs[�\���ZZlib/reducers/stateId.d.tsnu�[���export declare type State = number; export declare function reduce(state?: State): State; PKs[�\hS�^^lib/factories.jsnu�[���import { DragDropManagerImpl } from './DragDropManagerImpl'; export function createDragDropManager(backendFactory, globalContext, backendOptions, debugMode) { const manager = new DragDropManagerImpl(debugMode); const backend = backendFactory(manager, globalContext, backendOptions); manager.receiveBackend(backend); return manager; } PKs[�\���E��lib/factories.d.tsnu�[���import { DragDropManager, BackendFactory } from './interfaces'; export declare function createDragDropManager(backendFactory: BackendFactory, globalContext: unknown, backendOptions: unknown, debugMode?: boolean): DragDropManager; PKs[�\�*�1� � lib/DragDropManagerImpl.jsnu�[���import { createStore } from 'redux'; import { reduce } from './reducers'; import { createDragDropActions } from './actions/dragDrop'; import { DragDropMonitorImpl } from './DragDropMonitorImpl'; import { HandlerRegistryImpl } from './HandlerRegistryImpl'; function makeStoreInstance(debugMode) { // TODO: if we ever make a react-native version of this, // we'll need to consider how to pull off dev-tooling const reduxDevTools = typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__; return createStore(reduce, debugMode && reduxDevTools && reduxDevTools({ name: 'dnd-core', instanceId: 'dnd-core', })); } export class DragDropManagerImpl { constructor(debugMode = false) { this.isSetUp = false; this.handleRefCountChange = () => { const shouldSetUp = this.store.getState().refCount > 0; if (this.backend) { if (shouldSetUp && !this.isSetUp) { this.backend.setup(); this.isSetUp = true; } else if (!shouldSetUp && this.isSetUp) { this.backend.teardown(); this.isSetUp = false; } } }; const store = makeStoreInstance(debugMode); this.store = store; this.monitor = new DragDropMonitorImpl(store, new HandlerRegistryImpl(store)); store.subscribe(this.handleRefCountChange); } receiveBackend(backend) { this.backend = backend; } getMonitor() { return this.monitor; } getBackend() { return this.backend; } getRegistry() { return this.monitor.registry; } getActions() { /* eslint-disable-next-line @typescript-eslint/no-this-alias */ const manager = this; const { dispatch } = this.store; function bindActionCreator(actionCreator) { return (...args) => { const action = actionCreator.apply(manager, args); if (typeof action !== 'undefined') { dispatch(action); } }; } const actions = createDragDropActions(this); return Object.keys(actions).reduce((boundActions, key) => { const action = actions[key]; boundActions[key] = bindActionCreator(action); return boundActions; }, {}); } dispatch(action) { this.store.dispatch(action); } } PKs[�\�R�6��lib/HandlerRegistryImpl.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { addSource, addTarget, removeSource, removeTarget, } from './actions/registry'; import { getNextUniqueId } from './utils/getNextUniqueId'; import { HandlerRole, } from './interfaces'; import { validateSourceContract, validateTargetContract, validateType, } from './contracts'; import { asap } from '@react-dnd/asap'; function getNextHandlerId(role) { const id = getNextUniqueId().toString(); switch (role) { case HandlerRole.SOURCE: return `S${id}`; case HandlerRole.TARGET: return `T${id}`; default: throw new Error(`Unknown Handler Role: ${role}`); } } function parseRoleFromHandlerId(handlerId) { switch (handlerId[0]) { case 'S': return HandlerRole.SOURCE; case 'T': return HandlerRole.TARGET; default: invariant(false, `Cannot parse handler ID: ${handlerId}`); } } function mapContainsValue(map, searchValue) { const entries = map.entries(); let isDone = false; do { const { done, value: [, value], } = entries.next(); if (value === searchValue) { return true; } isDone = !!done; } while (!isDone); return false; } export class HandlerRegistryImpl { constructor(store) { this.types = new Map(); this.dragSources = new Map(); this.dropTargets = new Map(); this.pinnedSourceId = null; this.pinnedSource = null; this.store = store; } addSource(type, source) { validateType(type); validateSourceContract(source); const sourceId = this.addHandler(HandlerRole.SOURCE, type, source); this.store.dispatch(addSource(sourceId)); return sourceId; } addTarget(type, target) { validateType(type, true); validateTargetContract(target); const targetId = this.addHandler(HandlerRole.TARGET, type, target); this.store.dispatch(addTarget(targetId)); return targetId; } containsHandler(handler) { return (mapContainsValue(this.dragSources, handler) || mapContainsValue(this.dropTargets, handler)); } getSource(sourceId, includePinned = false) { invariant(this.isSourceId(sourceId), 'Expected a valid source ID.'); const isPinned = includePinned && sourceId === this.pinnedSourceId; const source = isPinned ? this.pinnedSource : this.dragSources.get(sourceId); return source; } getTarget(targetId) { invariant(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.dropTargets.get(targetId); } getSourceType(sourceId) { invariant(this.isSourceId(sourceId), 'Expected a valid source ID.'); return this.types.get(sourceId); } getTargetType(targetId) { invariant(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.types.get(targetId); } isSourceId(handlerId) { const role = parseRoleFromHandlerId(handlerId); return role === HandlerRole.SOURCE; } isTargetId(handlerId) { const role = parseRoleFromHandlerId(handlerId); return role === HandlerRole.TARGET; } removeSource(sourceId) { invariant(this.getSource(sourceId), 'Expected an existing source.'); this.store.dispatch(removeSource(sourceId)); asap(() => { this.dragSources.delete(sourceId); this.types.delete(sourceId); }); } removeTarget(targetId) { invariant(this.getTarget(targetId), 'Expected an existing target.'); this.store.dispatch(removeTarget(targetId)); this.dropTargets.delete(targetId); this.types.delete(targetId); } pinSource(sourceId) { const source = this.getSource(sourceId); invariant(source, 'Expected an existing source.'); this.pinnedSourceId = sourceId; this.pinnedSource = source; } unpinSource() { invariant(this.pinnedSource, 'No source is pinned at the time.'); this.pinnedSourceId = null; this.pinnedSource = null; } addHandler(role, type, handler) { const id = getNextHandlerId(role); this.types.set(id, type); if (role === HandlerRole.SOURCE) { this.dragSources.set(id, handler); } else if (role === HandlerRole.TARGET) { this.dropTargets.set(id, handler); } return id; } } PKs[�\3C�HHlib/DragDropManagerImpl.d.tsnu�[���import { Action } from 'redux'; import { Backend, DragDropActions, DragDropMonitor, DragDropManager, HandlerRegistry } from './interfaces'; export declare class DragDropManagerImpl implements DragDropManager { private store; private monitor; private backend; private isSetUp; constructor(debugMode?: boolean); receiveBackend(backend: Backend): void; getMonitor(): DragDropMonitor; getBackend(): Backend; getRegistry(): HandlerRegistry; getActions(): DragDropActions; dispatch(action: Action<any>): void; private handleRefCountChange; } PKs[�\� �5AAlib/DragDropMonitorImpl.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { matchesType } from './utils/matchesType'; import { getSourceClientOffset, getDifferenceFromInitialOffset, } from './utils/coords'; import { areDirty } from './utils/dirtiness'; export class DragDropMonitorImpl { constructor(store, registry) { this.store = store; this.registry = registry; } subscribeToStateChange(listener, options = { handlerIds: undefined }) { const { handlerIds } = options; invariant(typeof listener === 'function', 'listener must be a function.'); invariant(typeof handlerIds === 'undefined' || Array.isArray(handlerIds), 'handlerIds, when specified, must be an array of strings.'); let prevStateId = this.store.getState().stateId; const handleChange = () => { const state = this.store.getState(); const currentStateId = state.stateId; try { const canSkipListener = currentStateId === prevStateId || (currentStateId === prevStateId + 1 && !areDirty(state.dirtyHandlerIds, handlerIds)); if (!canSkipListener) { listener(); } } finally { prevStateId = currentStateId; } }; return this.store.subscribe(handleChange); } subscribeToOffsetChange(listener) { invariant(typeof listener === 'function', 'listener must be a function.'); let previousState = this.store.getState().dragOffset; const handleChange = () => { const nextState = this.store.getState().dragOffset; if (nextState === previousState) { return; } previousState = nextState; listener(); }; return this.store.subscribe(handleChange); } canDragSource(sourceId) { if (!sourceId) { return false; } const source = this.registry.getSource(sourceId); invariant(source, 'Expected to find a valid source.'); if (this.isDragging()) { return false; } return source.canDrag(this, sourceId); } canDropOnTarget(targetId) { // undefined on initial render if (!targetId) { return false; } const target = this.registry.getTarget(targetId); invariant(target, 'Expected to find a valid target.'); if (!this.isDragging() || this.didDrop()) { return false; } const targetType = this.registry.getTargetType(targetId); const draggedItemType = this.getItemType(); return (matchesType(targetType, draggedItemType) && target.canDrop(this, targetId)); } isDragging() { return Boolean(this.getItemType()); } isDraggingSource(sourceId) { // undefined on initial render if (!sourceId) { return false; } const source = this.registry.getSource(sourceId, true); invariant(source, 'Expected to find a valid source.'); if (!this.isDragging() || !this.isSourcePublic()) { return false; } const sourceType = this.registry.getSourceType(sourceId); const draggedItemType = this.getItemType(); if (sourceType !== draggedItemType) { return false; } return source.isDragging(this, sourceId); } isOverTarget(targetId, options = { shallow: false }) { // undefined on initial render if (!targetId) { return false; } const { shallow } = options; if (!this.isDragging()) { return false; } const targetType = this.registry.getTargetType(targetId); const draggedItemType = this.getItemType(); if (draggedItemType && !matchesType(targetType, draggedItemType)) { return false; } const targetIds = this.getTargetIds(); if (!targetIds.length) { return false; } const index = targetIds.indexOf(targetId); if (shallow) { return index === targetIds.length - 1; } else { return index > -1; } } getItemType() { return this.store.getState().dragOperation.itemType; } getItem() { return this.store.getState().dragOperation.item; } getSourceId() { return this.store.getState().dragOperation.sourceId; } getTargetIds() { return this.store.getState().dragOperation.targetIds; } getDropResult() { return this.store.getState().dragOperation.dropResult; } didDrop() { return this.store.getState().dragOperation.didDrop; } isSourcePublic() { return Boolean(this.store.getState().dragOperation.isSourcePublic); } getInitialClientOffset() { return this.store.getState().dragOffset.initialClientOffset; } getInitialSourceClientOffset() { return this.store.getState().dragOffset.initialSourceClientOffset; } getClientOffset() { return this.store.getState().dragOffset.clientOffset; } getSourceClientOffset() { return getSourceClientOffset(this.store.getState().dragOffset); } getDifferenceFromInitialOffset() { return getDifferenceFromInitialOffset(this.store.getState().dragOffset); } } PKs[�\�U)�WWlib/utils/getNextUniqueId.jsnu�[���let nextUniqueId = 0; export function getNextUniqueId() { return nextUniqueId++; } PKs[�\�Mk�}}lib/utils/coords.jsnu�[���/** * Coordinate addition * @param a The first coordinate * @param b The second coordinate */ export function add(a, b) { return { x: a.x + b.x, y: a.y + b.y, }; } /** * Coordinate subtraction * @param a The first coordinate * @param b The second coordinate */ export function subtract(a, b) { return { x: a.x - b.x, y: a.y - b.y, }; } /** * Returns the cartesian distance of the drag source component's position, based on its position * at the time when the current drag operation has started, and the movement difference. * * Returns null if no item is being dragged. * * @param state The offset state to compute from */ export function getSourceClientOffset(state) { const { clientOffset, initialClientOffset, initialSourceClientOffset } = state; if (!clientOffset || !initialClientOffset || !initialSourceClientOffset) { return null; } return subtract(add(clientOffset, initialSourceClientOffset), initialClientOffset); } /** * Determines the x,y offset between the client offset and the initial client offset * * @param state The offset state to compute from */ export function getDifferenceFromInitialOffset(state) { const { clientOffset, initialClientOffset } = state; if (!clientOffset || !initialClientOffset) { return null; } return subtract(clientOffset, initialClientOffset); } PKs[�\|��vSSlib/utils/dirtiness.d.tsnu�[���export declare const NONE: string[]; export declare const ALL: string[]; /** * Determines if the given handler IDs are dirty or not. * * @param dirtyIds The set of dirty handler ids * @param handlerIds The set of handler ids to check */ export declare function areDirty(dirtyIds: string[], handlerIds: string[] | undefined): boolean; PKs[�\�4�33lib/utils/getNextUniqueId.d.tsnu�[���export declare function getNextUniqueId(): number; PKs[�\��7��lib/utils/matchesType.d.tsnu�[���import { Identifier } from '../interfaces'; export declare function matchesType(targetType: Identifier | Identifier[] | null, draggedItemType: Identifier | null): boolean; PKs[�\��Cg''lib/utils/equality.jsnu�[���export const strictEquality = (a, b) => a === b; /** * Determine if two cartesian coordinate offsets are equal * @param offsetA * @param offsetB */ export function areCoordsEqual(offsetA, offsetB) { if (!offsetA && !offsetB) { return true; } else if (!offsetA || !offsetB) { return false; } else { return offsetA.x === offsetB.x && offsetA.y === offsetB.y; } } /** * Determines if two arrays of items are equal * @param a The first array of items * @param b The second array of items */ export function areArraysEqual(a, b, isEqual = strictEquality) { if (a.length !== b.length) { return false; } for (let i = 0; i < a.length; ++i) { if (!isEqual(a[i], b[i])) { return false; } } return true; } PKs[�\��+�,,lib/utils/js_utils.d.tsnu�[���/** * drop-in replacement for _.get * @param obj * @param path * @param defaultValue */ export declare function get<T>(obj: any, path: string, defaultValue: T): T; /** * drop-in replacement for _.without */ export declare function without<T>(items: T[], item: T): T[]; /** * drop-in replacement for _.isString * @param input */ export declare function isString(input: any): boolean; /** * drop-in replacement for _.isString * @param input */ export declare function isObject(input: any): boolean; /** * repalcement for _.xor * @param itemsA * @param itemsB */ export declare function xor<T extends string | number>(itemsA: T[], itemsB: T[]): T[]; /** * replacement for _.intersection * @param itemsA * @param itemsB */ export declare function intersection<T>(itemsA: T[], itemsB: T[]): T[]; PKs[�\�Cs���lib/utils/coords.d.tsnu�[���import { State } from '../reducers/dragOffset'; import { XYCoord } from '..'; /** * Coordinate addition * @param a The first coordinate * @param b The second coordinate */ export declare function add(a: XYCoord, b: XYCoord): XYCoord; /** * Coordinate subtraction * @param a The first coordinate * @param b The second coordinate */ export declare function subtract(a: XYCoord, b: XYCoord): XYCoord; /** * Returns the cartesian distance of the drag source component's position, based on its position * at the time when the current drag operation has started, and the movement difference. * * Returns null if no item is being dragged. * * @param state The offset state to compute from */ export declare function getSourceClientOffset(state: State): XYCoord | null; /** * Determines the x,y offset between the client offset and the initial client offset * * @param state The offset state to compute from */ export declare function getDifferenceFromInitialOffset(state: State): XYCoord | null; PKs[�\I���lib/utils/matchesType.jsnu�[���export function matchesType(targetType, draggedItemType) { if (draggedItemType === null) { return targetType === null; } return Array.isArray(targetType) ? targetType.some((t) => t === draggedItemType) : targetType === draggedItemType; } PKs[�\�x9=''lib/utils/js_utils.jsnu�[���// cheap lodash replacements /** * drop-in replacement for _.get * @param obj * @param path * @param defaultValue */ export function get(obj, path, defaultValue) { return path .split('.') .reduce((a, c) => (a && a[c] ? a[c] : defaultValue || null), obj); } /** * drop-in replacement for _.without */ export function without(items, item) { return items.filter((i) => i !== item); } /** * drop-in replacement for _.isString * @param input */ export function isString(input) { return typeof input === 'string'; } /** * drop-in replacement for _.isString * @param input */ export function isObject(input) { return typeof input === 'object'; } /** * repalcement for _.xor * @param itemsA * @param itemsB */ export function xor(itemsA, itemsB) { const map = new Map(); const insertItem = (item) => { map.set(item, map.has(item) ? map.get(item) + 1 : 1); }; itemsA.forEach(insertItem); itemsB.forEach(insertItem); const result = []; map.forEach((count, key) => { if (count === 1) { result.push(key); } }); return result; } /** * replacement for _.intersection * @param itemsA * @param itemsB */ export function intersection(itemsA, itemsB) { return itemsA.filter((t) => itemsB.indexOf(t) > -1); } PKs[�\�@CTVVlib/utils/dirtiness.jsnu�[���import { intersection } from './js_utils'; export const NONE = []; export const ALL = []; NONE.__IS_NONE__ = true; ALL.__IS_ALL__ = true; /** * Determines if the given handler IDs are dirty or not. * * @param dirtyIds The set of dirty handler ids * @param handlerIds The set of handler ids to check */ export function areDirty(dirtyIds, handlerIds) { if (dirtyIds === NONE) { return false; } if (dirtyIds === ALL || typeof handlerIds === 'undefined') { return true; } const commonIds = intersection(handlerIds, dirtyIds); return commonIds.length > 0; } PKs[�\y�O�nnlib/utils/equality.d.tsnu�[���import { XYCoord } from '../interfaces'; export declare type EqualityCheck<T> = (a: T, b: T) => boolean; export declare const strictEquality: <T>(a: T, b: T) => boolean; /** * Determine if two cartesian coordinate offsets are equal * @param offsetA * @param offsetB */ export declare function areCoordsEqual(offsetA: XYCoord | null | undefined, offsetB: XYCoord | null | undefined): boolean; /** * Determines if two arrays of items are equal * @param a The first array of items * @param b The second array of items */ export declare function areArraysEqual<T>(a: T[], b: T[], isEqual?: EqualityCheck<T>): boolean; PKs[�\�_�;;lib/index.jsnu�[���export * from './interfaces'; export * from './factories'; PKs[�\/:<�eelib/interfaces.d.tsnu�[���export declare type Identifier = string | symbol; export declare type SourceType = Identifier; export declare type TargetType = Identifier | Identifier[]; export declare type Unsubscribe = () => void; export declare type Listener = () => void; export interface XYCoord { x: number; y: number; } export declare enum HandlerRole { SOURCE = "SOURCE", TARGET = "TARGET" } export interface Backend { setup(): void; teardown(): void; connectDragSource(sourceId: any, node?: any, options?: any): Unsubscribe; connectDragPreview(sourceId: any, node?: any, options?: any): Unsubscribe; connectDropTarget(targetId: any, node?: any, options?: any): Unsubscribe; profile(): Record<string, number>; } export interface DragDropMonitor { subscribeToStateChange(listener: Listener, options?: { handlerIds: Identifier[] | undefined; }): Unsubscribe; subscribeToOffsetChange(listener: Listener): Unsubscribe; canDragSource(sourceId: Identifier | undefined): boolean; canDropOnTarget(targetId: Identifier | undefined): boolean; /** * Returns true if a drag operation is in progress, and either the owner initiated the drag, or its isDragging() * is defined and returns true. */ isDragging(): boolean; isDraggingSource(sourceId: Identifier | undefined): boolean; isOverTarget(targetId: Identifier | undefined, options?: { shallow?: boolean; }): boolean; /** * Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns null if no item is being dragged. */ getItemType(): Identifier | null; /** * Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object * from its beginDrag() method. Returns null if no item is being dragged. */ getItem(): any; getSourceId(): Identifier | null; getTargetIds(): Identifier[]; /** * Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an * object from their drop() methods. When a chain of drop() is dispatched for the nested targets, bottom up, any parent that * explicitly returns its own result from drop() overrides the child drop result previously set by the child. Returns null if * called outside endDrag(). */ getDropResult(): any; /** * Returns true if some drop target has handled the drop event, false otherwise. Even if a target did not return a drop result, * didDrop() returns true. Use it inside endDrag() to test whether any drop target has handled the drop. Returns false if called * outside endDrag(). */ didDrop(): boolean; isSourcePublic(): boolean | null; /** * Returns the { x, y } client offset of the pointer at the time when the current drag operation has started. * Returns null if no item is being dragged. */ getInitialClientOffset(): XYCoord | null; /** * Returns the { x, y } client offset of the drag source component's root DOM node at the time when the current drag * operation has started. Returns null if no item is being dragged. */ getInitialSourceClientOffset(): XYCoord | null; /** * Returns the last recorded { x, y } client offset of the pointer while a drag operation is in progress. * Returns null if no item is being dragged. */ getClientOffset(): XYCoord | null; /** * Returns the projected { x, y } client offset of the drag source component's root DOM node, based on its position at the time * when the current drag operation has started, and the movement difference. Returns null if no item is being dragged. */ getSourceClientOffset(): XYCoord | null; /** * Returns the { x, y } difference between the last recorded client offset of the pointer and the client offset when the current * drag operation has started. Returns null if no item is being dragged. */ getDifferenceFromInitialOffset(): XYCoord | null; } export interface HandlerRegistry { addSource(type: SourceType, source: DragSource): Identifier; addTarget(type: TargetType, target: DropTarget): Identifier; containsHandler(handler: DragSource | DropTarget): boolean; getSource(sourceId: Identifier, includePinned?: boolean): DragSource; getSourceType(sourceId: Identifier): SourceType; getTargetType(targetId: Identifier): TargetType; getTarget(targetId: Identifier): DropTarget; isSourceId(handlerId: Identifier): boolean; isTargetId(handlerId: Identifier): boolean; removeSource(sourceId: Identifier): void; removeTarget(targetId: Identifier): void; pinSource(sourceId: Identifier): void; unpinSource(): void; } export interface Action<Payload> { type: Identifier; payload: Payload; } export interface SentinelAction { type: Identifier; } export declare type ActionCreator<Payload> = (args: any[]) => Action<Payload>; export interface BeginDragOptions { publishSource?: boolean; clientOffset?: XYCoord; getSourceClientOffset?: (sourceId: Identifier) => XYCoord; } export interface InitCoordsPayload { clientOffset: XYCoord | null; sourceClientOffset: XYCoord | null; } export interface BeginDragPayload { itemType: Identifier; item: any; sourceId: Identifier; clientOffset: XYCoord | null; sourceClientOffset: XYCoord | null; isSourcePublic: boolean; } export interface HoverPayload { targetIds: Identifier[]; clientOffset: XYCoord | null; } export interface HoverOptions { clientOffset?: XYCoord; } export interface DropPayload { dropResult: any; } export interface TargetIdPayload { targetId: Identifier; } export interface SourceIdPayload { sourceId: Identifier; } export interface DragDropActions { beginDrag(sourceIds?: Identifier[], options?: any): Action<BeginDragPayload> | undefined; publishDragSource(): SentinelAction | undefined; hover(targetIds: Identifier[], options?: any): Action<HoverPayload>; drop(options?: any): void; endDrag(): SentinelAction; } export interface DragDropManager { getMonitor(): DragDropMonitor; getBackend(): Backend; getRegistry(): HandlerRegistry; getActions(): DragDropActions; dispatch(action: any): void; } export declare type BackendFactory = (manager: DragDropManager, globalContext?: any, configuration?: any) => Backend; export interface DragSource { beginDrag(monitor: DragDropMonitor, targetId: Identifier): void; endDrag(monitor: DragDropMonitor, targetId: Identifier): void; canDrag(monitor: DragDropMonitor, targetId: Identifier): boolean; isDragging(monitor: DragDropMonitor, targetId: Identifier): boolean; } export interface DropTarget { canDrop(monitor: DragDropMonitor, targetId: Identifier): boolean; hover(monitor: DragDropMonitor, targetId: Identifier): void; drop(monitor: DragDropMonitor, targetId: Identifier): any; } PKs[�\�!�xlib/DragDropMonitorImpl.d.tsnu�[���import { Store } from 'redux'; import { State } from './reducers'; import { DragDropMonitor, Listener, Unsubscribe, XYCoord, HandlerRegistry, Identifier } from './interfaces'; export declare class DragDropMonitorImpl implements DragDropMonitor { private store; readonly registry: HandlerRegistry; constructor(store: Store<State>, registry: HandlerRegistry); subscribeToStateChange(listener: Listener, options?: { handlerIds: string[] | undefined; }): Unsubscribe; subscribeToOffsetChange(listener: Listener): Unsubscribe; canDragSource(sourceId: string | undefined): boolean; canDropOnTarget(targetId: string | undefined): boolean; isDragging(): boolean; isDraggingSource(sourceId: string | undefined): boolean; isOverTarget(targetId: string | undefined, options?: { shallow: boolean; }): boolean; getItemType(): Identifier; getItem(): any; getSourceId(): string | null; getTargetIds(): string[]; getDropResult(): any; didDrop(): boolean; isSourcePublic(): boolean; getInitialClientOffset(): XYCoord | null; getInitialSourceClientOffset(): XYCoord | null; getClientOffset(): XYCoord | null; getSourceClientOffset(): XYCoord | null; getDifferenceFromInitialOffset(): XYCoord | null; } PKs[�\�j'LMMlib/HandlerRegistryImpl.d.tsnu�[���import { Store } from 'redux'; import { State } from './reducers'; import { DragSource, DropTarget, SourceType, TargetType, Identifier, HandlerRegistry } from './interfaces'; export declare class HandlerRegistryImpl implements HandlerRegistry { private types; private dragSources; private dropTargets; private pinnedSourceId; private pinnedSource; private store; constructor(store: Store<State>); addSource(type: SourceType, source: DragSource): string; addTarget(type: TargetType, target: DropTarget): string; containsHandler(handler: DragSource | DropTarget): boolean; getSource(sourceId: string, includePinned?: boolean): DragSource; getTarget(targetId: string): DropTarget; getSourceType(sourceId: string): Identifier; getTargetType(targetId: string): Identifier | Identifier[]; isSourceId(handlerId: string): boolean; isTargetId(handlerId: string): boolean; removeSource(sourceId: string): void; removeTarget(targetId: string): void; pinSource(sourceId: string): void; unpinSource(): void; private addHandler; } PKs[�\&���lib/actions/registry.jsnu�[���export const ADD_SOURCE = 'dnd-core/ADD_SOURCE'; export const ADD_TARGET = 'dnd-core/ADD_TARGET'; export const REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE'; export const REMOVE_TARGET = 'dnd-core/REMOVE_TARGET'; export function addSource(sourceId) { return { type: ADD_SOURCE, payload: { sourceId, }, }; } export function addTarget(targetId) { return { type: ADD_TARGET, payload: { targetId, }, }; } export function removeSource(sourceId) { return { type: REMOVE_SOURCE, payload: { sourceId, }, }; } export function removeTarget(targetId) { return { type: REMOVE_TARGET, payload: { targetId, }, }; } PKs[�\��xxlib/actions/registry.d.tsnu�[���import { Action, SourceIdPayload, TargetIdPayload } from '../interfaces'; export declare const ADD_SOURCE = "dnd-core/ADD_SOURCE"; export declare const ADD_TARGET = "dnd-core/ADD_TARGET"; export declare const REMOVE_SOURCE = "dnd-core/REMOVE_SOURCE"; export declare const REMOVE_TARGET = "dnd-core/REMOVE_TARGET"; export declare function addSource(sourceId: string): Action<SourceIdPayload>; export declare function addTarget(targetId: string): Action<TargetIdPayload>; export declare function removeSource(sourceId: string): Action<SourceIdPayload>; export declare function removeTarget(targetId: string): Action<TargetIdPayload>; PKs[�\� O��/lib/actions/dragDrop/local/setClientOffset.d.tsnu�[���import { XYCoord } from '../../../interfaces'; import { AnyAction } from 'redux'; export declare function setClientOffset(clientOffset: XYCoord | null | undefined, sourceClientOffset?: XYCoord | null | undefined): AnyAction; PKs[�\<'��''-lib/actions/dragDrop/local/setClientOffset.jsnu�[���import { INIT_COORDS } from '../types'; export function setClientOffset(clientOffset, sourceClientOffset) { return { type: INIT_COORDS, payload: { sourceClientOffset: sourceClientOffset || null, clientOffset: clientOffset || null, }, }; } PKs[�\��D��!lib/actions/dragDrop/endDrag.d.tsnu�[���import { DragDropManager, SentinelAction } from '../../interfaces'; export declare function createEndDrag(manager: DragDropManager): () => SentinelAction; PKs[�\钩l lib/actions/dragDrop/types.jsnu�[���export const INIT_COORDS = 'dnd-core/INIT_COORDS'; export const BEGIN_DRAG = 'dnd-core/BEGIN_DRAG'; export const PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE'; export const HOVER = 'dnd-core/HOVER'; export const DROP = 'dnd-core/DROP'; export const END_DRAG = 'dnd-core/END_DRAG'; PKs[�\��##)lib/actions/dragDrop/publishDragSource.jsnu�[���import { PUBLISH_DRAG_SOURCE } from './types'; export function createPublishDragSource(manager) { return function publishDragSource() { const monitor = manager.getMonitor(); if (monitor.isDragging()) { return { type: PUBLISH_DRAG_SOURCE }; } }; } PKs[�\TH���lib/actions/dragDrop/hover.d.tsnu�[���import { Action, DragDropManager, HoverPayload, HoverOptions } from '../../interfaces'; export declare function createHover(manager: DragDropManager): (targetIdsArg: string[], { clientOffset }?: HoverOptions) => Action<HoverPayload>; PKs[�\�����lib/actions/dragDrop/endDrag.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { END_DRAG } from './types'; export function createEndDrag(manager) { return function endDrag() { const monitor = manager.getMonitor(); const registry = manager.getRegistry(); verifyIsDragging(monitor); const sourceId = monitor.getSourceId(); if (sourceId != null) { const source = registry.getSource(sourceId, true); source.endDrag(monitor, sourceId); registry.unpinSource(); } return { type: END_DRAG }; }; } function verifyIsDragging(monitor) { invariant(monitor.isDragging(), 'Cannot call endDrag while not dragging.'); } PKs[�\�3a� lib/actions/dragDrop/index.jsnu�[���import { createBeginDrag } from './beginDrag'; import { createPublishDragSource } from './publishDragSource'; import { createHover } from './hover'; import { createDrop } from './drop'; import { createEndDrag } from './endDrag'; export * from './types'; export function createDragDropActions(manager) { return { beginDrag: createBeginDrag(manager), publishDragSource: createPublishDragSource(manager), hover: createHover(manager), drop: createDrop(manager), endDrag: createEndDrag(manager), }; } PKs[�\d�/���lib/actions/dragDrop/hover.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { matchesType } from '../../utils/matchesType'; import { HOVER } from './types'; export function createHover(manager) { return function hover(targetIdsArg, { clientOffset } = {}) { verifyTargetIdsIsArray(targetIdsArg); const targetIds = targetIdsArg.slice(0); const monitor = manager.getMonitor(); const registry = manager.getRegistry(); checkInvariants(targetIds, monitor, registry); const draggedItemType = monitor.getItemType(); removeNonMatchingTargetIds(targetIds, registry, draggedItemType); hoverAllTargets(targetIds, monitor, registry); return { type: HOVER, payload: { targetIds, clientOffset: clientOffset || null, }, }; }; } function verifyTargetIdsIsArray(targetIdsArg) { invariant(Array.isArray(targetIdsArg), 'Expected targetIds to be an array.'); } function checkInvariants(targetIds, monitor, registry) { invariant(monitor.isDragging(), 'Cannot call hover while not dragging.'); invariant(!monitor.didDrop(), 'Cannot call hover after drop.'); for (let i = 0; i < targetIds.length; i++) { const targetId = targetIds[i]; invariant(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); const target = registry.getTarget(targetId); invariant(target, 'Expected targetIds to be registered.'); } } function removeNonMatchingTargetIds(targetIds, registry, draggedItemType) { // Remove those targetIds that don't match the targetType. This // fixes shallow isOver which would only be non-shallow because of // non-matching targets. for (let i = targetIds.length - 1; i >= 0; i--) { const targetId = targetIds[i]; const targetType = registry.getTargetType(targetId); if (!matchesType(targetType, draggedItemType)) { targetIds.splice(i, 1); } } } function hoverAllTargets(targetIds, monitor, registry) { // Finally call hover on all matching targets. targetIds.forEach(function (targetId) { const target = registry.getTarget(targetId); target.hover(monitor, targetId); }); } PKs[�\�c�#lib/actions/dragDrop/beginDrag.d.tsnu�[���import { Action, DragDropManager, BeginDragPayload, BeginDragOptions, Identifier } from '../../interfaces'; export declare function createBeginDrag(manager: DragDropManager): (sourceIds?: Identifier[], options?: BeginDragOptions) => Action<BeginDragPayload> | undefined; PKs[�\���+lib/actions/dragDrop/publishDragSource.d.tsnu�[���import { DragDropManager, SentinelAction } from '../../interfaces'; export declare function createPublishDragSource(manager: DragDropManager): () => SentinelAction | undefined; PKs[�\��� ��lib/actions/dragDrop/index.d.tsnu�[���import { DragDropManager, DragDropActions } from '../../interfaces'; export * from './types'; export declare function createDragDropActions(manager: DragDropManager): DragDropActions; PKs[�\�c��PPlib/actions/dragDrop/types.d.tsnu�[���export declare const INIT_COORDS = "dnd-core/INIT_COORDS"; export declare const BEGIN_DRAG = "dnd-core/BEGIN_DRAG"; export declare const PUBLISH_DRAG_SOURCE = "dnd-core/PUBLISH_DRAG_SOURCE"; export declare const HOVER = "dnd-core/HOVER"; export declare const DROP = "dnd-core/DROP"; export declare const END_DRAG = "dnd-core/END_DRAG"; PKs[�\����!lib/actions/dragDrop/beginDrag.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { setClientOffset } from './local/setClientOffset'; import { isObject } from '../../utils/js_utils'; import { BEGIN_DRAG, INIT_COORDS } from './types'; const ResetCoordinatesAction = { type: INIT_COORDS, payload: { clientOffset: null, sourceClientOffset: null, }, }; export function createBeginDrag(manager) { return function beginDrag(sourceIds = [], options = { publishSource: true, }) { const { publishSource = true, clientOffset, getSourceClientOffset, } = options; const monitor = manager.getMonitor(); const registry = manager.getRegistry(); // Initialize the coordinates using the client offset manager.dispatch(setClientOffset(clientOffset)); verifyInvariants(sourceIds, monitor, registry); // Get the draggable source const sourceId = getDraggableSource(sourceIds, monitor); if (sourceId === null) { manager.dispatch(ResetCoordinatesAction); return; } // Get the source client offset let sourceClientOffset = null; if (clientOffset) { if (!getSourceClientOffset) { throw new Error('getSourceClientOffset must be defined'); } verifyGetSourceClientOffsetIsFunction(getSourceClientOffset); sourceClientOffset = getSourceClientOffset(sourceId); } // Initialize the full coordinates manager.dispatch(setClientOffset(clientOffset, sourceClientOffset)); const source = registry.getSource(sourceId); const item = source.beginDrag(monitor, sourceId); verifyItemIsObject(item); registry.pinSource(sourceId); const itemType = registry.getSourceType(sourceId); return { type: BEGIN_DRAG, payload: { itemType, item, sourceId, clientOffset: clientOffset || null, sourceClientOffset: sourceClientOffset || null, isSourcePublic: !!publishSource, }, }; }; } function verifyInvariants(sourceIds, monitor, registry) { invariant(!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); sourceIds.forEach(function (sourceId) { invariant(registry.getSource(sourceId), 'Expected sourceIds to be registered.'); }); } function verifyGetSourceClientOffsetIsFunction(getSourceClientOffset) { invariant(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); } function verifyItemIsObject(item) { invariant(isObject(item), 'Item must be an object.'); } function getDraggableSource(sourceIds, monitor) { let sourceId = null; for (let i = sourceIds.length - 1; i >= 0; i--) { if (monitor.canDragSource(sourceIds[i])) { sourceId = sourceIds[i]; break; } } return sourceId; } PKs[�\\q����lib/actions/dragDrop/drop.d.tsnu�[���import { DragDropManager } from '../../interfaces'; export declare function createDrop(manager: DragDropManager): (options?: {}) => void; PKs[�\��$�RRlib/actions/dragDrop/drop.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { DROP } from './types'; import { isObject } from '../../utils/js_utils'; export function createDrop(manager) { return function drop(options = {}) { const monitor = manager.getMonitor(); const registry = manager.getRegistry(); verifyInvariants(monitor); const targetIds = getDroppableTargets(monitor); // Multiple actions are dispatched here, which is why this doesn't return an action targetIds.forEach((targetId, index) => { const dropResult = determineDropResult(targetId, index, registry, monitor); const action = { type: DROP, payload: { dropResult: { ...options, ...dropResult, }, }, }; manager.dispatch(action); }); }; } function verifyInvariants(monitor) { invariant(monitor.isDragging(), 'Cannot call drop while not dragging.'); invariant(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); } function determineDropResult(targetId, index, registry, monitor) { const target = registry.getTarget(targetId); let dropResult = target ? target.drop(monitor, targetId) : undefined; verifyDropResultType(dropResult); if (typeof dropResult === 'undefined') { dropResult = index === 0 ? {} : monitor.getDropResult(); } return dropResult; } function verifyDropResultType(dropResult) { invariant(typeof dropResult === 'undefined' || isObject(dropResult), 'Drop result must either be an object or undefined.'); } function getDroppableTargets(monitor) { const targetIds = monitor .getTargetIds() .filter(monitor.canDropOnTarget, monitor); targetIds.reverse(); return targetIds; } PKs[�\Z�Ji00lib/contracts.jsnu�[���import { invariant } from '@react-dnd/invariant'; export function validateSourceContract(source) { invariant(typeof source.canDrag === 'function', 'Expected canDrag to be a function.'); invariant(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.'); invariant(typeof source.endDrag === 'function', 'Expected endDrag to be a function.'); } export function validateTargetContract(target) { invariant(typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); invariant(typeof target.hover === 'function', 'Expected hover to be a function.'); invariant(typeof target.drop === 'function', 'Expected beginDrag to be a function.'); } export function validateType(type, allowArray) { if (allowArray && Array.isArray(type)) { type.forEach((t) => validateType(t, false)); return; } invariant(typeof type === 'string' || typeof type === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.'); } PKs[�\�_�;;lib/index.d.tsnu�[���export * from './interfaces'; export * from './factories'; PKs[�\����lib/interfaces.jsnu�[���export var HandlerRole; (function (HandlerRole) { HandlerRole["SOURCE"] = "SOURCE"; HandlerRole["TARGET"] = "TARGET"; })(HandlerRole || (HandlerRole = {})); PKs[�\��-:77LICENSEnu�[���The MIT License (MIT) Copyright (c) 2015 Dan Abramov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PKs[�\�(B{88dist/cjs/reducers/refCount.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reduce = reduce; var _registry = require("../actions/registry"); function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case _registry.ADD_SOURCE: case _registry.ADD_TARGET: return state + 1; case _registry.REMOVE_SOURCE: case _registry.REMOVE_TARGET: return state - 1; default: return state; } }PKs[�\dO�ـ�dist/cjs/reducers/index.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reduce = reduce; var _dragOffset = require("./dragOffset"); var _dragOperation = require("./dragOperation"); var _refCount = require("./refCount"); var _dirtyHandlerIds = require("./dirtyHandlerIds"); var _stateId = require("./stateId"); var _js_utils = require("../utils/js_utils"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments.length > 1 ? arguments[1] : undefined; return { dirtyHandlerIds: (0, _dirtyHandlerIds.reduce)(state.dirtyHandlerIds, { type: action.type, payload: _objectSpread(_objectSpread({}, action.payload), {}, { prevTargetIds: (0, _js_utils.get)(state, 'dragOperation.targetIds', []) }) }), dragOffset: (0, _dragOffset.reduce)(state.dragOffset, action), refCount: (0, _refCount.reduce)(state.refCount, action), dragOperation: (0, _dragOperation.reduce)(state.dragOperation, action), stateId: (0, _stateId.reduce)(state.stateId) }; }PKs[�\X���dist/cjs/reducers/dragOffset.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reduce = reduce; var _dragDrop = require("../actions/dragDrop"); var _equality = require("../utils/equality"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var initialState = { initialSourceClientOffset: null, initialClientOffset: null, clientOffset: null }; function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; var action = arguments.length > 1 ? arguments[1] : undefined; var payload = action.payload; switch (action.type) { case _dragDrop.INIT_COORDS: case _dragDrop.BEGIN_DRAG: return { initialSourceClientOffset: payload.sourceClientOffset, initialClientOffset: payload.clientOffset, clientOffset: payload.clientOffset }; case _dragDrop.HOVER: if ((0, _equality.areCoordsEqual)(state.clientOffset, payload.clientOffset)) { return state; } return _objectSpread(_objectSpread({}, state), {}, { clientOffset: payload.clientOffset }); case _dragDrop.END_DRAG: case _dragDrop.DROP: return initialState; default: return state; } }PKs[�\j*^��$dist/cjs/reducers/dirtyHandlerIds.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reduce = reduce; var _dragDrop = require("../actions/dragDrop"); var _registry = require("../actions/registry"); var _equality = require("../utils/equality"); var _dirtiness = require("../utils/dirtiness"); var _js_utils = require("../utils/js_utils"); function reduce() { var _state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _dirtiness.NONE; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case _dragDrop.HOVER: break; case _registry.ADD_SOURCE: case _registry.ADD_TARGET: case _registry.REMOVE_TARGET: case _registry.REMOVE_SOURCE: return _dirtiness.NONE; case _dragDrop.BEGIN_DRAG: case _dragDrop.PUBLISH_DRAG_SOURCE: case _dragDrop.END_DRAG: case _dragDrop.DROP: default: return _dirtiness.ALL; } var _action$payload = action.payload, _action$payload$targe = _action$payload.targetIds, targetIds = _action$payload$targe === void 0 ? [] : _action$payload$targe, _action$payload$prevT = _action$payload.prevTargetIds, prevTargetIds = _action$payload$prevT === void 0 ? [] : _action$payload$prevT; var result = (0, _js_utils.xor)(targetIds, prevTargetIds); var didChange = result.length > 0 || !(0, _equality.areArraysEqual)(targetIds, prevTargetIds); if (!didChange) { return _dirtiness.NONE; } // Check the target ids at the innermost position. If they are valid, add them // to the result var prevInnermostTargetId = prevTargetIds[prevTargetIds.length - 1]; var innermostTargetId = targetIds[targetIds.length - 1]; if (prevInnermostTargetId !== innermostTargetId) { if (prevInnermostTargetId) { result.push(prevInnermostTargetId); } if (innermostTargetId) { result.push(innermostTargetId); } } return result; }PKs[�\�pjY��dist/cjs/reducers/stateId.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reduce = reduce; function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; return state + 1; }PKs[�\|�t%��"dist/cjs/reducers/dragOperation.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.reduce = reduce; var _dragDrop = require("../actions/dragDrop"); var _registry = require("../actions/registry"); var _js_utils = require("../utils/js_utils"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var initialState = { itemType: null, item: null, sourceId: null, targetIds: [], dropResult: null, didDrop: false, isSourcePublic: null }; function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; var action = arguments.length > 1 ? arguments[1] : undefined; var payload = action.payload; switch (action.type) { case _dragDrop.BEGIN_DRAG: return _objectSpread(_objectSpread({}, state), {}, { itemType: payload.itemType, item: payload.item, sourceId: payload.sourceId, isSourcePublic: payload.isSourcePublic, dropResult: null, didDrop: false }); case _dragDrop.PUBLISH_DRAG_SOURCE: return _objectSpread(_objectSpread({}, state), {}, { isSourcePublic: true }); case _dragDrop.HOVER: return _objectSpread(_objectSpread({}, state), {}, { targetIds: payload.targetIds }); case _registry.REMOVE_TARGET: if (state.targetIds.indexOf(payload.targetId) === -1) { return state; } return _objectSpread(_objectSpread({}, state), {}, { targetIds: (0, _js_utils.without)(state.targetIds, payload.targetId) }); case _dragDrop.DROP: return _objectSpread(_objectSpread({}, state), {}, { dropResult: payload.dropResult, didDrop: true, targetIds: [] }); case _dragDrop.END_DRAG: return _objectSpread(_objectSpread({}, state), {}, { itemType: null, item: null, sourceId: null, dropResult: null, didDrop: false, isSourcePublic: null, targetIds: [] }); default: return state; } }PKs[�\T%�S��dist/cjs/factories.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createDragDropManager = createDragDropManager; var _DragDropManagerImpl = require("./DragDropManagerImpl"); function createDragDropManager(backendFactory, globalContext, backendOptions, debugMode) { var manager = new _DragDropManagerImpl.DragDropManagerImpl(debugMode); var backend = backendFactory(manager, globalContext, backendOptions); manager.receiveBackend(backend); return manager; }PKs[�\T��;PPdist/cjs/DragDropManagerImpl.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DragDropManagerImpl = void 0; var _redux = require("redux"); var _reducers = require("./reducers"); var _dragDrop = require("./actions/dragDrop"); var _DragDropMonitorImpl = require("./DragDropMonitorImpl"); var _HandlerRegistryImpl = require("./HandlerRegistryImpl"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function makeStoreInstance(debugMode) { // TODO: if we ever make a react-native version of this, // we'll need to consider how to pull off dev-tooling var reduxDevTools = typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__; return (0, _redux.createStore)(_reducers.reduce, debugMode && reduxDevTools && reduxDevTools({ name: 'dnd-core', instanceId: 'dnd-core' })); } var DragDropManagerImpl = /*#__PURE__*/function () { function DragDropManagerImpl() { var _this = this; var debugMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; _classCallCheck(this, DragDropManagerImpl); this.isSetUp = false; this.handleRefCountChange = function () { var shouldSetUp = _this.store.getState().refCount > 0; if (_this.backend) { if (shouldSetUp && !_this.isSetUp) { _this.backend.setup(); _this.isSetUp = true; } else if (!shouldSetUp && _this.isSetUp) { _this.backend.teardown(); _this.isSetUp = false; } } }; var store = makeStoreInstance(debugMode); this.store = store; this.monitor = new _DragDropMonitorImpl.DragDropMonitorImpl(store, new _HandlerRegistryImpl.HandlerRegistryImpl(store)); store.subscribe(this.handleRefCountChange); } _createClass(DragDropManagerImpl, [{ key: "receiveBackend", value: function receiveBackend(backend) { this.backend = backend; } }, { key: "getMonitor", value: function getMonitor() { return this.monitor; } }, { key: "getBackend", value: function getBackend() { return this.backend; } }, { key: "getRegistry", value: function getRegistry() { return this.monitor.registry; } }, { key: "getActions", value: function getActions() { /* eslint-disable-next-line @typescript-eslint/no-this-alias */ var manager = this; var dispatch = this.store.dispatch; function bindActionCreator(actionCreator) { return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var action = actionCreator.apply(manager, args); if (typeof action !== 'undefined') { dispatch(action); } }; } var actions = (0, _dragDrop.createDragDropActions)(this); return Object.keys(actions).reduce(function (boundActions, key) { var action = actions[key]; boundActions[key] = bindActionCreator(action); return boundActions; }, {}); } }, { key: "dispatch", value: function dispatch(action) { this.store.dispatch(action); } }]); return DragDropManagerImpl; }(); exports.DragDropManagerImpl = DragDropManagerImpl;PKs[�\xލ���dist/cjs/HandlerRegistryImpl.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HandlerRegistryImpl = void 0; var _invariant = require("@react-dnd/invariant"); var _registry = require("./actions/registry"); var _getNextUniqueId = require("./utils/getNextUniqueId"); var _interfaces = require("./interfaces"); var _contracts = require("./contracts"); var _asap = require("@react-dnd/asap"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function getNextHandlerId(role) { var id = (0, _getNextUniqueId.getNextUniqueId)().toString(); switch (role) { case _interfaces.HandlerRole.SOURCE: return "S".concat(id); case _interfaces.HandlerRole.TARGET: return "T".concat(id); default: throw new Error("Unknown Handler Role: ".concat(role)); } } function parseRoleFromHandlerId(handlerId) { switch (handlerId[0]) { case 'S': return _interfaces.HandlerRole.SOURCE; case 'T': return _interfaces.HandlerRole.TARGET; default: (0, _invariant.invariant)(false, "Cannot parse handler ID: ".concat(handlerId)); } } function mapContainsValue(map, searchValue) { var entries = map.entries(); var isDone = false; do { var _entries$next = entries.next(), done = _entries$next.done, _entries$next$value = _slicedToArray(_entries$next.value, 2), value = _entries$next$value[1]; if (value === searchValue) { return true; } isDone = !!done; } while (!isDone); return false; } var HandlerRegistryImpl = /*#__PURE__*/function () { function HandlerRegistryImpl(store) { _classCallCheck(this, HandlerRegistryImpl); this.types = new Map(); this.dragSources = new Map(); this.dropTargets = new Map(); this.pinnedSourceId = null; this.pinnedSource = null; this.store = store; } _createClass(HandlerRegistryImpl, [{ key: "addSource", value: function addSource(type, source) { (0, _contracts.validateType)(type); (0, _contracts.validateSourceContract)(source); var sourceId = this.addHandler(_interfaces.HandlerRole.SOURCE, type, source); this.store.dispatch((0, _registry.addSource)(sourceId)); return sourceId; } }, { key: "addTarget", value: function addTarget(type, target) { (0, _contracts.validateType)(type, true); (0, _contracts.validateTargetContract)(target); var targetId = this.addHandler(_interfaces.HandlerRole.TARGET, type, target); this.store.dispatch((0, _registry.addTarget)(targetId)); return targetId; } }, { key: "containsHandler", value: function containsHandler(handler) { return mapContainsValue(this.dragSources, handler) || mapContainsValue(this.dropTargets, handler); } }, { key: "getSource", value: function getSource(sourceId) { var includePinned = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; (0, _invariant.invariant)(this.isSourceId(sourceId), 'Expected a valid source ID.'); var isPinned = includePinned && sourceId === this.pinnedSourceId; var source = isPinned ? this.pinnedSource : this.dragSources.get(sourceId); return source; } }, { key: "getTarget", value: function getTarget(targetId) { (0, _invariant.invariant)(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.dropTargets.get(targetId); } }, { key: "getSourceType", value: function getSourceType(sourceId) { (0, _invariant.invariant)(this.isSourceId(sourceId), 'Expected a valid source ID.'); return this.types.get(sourceId); } }, { key: "getTargetType", value: function getTargetType(targetId) { (0, _invariant.invariant)(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.types.get(targetId); } }, { key: "isSourceId", value: function isSourceId(handlerId) { var role = parseRoleFromHandlerId(handlerId); return role === _interfaces.HandlerRole.SOURCE; } }, { key: "isTargetId", value: function isTargetId(handlerId) { var role = parseRoleFromHandlerId(handlerId); return role === _interfaces.HandlerRole.TARGET; } }, { key: "removeSource", value: function removeSource(sourceId) { var _this = this; (0, _invariant.invariant)(this.getSource(sourceId), 'Expected an existing source.'); this.store.dispatch((0, _registry.removeSource)(sourceId)); (0, _asap.asap)(function () { _this.dragSources.delete(sourceId); _this.types.delete(sourceId); }); } }, { key: "removeTarget", value: function removeTarget(targetId) { (0, _invariant.invariant)(this.getTarget(targetId), 'Expected an existing target.'); this.store.dispatch((0, _registry.removeTarget)(targetId)); this.dropTargets.delete(targetId); this.types.delete(targetId); } }, { key: "pinSource", value: function pinSource(sourceId) { var source = this.getSource(sourceId); (0, _invariant.invariant)(source, 'Expected an existing source.'); this.pinnedSourceId = sourceId; this.pinnedSource = source; } }, { key: "unpinSource", value: function unpinSource() { (0, _invariant.invariant)(this.pinnedSource, 'No source is pinned at the time.'); this.pinnedSourceId = null; this.pinnedSource = null; } }, { key: "addHandler", value: function addHandler(role, type, handler) { var id = getNextHandlerId(role); this.types.set(id, type); if (role === _interfaces.HandlerRole.SOURCE) { this.dragSources.set(id, handler); } else if (role === _interfaces.HandlerRole.TARGET) { this.dropTargets.set(id, handler); } return id; } }]); return HandlerRegistryImpl; }(); exports.HandlerRegistryImpl = HandlerRegistryImpl;PKs[�\_$��MMdist/cjs/DragDropMonitorImpl.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DragDropMonitorImpl = void 0; var _invariant = require("@react-dnd/invariant"); var _matchesType = require("./utils/matchesType"); var _coords = require("./utils/coords"); var _dirtiness = require("./utils/dirtiness"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var DragDropMonitorImpl = /*#__PURE__*/function () { function DragDropMonitorImpl(store, registry) { _classCallCheck(this, DragDropMonitorImpl); this.store = store; this.registry = registry; } _createClass(DragDropMonitorImpl, [{ key: "subscribeToStateChange", value: function subscribeToStateChange(listener) { var _this = this; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { handlerIds: undefined }; var handlerIds = options.handlerIds; (0, _invariant.invariant)(typeof listener === 'function', 'listener must be a function.'); (0, _invariant.invariant)(typeof handlerIds === 'undefined' || Array.isArray(handlerIds), 'handlerIds, when specified, must be an array of strings.'); var prevStateId = this.store.getState().stateId; var handleChange = function handleChange() { var state = _this.store.getState(); var currentStateId = state.stateId; try { var canSkipListener = currentStateId === prevStateId || currentStateId === prevStateId + 1 && !(0, _dirtiness.areDirty)(state.dirtyHandlerIds, handlerIds); if (!canSkipListener) { listener(); } } finally { prevStateId = currentStateId; } }; return this.store.subscribe(handleChange); } }, { key: "subscribeToOffsetChange", value: function subscribeToOffsetChange(listener) { var _this2 = this; (0, _invariant.invariant)(typeof listener === 'function', 'listener must be a function.'); var previousState = this.store.getState().dragOffset; var handleChange = function handleChange() { var nextState = _this2.store.getState().dragOffset; if (nextState === previousState) { return; } previousState = nextState; listener(); }; return this.store.subscribe(handleChange); } }, { key: "canDragSource", value: function canDragSource(sourceId) { if (!sourceId) { return false; } var source = this.registry.getSource(sourceId); (0, _invariant.invariant)(source, 'Expected to find a valid source.'); if (this.isDragging()) { return false; } return source.canDrag(this, sourceId); } }, { key: "canDropOnTarget", value: function canDropOnTarget(targetId) { // undefined on initial render if (!targetId) { return false; } var target = this.registry.getTarget(targetId); (0, _invariant.invariant)(target, 'Expected to find a valid target.'); if (!this.isDragging() || this.didDrop()) { return false; } var targetType = this.registry.getTargetType(targetId); var draggedItemType = this.getItemType(); return (0, _matchesType.matchesType)(targetType, draggedItemType) && target.canDrop(this, targetId); } }, { key: "isDragging", value: function isDragging() { return Boolean(this.getItemType()); } }, { key: "isDraggingSource", value: function isDraggingSource(sourceId) { // undefined on initial render if (!sourceId) { return false; } var source = this.registry.getSource(sourceId, true); (0, _invariant.invariant)(source, 'Expected to find a valid source.'); if (!this.isDragging() || !this.isSourcePublic()) { return false; } var sourceType = this.registry.getSourceType(sourceId); var draggedItemType = this.getItemType(); if (sourceType !== draggedItemType) { return false; } return source.isDragging(this, sourceId); } }, { key: "isOverTarget", value: function isOverTarget(targetId) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { shallow: false }; // undefined on initial render if (!targetId) { return false; } var shallow = options.shallow; if (!this.isDragging()) { return false; } var targetType = this.registry.getTargetType(targetId); var draggedItemType = this.getItemType(); if (draggedItemType && !(0, _matchesType.matchesType)(targetType, draggedItemType)) { return false; } var targetIds = this.getTargetIds(); if (!targetIds.length) { return false; } var index = targetIds.indexOf(targetId); if (shallow) { return index === targetIds.length - 1; } else { return index > -1; } } }, { key: "getItemType", value: function getItemType() { return this.store.getState().dragOperation.itemType; } }, { key: "getItem", value: function getItem() { return this.store.getState().dragOperation.item; } }, { key: "getSourceId", value: function getSourceId() { return this.store.getState().dragOperation.sourceId; } }, { key: "getTargetIds", value: function getTargetIds() { return this.store.getState().dragOperation.targetIds; } }, { key: "getDropResult", value: function getDropResult() { return this.store.getState().dragOperation.dropResult; } }, { key: "didDrop", value: function didDrop() { return this.store.getState().dragOperation.didDrop; } }, { key: "isSourcePublic", value: function isSourcePublic() { return Boolean(this.store.getState().dragOperation.isSourcePublic); } }, { key: "getInitialClientOffset", value: function getInitialClientOffset() { return this.store.getState().dragOffset.initialClientOffset; } }, { key: "getInitialSourceClientOffset", value: function getInitialSourceClientOffset() { return this.store.getState().dragOffset.initialSourceClientOffset; } }, { key: "getClientOffset", value: function getClientOffset() { return this.store.getState().dragOffset.clientOffset; } }, { key: "getSourceClientOffset", value: function getSourceClientOffset() { return (0, _coords.getSourceClientOffset)(this.store.getState().dragOffset); } }, { key: "getDifferenceFromInitialOffset", value: function getDifferenceFromInitialOffset() { return (0, _coords.getDifferenceFromInitialOffset)(this.store.getState().dragOffset); } }]); return DragDropMonitorImpl; }(); exports.DragDropMonitorImpl = DragDropMonitorImpl;PKs[�\-���!dist/cjs/utils/getNextUniqueId.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNextUniqueId = getNextUniqueId; var nextUniqueId = 0; function getNextUniqueId() { return nextUniqueId++; }PKs[�\�H���dist/cjs/utils/coords.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.add = add; exports.subtract = subtract; exports.getSourceClientOffset = getSourceClientOffset; exports.getDifferenceFromInitialOffset = getDifferenceFromInitialOffset; /** * Coordinate addition * @param a The first coordinate * @param b The second coordinate */ function add(a, b) { return { x: a.x + b.x, y: a.y + b.y }; } /** * Coordinate subtraction * @param a The first coordinate * @param b The second coordinate */ function subtract(a, b) { return { x: a.x - b.x, y: a.y - b.y }; } /** * Returns the cartesian distance of the drag source component's position, based on its position * at the time when the current drag operation has started, and the movement difference. * * Returns null if no item is being dragged. * * @param state The offset state to compute from */ function getSourceClientOffset(state) { var clientOffset = state.clientOffset, initialClientOffset = state.initialClientOffset, initialSourceClientOffset = state.initialSourceClientOffset; if (!clientOffset || !initialClientOffset || !initialSourceClientOffset) { return null; } return subtract(add(clientOffset, initialSourceClientOffset), initialClientOffset); } /** * Determines the x,y offset between the client offset and the initial client offset * * @param state The offset state to compute from */ function getDifferenceFromInitialOffset(state) { var clientOffset = state.clientOffset, initialClientOffset = state.initialClientOffset; if (!clientOffset || !initialClientOffset) { return null; } return subtract(clientOffset, initialClientOffset); }PKs[�\< �88dist/cjs/utils/equality.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.areCoordsEqual = areCoordsEqual; exports.areArraysEqual = areArraysEqual; exports.strictEquality = void 0; var strictEquality = function strictEquality(a, b) { return a === b; }; /** * Determine if two cartesian coordinate offsets are equal * @param offsetA * @param offsetB */ exports.strictEquality = strictEquality; function areCoordsEqual(offsetA, offsetB) { if (!offsetA && !offsetB) { return true; } else if (!offsetA || !offsetB) { return false; } else { return offsetA.x === offsetB.x && offsetA.y === offsetB.y; } } /** * Determines if two arrays of items are equal * @param a The first array of items * @param b The second array of items */ function areArraysEqual(a, b) { var isEqual = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : strictEquality; if (a.length !== b.length) { return false; } for (var i = 0; i < a.length; ++i) { if (!isEqual(a[i], b[i])) { return false; } } return true; }PKs[�\Z$�}}dist/cjs/utils/matchesType.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.matchesType = matchesType; function matchesType(targetType, draggedItemType) { if (draggedItemType === null) { return targetType === null; } return Array.isArray(targetType) ? targetType.some(function (t) { return t === draggedItemType; }) : targetType === draggedItemType; }PKs[�\�ލ��dist/cjs/utils/js_utils.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.get = get; exports.without = without; exports.isString = isString; exports.isObject = isObject; exports.xor = xor; exports.intersection = intersection; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } // cheap lodash replacements /** * drop-in replacement for _.get * @param obj * @param path * @param defaultValue */ function get(obj, path, defaultValue) { return path.split('.').reduce(function (a, c) { return a && a[c] ? a[c] : defaultValue || null; }, obj); } /** * drop-in replacement for _.without */ function without(items, item) { return items.filter(function (i) { return i !== item; }); } /** * drop-in replacement for _.isString * @param input */ function isString(input) { return typeof input === 'string'; } /** * drop-in replacement for _.isString * @param input */ function isObject(input) { return _typeof(input) === 'object'; } /** * repalcement for _.xor * @param itemsA * @param itemsB */ function xor(itemsA, itemsB) { var map = new Map(); var insertItem = function insertItem(item) { map.set(item, map.has(item) ? map.get(item) + 1 : 1); }; itemsA.forEach(insertItem); itemsB.forEach(insertItem); var result = []; map.forEach(function (count, key) { if (count === 1) { result.push(key); } }); return result; } /** * replacement for _.intersection * @param itemsA * @param itemsB */ function intersection(itemsA, itemsB) { return itemsA.filter(function (t) { return itemsB.indexOf(t) > -1; }); }PKs[�\�G���dist/cjs/utils/dirtiness.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.areDirty = areDirty; exports.ALL = exports.NONE = void 0; var _js_utils = require("./js_utils"); var NONE = []; exports.NONE = NONE; var ALL = []; exports.ALL = ALL; NONE.__IS_NONE__ = true; ALL.__IS_ALL__ = true; /** * Determines if the given handler IDs are dirty or not. * * @param dirtyIds The set of dirty handler ids * @param handlerIds The set of handler ids to check */ function areDirty(dirtyIds, handlerIds) { if (dirtyIds === NONE) { return false; } if (dirtyIds === ALL || typeof handlerIds === 'undefined') { return true; } var commonIds = (0, _js_utils.intersection)(handlerIds, dirtyIds); return commonIds.length > 0; }PKs[�\/?�i��dist/cjs/index.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _interfaces = require("./interfaces"); Object.keys(_interfaces).forEach(function (key) { if (key === "default" || key === "__esModule") return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _interfaces[key]; } }); }); var _factories = require("./factories"); Object.keys(_factories).forEach(function (key) { if (key === "default" || key === "__esModule") return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _factories[key]; } }); });PKs[�\����YYdist/cjs/actions/registry.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addSource = addSource; exports.addTarget = addTarget; exports.removeSource = removeSource; exports.removeTarget = removeTarget; exports.REMOVE_TARGET = exports.REMOVE_SOURCE = exports.ADD_TARGET = exports.ADD_SOURCE = void 0; var ADD_SOURCE = 'dnd-core/ADD_SOURCE'; exports.ADD_SOURCE = ADD_SOURCE; var ADD_TARGET = 'dnd-core/ADD_TARGET'; exports.ADD_TARGET = ADD_TARGET; var REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE'; exports.REMOVE_SOURCE = REMOVE_SOURCE; var REMOVE_TARGET = 'dnd-core/REMOVE_TARGET'; exports.REMOVE_TARGET = REMOVE_TARGET; function addSource(sourceId) { return { type: ADD_SOURCE, payload: { sourceId: sourceId } }; } function addTarget(targetId) { return { type: ADD_TARGET, payload: { targetId: targetId } }; } function removeSource(sourceId) { return { type: REMOVE_SOURCE, payload: { sourceId: sourceId } }; } function removeTarget(targetId) { return { type: REMOVE_TARGET, payload: { targetId: targetId } }; }PKs[�\R�R2dist/cjs/actions/dragDrop/local/setClientOffset.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setClientOffset = setClientOffset; var _types = require("../types"); function setClientOffset(clientOffset, sourceClientOffset) { return { type: _types.INIT_COORDS, payload: { sourceClientOffset: sourceClientOffset || null, clientOffset: clientOffset || null } }; }PKs[�\�:\||"dist/cjs/actions/dragDrop/types.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.END_DRAG = exports.DROP = exports.HOVER = exports.PUBLISH_DRAG_SOURCE = exports.BEGIN_DRAG = exports.INIT_COORDS = void 0; var INIT_COORDS = 'dnd-core/INIT_COORDS'; exports.INIT_COORDS = INIT_COORDS; var BEGIN_DRAG = 'dnd-core/BEGIN_DRAG'; exports.BEGIN_DRAG = BEGIN_DRAG; var PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE'; exports.PUBLISH_DRAG_SOURCE = PUBLISH_DRAG_SOURCE; var HOVER = 'dnd-core/HOVER'; exports.HOVER = HOVER; var DROP = 'dnd-core/DROP'; exports.DROP = DROP; var END_DRAG = 'dnd-core/END_DRAG'; exports.END_DRAG = END_DRAG;PKs[�\�_#���.dist/cjs/actions/dragDrop/publishDragSource.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createPublishDragSource = createPublishDragSource; var _types = require("./types"); function createPublishDragSource(manager) { return function publishDragSource() { var monitor = manager.getMonitor(); if (monitor.isDragging()) { return { type: _types.PUBLISH_DRAG_SOURCE }; } }; }PKs[�\�˫�$dist/cjs/actions/dragDrop/endDrag.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createEndDrag = createEndDrag; var _invariant = require("@react-dnd/invariant"); var _types = require("./types"); function createEndDrag(manager) { return function endDrag() { var monitor = manager.getMonitor(); var registry = manager.getRegistry(); verifyIsDragging(monitor); var sourceId = monitor.getSourceId(); if (sourceId != null) { var source = registry.getSource(sourceId, true); source.endDrag(monitor, sourceId); registry.unpinSource(); } return { type: _types.END_DRAG }; }; } function verifyIsDragging(monitor) { (0, _invariant.invariant)(monitor.isDragging(), 'Cannot call endDrag while not dragging.'); }PKs[�\�� **"dist/cjs/actions/dragDrop/index.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { createDragDropActions: true }; exports.createDragDropActions = createDragDropActions; var _beginDrag = require("./beginDrag"); var _publishDragSource = require("./publishDragSource"); var _hover = require("./hover"); var _drop = require("./drop"); var _endDrag = require("./endDrag"); var _types = require("./types"); Object.keys(_types).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _types[key]; } }); }); function createDragDropActions(manager) { return { beginDrag: (0, _beginDrag.createBeginDrag)(manager), publishDragSource: (0, _publishDragSource.createPublishDragSource)(manager), hover: (0, _hover.createHover)(manager), drop: (0, _drop.createDrop)(manager), endDrag: (0, _endDrag.createEndDrag)(manager) }; }PKs[�\����� � "dist/cjs/actions/dragDrop/hover.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createHover = createHover; var _invariant = require("@react-dnd/invariant"); var _matchesType = require("../../utils/matchesType"); var _types = require("./types"); function createHover(manager) { return function hover(targetIdsArg) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, clientOffset = _ref.clientOffset; verifyTargetIdsIsArray(targetIdsArg); var targetIds = targetIdsArg.slice(0); var monitor = manager.getMonitor(); var registry = manager.getRegistry(); checkInvariants(targetIds, monitor, registry); var draggedItemType = monitor.getItemType(); removeNonMatchingTargetIds(targetIds, registry, draggedItemType); hoverAllTargets(targetIds, monitor, registry); return { type: _types.HOVER, payload: { targetIds: targetIds, clientOffset: clientOffset || null } }; }; } function verifyTargetIdsIsArray(targetIdsArg) { (0, _invariant.invariant)(Array.isArray(targetIdsArg), 'Expected targetIds to be an array.'); } function checkInvariants(targetIds, monitor, registry) { (0, _invariant.invariant)(monitor.isDragging(), 'Cannot call hover while not dragging.'); (0, _invariant.invariant)(!monitor.didDrop(), 'Cannot call hover after drop.'); for (var i = 0; i < targetIds.length; i++) { var targetId = targetIds[i]; (0, _invariant.invariant)(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); var target = registry.getTarget(targetId); (0, _invariant.invariant)(target, 'Expected targetIds to be registered.'); } } function removeNonMatchingTargetIds(targetIds, registry, draggedItemType) { // Remove those targetIds that don't match the targetType. This // fixes shallow isOver which would only be non-shallow because of // non-matching targets. for (var i = targetIds.length - 1; i >= 0; i--) { var targetId = targetIds[i]; var targetType = registry.getTargetType(targetId); if (!(0, _matchesType.matchesType)(targetType, draggedItemType)) { targetIds.splice(i, 1); } } } function hoverAllTargets(targetIds, monitor, registry) { // Finally call hover on all matching targets. targetIds.forEach(function (targetId) { var target = registry.getTarget(targetId); target.hover(monitor, targetId); }); }PKs[�\�8M���&dist/cjs/actions/dragDrop/beginDrag.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createBeginDrag = createBeginDrag; var _invariant = require("@react-dnd/invariant"); var _setClientOffset = require("./local/setClientOffset"); var _js_utils = require("../../utils/js_utils"); var _types = require("./types"); var ResetCoordinatesAction = { type: _types.INIT_COORDS, payload: { clientOffset: null, sourceClientOffset: null } }; function createBeginDrag(manager) { return function beginDrag() { var sourceIds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { publishSource: true }; var _options$publishSourc = options.publishSource, publishSource = _options$publishSourc === void 0 ? true : _options$publishSourc, clientOffset = options.clientOffset, getSourceClientOffset = options.getSourceClientOffset; var monitor = manager.getMonitor(); var registry = manager.getRegistry(); // Initialize the coordinates using the client offset manager.dispatch((0, _setClientOffset.setClientOffset)(clientOffset)); verifyInvariants(sourceIds, monitor, registry); // Get the draggable source var sourceId = getDraggableSource(sourceIds, monitor); if (sourceId === null) { manager.dispatch(ResetCoordinatesAction); return; } // Get the source client offset var sourceClientOffset = null; if (clientOffset) { if (!getSourceClientOffset) { throw new Error('getSourceClientOffset must be defined'); } verifyGetSourceClientOffsetIsFunction(getSourceClientOffset); sourceClientOffset = getSourceClientOffset(sourceId); } // Initialize the full coordinates manager.dispatch((0, _setClientOffset.setClientOffset)(clientOffset, sourceClientOffset)); var source = registry.getSource(sourceId); var item = source.beginDrag(monitor, sourceId); verifyItemIsObject(item); registry.pinSource(sourceId); var itemType = registry.getSourceType(sourceId); return { type: _types.BEGIN_DRAG, payload: { itemType: itemType, item: item, sourceId: sourceId, clientOffset: clientOffset || null, sourceClientOffset: sourceClientOffset || null, isSourcePublic: !!publishSource } }; }; } function verifyInvariants(sourceIds, monitor, registry) { (0, _invariant.invariant)(!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); sourceIds.forEach(function (sourceId) { (0, _invariant.invariant)(registry.getSource(sourceId), 'Expected sourceIds to be registered.'); }); } function verifyGetSourceClientOffsetIsFunction(getSourceClientOffset) { (0, _invariant.invariant)(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); } function verifyItemIsObject(item) { (0, _invariant.invariant)((0, _js_utils.isObject)(item), 'Item must be an object.'); } function getDraggableSource(sourceIds, monitor) { var sourceId = null; for (var i = sourceIds.length - 1; i >= 0; i--) { if (monitor.canDragSource(sourceIds[i])) { sourceId = sourceIds[i]; break; } } return sourceId; }PKs[�\��~���!dist/cjs/actions/dragDrop/drop.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createDrop = createDrop; var _invariant = require("@react-dnd/invariant"); var _types = require("./types"); var _js_utils = require("../../utils/js_utils"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function createDrop(manager) { return function drop() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var monitor = manager.getMonitor(); var registry = manager.getRegistry(); verifyInvariants(monitor); var targetIds = getDroppableTargets(monitor); // Multiple actions are dispatched here, which is why this doesn't return an action targetIds.forEach(function (targetId, index) { var dropResult = determineDropResult(targetId, index, registry, monitor); var action = { type: _types.DROP, payload: { dropResult: _objectSpread(_objectSpread({}, options), dropResult) } }; manager.dispatch(action); }); }; } function verifyInvariants(monitor) { (0, _invariant.invariant)(monitor.isDragging(), 'Cannot call drop while not dragging.'); (0, _invariant.invariant)(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); } function determineDropResult(targetId, index, registry, monitor) { var target = registry.getTarget(targetId); var dropResult = target ? target.drop(monitor, targetId) : undefined; verifyDropResultType(dropResult); if (typeof dropResult === 'undefined') { dropResult = index === 0 ? {} : monitor.getDropResult(); } return dropResult; } function verifyDropResultType(dropResult) { (0, _invariant.invariant)(typeof dropResult === 'undefined' || (0, _js_utils.isObject)(dropResult), 'Drop result must either be an object or undefined.'); } function getDroppableTargets(monitor) { var targetIds = monitor.getTargetIds().filter(monitor.canDropOnTarget, monitor); targetIds.reverse(); return targetIds; }PKs[�\�����dist/cjs/contracts.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateSourceContract = validateSourceContract; exports.validateTargetContract = validateTargetContract; exports.validateType = validateType; var _invariant = require("@react-dnd/invariant"); function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function validateSourceContract(source) { (0, _invariant.invariant)(typeof source.canDrag === 'function', 'Expected canDrag to be a function.'); (0, _invariant.invariant)(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.'); (0, _invariant.invariant)(typeof source.endDrag === 'function', 'Expected endDrag to be a function.'); } function validateTargetContract(target) { (0, _invariant.invariant)(typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); (0, _invariant.invariant)(typeof target.hover === 'function', 'Expected hover to be a function.'); (0, _invariant.invariant)(typeof target.drop === 'function', 'Expected beginDrag to be a function.'); } function validateType(type, allowArray) { if (allowArray && Array.isArray(type)) { type.forEach(function (t) { return validateType(t, false); }); return; } (0, _invariant.invariant)(typeof type === 'string' || _typeof(type) === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.'); }PKs[�\�H�|AAdist/cjs/interfaces.jsnu�[���"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HandlerRole = void 0; var HandlerRole; exports.HandlerRole = HandlerRole; (function (HandlerRole) { HandlerRole["SOURCE"] = "SOURCE"; HandlerRole["TARGET"] = "TARGET"; })(HandlerRole || (exports.HandlerRole = HandlerRole = {}));PKs[�\�7A���dist/esm/reducers/refCount.jsnu�[���import { ADD_SOURCE, ADD_TARGET, REMOVE_SOURCE, REMOVE_TARGET } from '../actions/registry'; export function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case ADD_SOURCE: case ADD_TARGET: return state + 1; case REMOVE_SOURCE: case REMOVE_TARGET: return state - 1; default: return state; } }PKs[�\�����dist/esm/reducers/index.jsnu�[���function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import { reduce as dragOffset } from './dragOffset'; import { reduce as dragOperation } from './dragOperation'; import { reduce as refCount } from './refCount'; import { reduce as dirtyHandlerIds } from './dirtyHandlerIds'; import { reduce as stateId } from './stateId'; import { get } from '../utils/js_utils'; export function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments.length > 1 ? arguments[1] : undefined; return { dirtyHandlerIds: dirtyHandlerIds(state.dirtyHandlerIds, { type: action.type, payload: _objectSpread(_objectSpread({}, action.payload), {}, { prevTargetIds: get(state, 'dragOperation.targetIds', []) }) }), dragOffset: dragOffset(state.dragOffset, action), refCount: refCount(state.refCount, action), dragOperation: dragOperation(state.dragOperation, action), stateId: stateId(state.stateId) }; }PKs[�\���<YYdist/esm/reducers/dragOffset.jsnu�[���function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import { INIT_COORDS, BEGIN_DRAG, HOVER, END_DRAG, DROP } from '../actions/dragDrop'; import { areCoordsEqual } from '../utils/equality'; var initialState = { initialSourceClientOffset: null, initialClientOffset: null, clientOffset: null }; export function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; var action = arguments.length > 1 ? arguments[1] : undefined; var payload = action.payload; switch (action.type) { case INIT_COORDS: case BEGIN_DRAG: return { initialSourceClientOffset: payload.sourceClientOffset, initialClientOffset: payload.clientOffset, clientOffset: payload.clientOffset }; case HOVER: if (areCoordsEqual(state.clientOffset, payload.clientOffset)) { return state; } return _objectSpread(_objectSpread({}, state), {}, { clientOffset: payload.clientOffset }); case END_DRAG: case DROP: return initialState; default: return state; } }PKs[�\gݍ���$dist/esm/reducers/dirtyHandlerIds.jsnu�[���import { BEGIN_DRAG, PUBLISH_DRAG_SOURCE, HOVER, END_DRAG, DROP } from '../actions/dragDrop'; import { ADD_SOURCE, ADD_TARGET, REMOVE_SOURCE, REMOVE_TARGET } from '../actions/registry'; import { areArraysEqual } from '../utils/equality'; import { NONE, ALL } from '../utils/dirtiness'; import { xor } from '../utils/js_utils'; export function reduce() { var _state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : NONE; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case HOVER: break; case ADD_SOURCE: case ADD_TARGET: case REMOVE_TARGET: case REMOVE_SOURCE: return NONE; case BEGIN_DRAG: case PUBLISH_DRAG_SOURCE: case END_DRAG: case DROP: default: return ALL; } var _action$payload = action.payload, _action$payload$targe = _action$payload.targetIds, targetIds = _action$payload$targe === void 0 ? [] : _action$payload$targe, _action$payload$prevT = _action$payload.prevTargetIds, prevTargetIds = _action$payload$prevT === void 0 ? [] : _action$payload$prevT; var result = xor(targetIds, prevTargetIds); var didChange = result.length > 0 || !areArraysEqual(targetIds, prevTargetIds); if (!didChange) { return NONE; } // Check the target ids at the innermost position. If they are valid, add them // to the result var prevInnermostTargetId = prevTargetIds[prevTargetIds.length - 1]; var innermostTargetId = targetIds[targetIds.length - 1]; if (prevInnermostTargetId !== innermostTargetId) { if (prevInnermostTargetId) { result.push(prevInnermostTargetId); } if (innermostTargetId) { result.push(innermostTargetId); } } return result; }PKs[�\�7c��dist/esm/reducers/stateId.jsnu�[���export function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; return state + 1; }PKs[�\af�6ww"dist/esm/reducers/dragOperation.jsnu�[���function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import { BEGIN_DRAG, PUBLISH_DRAG_SOURCE, HOVER, END_DRAG, DROP } from '../actions/dragDrop'; import { REMOVE_TARGET } from '../actions/registry'; import { without } from '../utils/js_utils'; var initialState = { itemType: null, item: null, sourceId: null, targetIds: [], dropResult: null, didDrop: false, isSourcePublic: null }; export function reduce() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; var action = arguments.length > 1 ? arguments[1] : undefined; var payload = action.payload; switch (action.type) { case BEGIN_DRAG: return _objectSpread(_objectSpread({}, state), {}, { itemType: payload.itemType, item: payload.item, sourceId: payload.sourceId, isSourcePublic: payload.isSourcePublic, dropResult: null, didDrop: false }); case PUBLISH_DRAG_SOURCE: return _objectSpread(_objectSpread({}, state), {}, { isSourcePublic: true }); case HOVER: return _objectSpread(_objectSpread({}, state), {}, { targetIds: payload.targetIds }); case REMOVE_TARGET: if (state.targetIds.indexOf(payload.targetId) === -1) { return state; } return _objectSpread(_objectSpread({}, state), {}, { targetIds: without(state.targetIds, payload.targetId) }); case DROP: return _objectSpread(_objectSpread({}, state), {}, { dropResult: payload.dropResult, didDrop: true, targetIds: [] }); case END_DRAG: return _objectSpread(_objectSpread({}, state), {}, { itemType: null, item: null, sourceId: null, dropResult: null, didDrop: false, isSourcePublic: null, targetIds: [] }); default: return state; } }PKs[�\�;QQdist/esm/factories.jsnu�[���import { DragDropManagerImpl } from './DragDropManagerImpl'; export function createDragDropManager(backendFactory, globalContext, backendOptions, debugMode) { var manager = new DragDropManagerImpl(debugMode); var backend = backendFactory(manager, globalContext, backendOptions); manager.receiveBackend(backend); return manager; }PKs[�\N#~�jjdist/esm/DragDropManagerImpl.jsnu�[���function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } import { createStore } from 'redux'; import { reduce } from './reducers'; import { createDragDropActions } from './actions/dragDrop'; import { DragDropMonitorImpl } from './DragDropMonitorImpl'; import { HandlerRegistryImpl } from './HandlerRegistryImpl'; function makeStoreInstance(debugMode) { // TODO: if we ever make a react-native version of this, // we'll need to consider how to pull off dev-tooling var reduxDevTools = typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__; return createStore(reduce, debugMode && reduxDevTools && reduxDevTools({ name: 'dnd-core', instanceId: 'dnd-core' })); } export var DragDropManagerImpl = /*#__PURE__*/function () { function DragDropManagerImpl() { var _this = this; var debugMode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; _classCallCheck(this, DragDropManagerImpl); this.isSetUp = false; this.handleRefCountChange = function () { var shouldSetUp = _this.store.getState().refCount > 0; if (_this.backend) { if (shouldSetUp && !_this.isSetUp) { _this.backend.setup(); _this.isSetUp = true; } else if (!shouldSetUp && _this.isSetUp) { _this.backend.teardown(); _this.isSetUp = false; } } }; var store = makeStoreInstance(debugMode); this.store = store; this.monitor = new DragDropMonitorImpl(store, new HandlerRegistryImpl(store)); store.subscribe(this.handleRefCountChange); } _createClass(DragDropManagerImpl, [{ key: "receiveBackend", value: function receiveBackend(backend) { this.backend = backend; } }, { key: "getMonitor", value: function getMonitor() { return this.monitor; } }, { key: "getBackend", value: function getBackend() { return this.backend; } }, { key: "getRegistry", value: function getRegistry() { return this.monitor.registry; } }, { key: "getActions", value: function getActions() { /* eslint-disable-next-line @typescript-eslint/no-this-alias */ var manager = this; var dispatch = this.store.dispatch; function bindActionCreator(actionCreator) { return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var action = actionCreator.apply(manager, args); if (typeof action !== 'undefined') { dispatch(action); } }; } var actions = createDragDropActions(this); return Object.keys(actions).reduce(function (boundActions, key) { var action = actions[key]; boundActions[key] = bindActionCreator(action); return boundActions; }, {}); } }, { key: "dispatch", value: function dispatch(action) { this.store.dispatch(action); } }]); return DragDropManagerImpl; }();PKs[�\������dist/esm/HandlerRegistryImpl.jsnu�[���function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } import { invariant } from '@react-dnd/invariant'; import { addSource as _addSource, addTarget as _addTarget, removeSource as _removeSource, removeTarget as _removeTarget } from './actions/registry'; import { getNextUniqueId } from './utils/getNextUniqueId'; import { HandlerRole } from './interfaces'; import { validateSourceContract, validateTargetContract, validateType } from './contracts'; import { asap } from '@react-dnd/asap'; function getNextHandlerId(role) { var id = getNextUniqueId().toString(); switch (role) { case HandlerRole.SOURCE: return "S".concat(id); case HandlerRole.TARGET: return "T".concat(id); default: throw new Error("Unknown Handler Role: ".concat(role)); } } function parseRoleFromHandlerId(handlerId) { switch (handlerId[0]) { case 'S': return HandlerRole.SOURCE; case 'T': return HandlerRole.TARGET; default: invariant(false, "Cannot parse handler ID: ".concat(handlerId)); } } function mapContainsValue(map, searchValue) { var entries = map.entries(); var isDone = false; do { var _entries$next = entries.next(), done = _entries$next.done, _entries$next$value = _slicedToArray(_entries$next.value, 2), value = _entries$next$value[1]; if (value === searchValue) { return true; } isDone = !!done; } while (!isDone); return false; } export var HandlerRegistryImpl = /*#__PURE__*/function () { function HandlerRegistryImpl(store) { _classCallCheck(this, HandlerRegistryImpl); this.types = new Map(); this.dragSources = new Map(); this.dropTargets = new Map(); this.pinnedSourceId = null; this.pinnedSource = null; this.store = store; } _createClass(HandlerRegistryImpl, [{ key: "addSource", value: function addSource(type, source) { validateType(type); validateSourceContract(source); var sourceId = this.addHandler(HandlerRole.SOURCE, type, source); this.store.dispatch(_addSource(sourceId)); return sourceId; } }, { key: "addTarget", value: function addTarget(type, target) { validateType(type, true); validateTargetContract(target); var targetId = this.addHandler(HandlerRole.TARGET, type, target); this.store.dispatch(_addTarget(targetId)); return targetId; } }, { key: "containsHandler", value: function containsHandler(handler) { return mapContainsValue(this.dragSources, handler) || mapContainsValue(this.dropTargets, handler); } }, { key: "getSource", value: function getSource(sourceId) { var includePinned = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; invariant(this.isSourceId(sourceId), 'Expected a valid source ID.'); var isPinned = includePinned && sourceId === this.pinnedSourceId; var source = isPinned ? this.pinnedSource : this.dragSources.get(sourceId); return source; } }, { key: "getTarget", value: function getTarget(targetId) { invariant(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.dropTargets.get(targetId); } }, { key: "getSourceType", value: function getSourceType(sourceId) { invariant(this.isSourceId(sourceId), 'Expected a valid source ID.'); return this.types.get(sourceId); } }, { key: "getTargetType", value: function getTargetType(targetId) { invariant(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.types.get(targetId); } }, { key: "isSourceId", value: function isSourceId(handlerId) { var role = parseRoleFromHandlerId(handlerId); return role === HandlerRole.SOURCE; } }, { key: "isTargetId", value: function isTargetId(handlerId) { var role = parseRoleFromHandlerId(handlerId); return role === HandlerRole.TARGET; } }, { key: "removeSource", value: function removeSource(sourceId) { var _this = this; invariant(this.getSource(sourceId), 'Expected an existing source.'); this.store.dispatch(_removeSource(sourceId)); asap(function () { _this.dragSources.delete(sourceId); _this.types.delete(sourceId); }); } }, { key: "removeTarget", value: function removeTarget(targetId) { invariant(this.getTarget(targetId), 'Expected an existing target.'); this.store.dispatch(_removeTarget(targetId)); this.dropTargets.delete(targetId); this.types.delete(targetId); } }, { key: "pinSource", value: function pinSource(sourceId) { var source = this.getSource(sourceId); invariant(source, 'Expected an existing source.'); this.pinnedSourceId = sourceId; this.pinnedSource = source; } }, { key: "unpinSource", value: function unpinSource() { invariant(this.pinnedSource, 'No source is pinned at the time.'); this.pinnedSourceId = null; this.pinnedSource = null; } }, { key: "addHandler", value: function addHandler(role, type, handler) { var id = getNextHandlerId(role); this.types.set(id, type); if (role === HandlerRole.SOURCE) { this.dragSources.set(id, handler); } else if (role === HandlerRole.TARGET) { this.dropTargets.set(id, handler); } return id; } }]); return HandlerRegistryImpl; }();PKs[�\*��dddist/esm/DragDropMonitorImpl.jsnu�[���function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } import { invariant } from '@react-dnd/invariant'; import { matchesType } from './utils/matchesType'; import { getSourceClientOffset as _getSourceClientOffset, getDifferenceFromInitialOffset as _getDifferenceFromInitialOffset } from './utils/coords'; import { areDirty } from './utils/dirtiness'; export var DragDropMonitorImpl = /*#__PURE__*/function () { function DragDropMonitorImpl(store, registry) { _classCallCheck(this, DragDropMonitorImpl); this.store = store; this.registry = registry; } _createClass(DragDropMonitorImpl, [{ key: "subscribeToStateChange", value: function subscribeToStateChange(listener) { var _this = this; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { handlerIds: undefined }; var handlerIds = options.handlerIds; invariant(typeof listener === 'function', 'listener must be a function.'); invariant(typeof handlerIds === 'undefined' || Array.isArray(handlerIds), 'handlerIds, when specified, must be an array of strings.'); var prevStateId = this.store.getState().stateId; var handleChange = function handleChange() { var state = _this.store.getState(); var currentStateId = state.stateId; try { var canSkipListener = currentStateId === prevStateId || currentStateId === prevStateId + 1 && !areDirty(state.dirtyHandlerIds, handlerIds); if (!canSkipListener) { listener(); } } finally { prevStateId = currentStateId; } }; return this.store.subscribe(handleChange); } }, { key: "subscribeToOffsetChange", value: function subscribeToOffsetChange(listener) { var _this2 = this; invariant(typeof listener === 'function', 'listener must be a function.'); var previousState = this.store.getState().dragOffset; var handleChange = function handleChange() { var nextState = _this2.store.getState().dragOffset; if (nextState === previousState) { return; } previousState = nextState; listener(); }; return this.store.subscribe(handleChange); } }, { key: "canDragSource", value: function canDragSource(sourceId) { if (!sourceId) { return false; } var source = this.registry.getSource(sourceId); invariant(source, 'Expected to find a valid source.'); if (this.isDragging()) { return false; } return source.canDrag(this, sourceId); } }, { key: "canDropOnTarget", value: function canDropOnTarget(targetId) { // undefined on initial render if (!targetId) { return false; } var target = this.registry.getTarget(targetId); invariant(target, 'Expected to find a valid target.'); if (!this.isDragging() || this.didDrop()) { return false; } var targetType = this.registry.getTargetType(targetId); var draggedItemType = this.getItemType(); return matchesType(targetType, draggedItemType) && target.canDrop(this, targetId); } }, { key: "isDragging", value: function isDragging() { return Boolean(this.getItemType()); } }, { key: "isDraggingSource", value: function isDraggingSource(sourceId) { // undefined on initial render if (!sourceId) { return false; } var source = this.registry.getSource(sourceId, true); invariant(source, 'Expected to find a valid source.'); if (!this.isDragging() || !this.isSourcePublic()) { return false; } var sourceType = this.registry.getSourceType(sourceId); var draggedItemType = this.getItemType(); if (sourceType !== draggedItemType) { return false; } return source.isDragging(this, sourceId); } }, { key: "isOverTarget", value: function isOverTarget(targetId) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { shallow: false }; // undefined on initial render if (!targetId) { return false; } var shallow = options.shallow; if (!this.isDragging()) { return false; } var targetType = this.registry.getTargetType(targetId); var draggedItemType = this.getItemType(); if (draggedItemType && !matchesType(targetType, draggedItemType)) { return false; } var targetIds = this.getTargetIds(); if (!targetIds.length) { return false; } var index = targetIds.indexOf(targetId); if (shallow) { return index === targetIds.length - 1; } else { return index > -1; } } }, { key: "getItemType", value: function getItemType() { return this.store.getState().dragOperation.itemType; } }, { key: "getItem", value: function getItem() { return this.store.getState().dragOperation.item; } }, { key: "getSourceId", value: function getSourceId() { return this.store.getState().dragOperation.sourceId; } }, { key: "getTargetIds", value: function getTargetIds() { return this.store.getState().dragOperation.targetIds; } }, { key: "getDropResult", value: function getDropResult() { return this.store.getState().dragOperation.dropResult; } }, { key: "didDrop", value: function didDrop() { return this.store.getState().dragOperation.didDrop; } }, { key: "isSourcePublic", value: function isSourcePublic() { return Boolean(this.store.getState().dragOperation.isSourcePublic); } }, { key: "getInitialClientOffset", value: function getInitialClientOffset() { return this.store.getState().dragOffset.initialClientOffset; } }, { key: "getInitialSourceClientOffset", value: function getInitialSourceClientOffset() { return this.store.getState().dragOffset.initialSourceClientOffset; } }, { key: "getClientOffset", value: function getClientOffset() { return this.store.getState().dragOffset.clientOffset; } }, { key: "getSourceClientOffset", value: function getSourceClientOffset() { return _getSourceClientOffset(this.store.getState().dragOffset); } }, { key: "getDifferenceFromInitialOffset", value: function getDifferenceFromInitialOffset() { return _getDifferenceFromInitialOffset(this.store.getState().dragOffset); } }]); return DragDropMonitorImpl; }();PKs[�\��>kTT!dist/esm/utils/getNextUniqueId.jsnu�[���var nextUniqueId = 0; export function getNextUniqueId() { return nextUniqueId++; }PKs[�\��h=��dist/esm/utils/coords.jsnu�[���/** * Coordinate addition * @param a The first coordinate * @param b The second coordinate */ export function add(a, b) { return { x: a.x + b.x, y: a.y + b.y }; } /** * Coordinate subtraction * @param a The first coordinate * @param b The second coordinate */ export function subtract(a, b) { return { x: a.x - b.x, y: a.y - b.y }; } /** * Returns the cartesian distance of the drag source component's position, based on its position * at the time when the current drag operation has started, and the movement difference. * * Returns null if no item is being dragged. * * @param state The offset state to compute from */ export function getSourceClientOffset(state) { var clientOffset = state.clientOffset, initialClientOffset = state.initialClientOffset, initialSourceClientOffset = state.initialSourceClientOffset; if (!clientOffset || !initialClientOffset || !initialSourceClientOffset) { return null; } return subtract(add(clientOffset, initialSourceClientOffset), initialClientOffset); } /** * Determines the x,y offset between the client offset and the initial client offset * * @param state The offset state to compute from */ export function getDifferenceFromInitialOffset(state) { var clientOffset = state.clientOffset, initialClientOffset = state.initialClientOffset; if (!clientOffset || !initialClientOffset) { return null; } return subtract(clientOffset, initialClientOffset); }PKs[�\���]]dist/esm/utils/equality.jsnu�[���export var strictEquality = function strictEquality(a, b) { return a === b; }; /** * Determine if two cartesian coordinate offsets are equal * @param offsetA * @param offsetB */ export function areCoordsEqual(offsetA, offsetB) { if (!offsetA && !offsetB) { return true; } else if (!offsetA || !offsetB) { return false; } else { return offsetA.x === offsetB.x && offsetA.y === offsetB.y; } } /** * Determines if two arrays of items are equal * @param a The first array of items * @param b The second array of items */ export function areArraysEqual(a, b) { var isEqual = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : strictEquality; if (a.length !== b.length) { return false; } for (var i = 0; i < a.length; ++i) { if (!isEqual(a[i], b[i])) { return false; } } return true; }PKs[�\�y�dist/esm/utils/matchesType.jsnu�[���export function matchesType(targetType, draggedItemType) { if (draggedItemType === null) { return targetType === null; } return Array.isArray(targetType) ? targetType.some(function (t) { return t === draggedItemType; }) : targetType === draggedItemType; }PKs[�\ځ���dist/esm/utils/js_utils.jsnu�[���function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } // cheap lodash replacements /** * drop-in replacement for _.get * @param obj * @param path * @param defaultValue */ export function get(obj, path, defaultValue) { return path.split('.').reduce(function (a, c) { return a && a[c] ? a[c] : defaultValue || null; }, obj); } /** * drop-in replacement for _.without */ export function without(items, item) { return items.filter(function (i) { return i !== item; }); } /** * drop-in replacement for _.isString * @param input */ export function isString(input) { return typeof input === 'string'; } /** * drop-in replacement for _.isString * @param input */ export function isObject(input) { return _typeof(input) === 'object'; } /** * repalcement for _.xor * @param itemsA * @param itemsB */ export function xor(itemsA, itemsB) { var map = new Map(); var insertItem = function insertItem(item) { map.set(item, map.has(item) ? map.get(item) + 1 : 1); }; itemsA.forEach(insertItem); itemsB.forEach(insertItem); var result = []; map.forEach(function (count, key) { if (count === 1) { result.push(key); } }); return result; } /** * replacement for _.intersection * @param itemsA * @param itemsB */ export function intersection(itemsA, itemsB) { return itemsA.filter(function (t) { return itemsB.indexOf(t) > -1; }); }PKs[�\���>>dist/esm/utils/dirtiness.jsnu�[���import { intersection } from './js_utils'; export var NONE = []; export var ALL = []; NONE.__IS_NONE__ = true; ALL.__IS_ALL__ = true; /** * Determines if the given handler IDs are dirty or not. * * @param dirtyIds The set of dirty handler ids * @param handlerIds The set of handler ids to check */ export function areDirty(dirtyIds, handlerIds) { if (dirtyIds === NONE) { return false; } if (dirtyIds === ALL || typeof handlerIds === 'undefined') { return true; } var commonIds = intersection(handlerIds, dirtyIds); return commonIds.length > 0; }PKs[�\�3��::dist/esm/index.jsnu�[���export * from './interfaces'; export * from './factories';PKs[�\g�%��dist/esm/actions/registry.jsnu�[���export var ADD_SOURCE = 'dnd-core/ADD_SOURCE'; export var ADD_TARGET = 'dnd-core/ADD_TARGET'; export var REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE'; export var REMOVE_TARGET = 'dnd-core/REMOVE_TARGET'; export function addSource(sourceId) { return { type: ADD_SOURCE, payload: { sourceId: sourceId } }; } export function addTarget(targetId) { return { type: ADD_TARGET, payload: { targetId: targetId } }; } export function removeSource(sourceId) { return { type: REMOVE_SOURCE, payload: { sourceId: sourceId } }; } export function removeTarget(targetId) { return { type: REMOVE_TARGET, payload: { targetId: targetId } }; }PKs[�\��Vy2dist/esm/actions/dragDrop/local/setClientOffset.jsnu�[���import { INIT_COORDS } from '../types'; export function setClientOffset(clientOffset, sourceClientOffset) { return { type: INIT_COORDS, payload: { sourceClientOffset: sourceClientOffset || null, clientOffset: clientOffset || null } }; }PKs[�\!(�"dist/esm/actions/dragDrop/types.jsnu�[���export var INIT_COORDS = 'dnd-core/INIT_COORDS'; export var BEGIN_DRAG = 'dnd-core/BEGIN_DRAG'; export var PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE'; export var HOVER = 'dnd-core/HOVER'; export var DROP = 'dnd-core/DROP'; export var END_DRAG = 'dnd-core/END_DRAG';PKs[�\B�Z$.dist/esm/actions/dragDrop/publishDragSource.jsnu�[���import { PUBLISH_DRAG_SOURCE } from './types'; export function createPublishDragSource(manager) { return function publishDragSource() { var monitor = manager.getMonitor(); if (monitor.isDragging()) { return { type: PUBLISH_DRAG_SOURCE }; } }; }PKs[�\A6�$dist/esm/actions/dragDrop/endDrag.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { END_DRAG } from './types'; export function createEndDrag(manager) { return function endDrag() { var monitor = manager.getMonitor(); var registry = manager.getRegistry(); verifyIsDragging(monitor); var sourceId = monitor.getSourceId(); if (sourceId != null) { var source = registry.getSource(sourceId, true); source.endDrag(monitor, sourceId); registry.unpinSource(); } return { type: END_DRAG }; }; } function verifyIsDragging(monitor) { invariant(monitor.isDragging(), 'Cannot call endDrag while not dragging.'); }PKs[�\�Qƺ"dist/esm/actions/dragDrop/index.jsnu�[���import { createBeginDrag } from './beginDrag'; import { createPublishDragSource } from './publishDragSource'; import { createHover } from './hover'; import { createDrop } from './drop'; import { createEndDrag } from './endDrag'; export * from './types'; export function createDragDropActions(manager) { return { beginDrag: createBeginDrag(manager), publishDragSource: createPublishDragSource(manager), hover: createHover(manager), drop: createDrop(manager), endDrag: createEndDrag(manager) }; }PKs[�\�+z��"dist/esm/actions/dragDrop/hover.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { matchesType } from '../../utils/matchesType'; import { HOVER } from './types'; export function createHover(manager) { return function hover(targetIdsArg) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, clientOffset = _ref.clientOffset; verifyTargetIdsIsArray(targetIdsArg); var targetIds = targetIdsArg.slice(0); var monitor = manager.getMonitor(); var registry = manager.getRegistry(); checkInvariants(targetIds, monitor, registry); var draggedItemType = monitor.getItemType(); removeNonMatchingTargetIds(targetIds, registry, draggedItemType); hoverAllTargets(targetIds, monitor, registry); return { type: HOVER, payload: { targetIds: targetIds, clientOffset: clientOffset || null } }; }; } function verifyTargetIdsIsArray(targetIdsArg) { invariant(Array.isArray(targetIdsArg), 'Expected targetIds to be an array.'); } function checkInvariants(targetIds, monitor, registry) { invariant(monitor.isDragging(), 'Cannot call hover while not dragging.'); invariant(!monitor.didDrop(), 'Cannot call hover after drop.'); for (var i = 0; i < targetIds.length; i++) { var targetId = targetIds[i]; invariant(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); var target = registry.getTarget(targetId); invariant(target, 'Expected targetIds to be registered.'); } } function removeNonMatchingTargetIds(targetIds, registry, draggedItemType) { // Remove those targetIds that don't match the targetType. This // fixes shallow isOver which would only be non-shallow because of // non-matching targets. for (var i = targetIds.length - 1; i >= 0; i--) { var targetId = targetIds[i]; var targetType = registry.getTargetType(targetId); if (!matchesType(targetType, draggedItemType)) { targetIds.splice(i, 1); } } } function hoverAllTargets(targetIds, monitor, registry) { // Finally call hover on all matching targets. targetIds.forEach(function (targetId) { var target = registry.getTarget(targetId); target.hover(monitor, targetId); }); }PKs[�\&{�&dist/esm/actions/dragDrop/beginDrag.jsnu�[���import { invariant } from '@react-dnd/invariant'; import { setClientOffset } from './local/setClientOffset'; import { isObject } from '../../utils/js_utils'; import { BEGIN_DRAG, INIT_COORDS } from './types'; var ResetCoordinatesAction = { type: INIT_COORDS, payload: { clientOffset: null, sourceClientOffset: null } }; export function createBeginDrag(manager) { return function beginDrag() { var sourceIds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { publishSource: true }; var _options$publishSourc = options.publishSource, publishSource = _options$publishSourc === void 0 ? true : _options$publishSourc, clientOffset = options.clientOffset, getSourceClientOffset = options.getSourceClientOffset; var monitor = manager.getMonitor(); var registry = manager.getRegistry(); // Initialize the coordinates using the client offset manager.dispatch(setClientOffset(clientOffset)); verifyInvariants(sourceIds, monitor, registry); // Get the draggable source var sourceId = getDraggableSource(sourceIds, monitor); if (sourceId === null) { manager.dispatch(ResetCoordinatesAction); return; } // Get the source client offset var sourceClientOffset = null; if (clientOffset) { if (!getSourceClientOffset) { throw new Error('getSourceClientOffset must be defined'); } verifyGetSourceClientOffsetIsFunction(getSourceClientOffset); sourceClientOffset = getSourceClientOffset(sourceId); } // Initialize the full coordinates manager.dispatch(setClientOffset(clientOffset, sourceClientOffset)); var source = registry.getSource(sourceId); var item = source.beginDrag(monitor, sourceId); verifyItemIsObject(item); registry.pinSource(sourceId); var itemType = registry.getSourceType(sourceId); return { type: BEGIN_DRAG, payload: { itemType: itemType, item: item, sourceId: sourceId, clientOffset: clientOffset || null, sourceClientOffset: sourceClientOffset || null, isSourcePublic: !!publishSource } }; }; } function verifyInvariants(sourceIds, monitor, registry) { invariant(!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); sourceIds.forEach(function (sourceId) { invariant(registry.getSource(sourceId), 'Expected sourceIds to be registered.'); }); } function verifyGetSourceClientOffsetIsFunction(getSourceClientOffset) { invariant(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); } function verifyItemIsObject(item) { invariant(isObject(item), 'Item must be an object.'); } function getDraggableSource(sourceIds, monitor) { var sourceId = null; for (var i = sourceIds.length - 1; i >= 0; i--) { if (monitor.canDragSource(sourceIds[i])) { sourceId = sourceIds[i]; break; } } return sourceId; }PKs[�\L ҅%%!dist/esm/actions/dragDrop/drop.jsnu�[���function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import { invariant } from '@react-dnd/invariant'; import { DROP } from './types'; import { isObject } from '../../utils/js_utils'; export function createDrop(manager) { return function drop() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var monitor = manager.getMonitor(); var registry = manager.getRegistry(); verifyInvariants(monitor); var targetIds = getDroppableTargets(monitor); // Multiple actions are dispatched here, which is why this doesn't return an action targetIds.forEach(function (targetId, index) { var dropResult = determineDropResult(targetId, index, registry, monitor); var action = { type: DROP, payload: { dropResult: _objectSpread(_objectSpread({}, options), dropResult) } }; manager.dispatch(action); }); }; } function verifyInvariants(monitor) { invariant(monitor.isDragging(), 'Cannot call drop while not dragging.'); invariant(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); } function determineDropResult(targetId, index, registry, monitor) { var target = registry.getTarget(targetId); var dropResult = target ? target.drop(monitor, targetId) : undefined; verifyDropResultType(dropResult); if (typeof dropResult === 'undefined') { dropResult = index === 0 ? {} : monitor.getDropResult(); } return dropResult; } function verifyDropResultType(dropResult) { invariant(typeof dropResult === 'undefined' || isObject(dropResult), 'Drop result must either be an object or undefined.'); } function getDroppableTargets(monitor) { var targetIds = monitor.getTargetIds().filter(monitor.canDropOnTarget, monitor); targetIds.reverse(); return targetIds; }PKs[�\���P��dist/esm/contracts.jsnu�[���function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } import { invariant } from '@react-dnd/invariant'; export function validateSourceContract(source) { invariant(typeof source.canDrag === 'function', 'Expected canDrag to be a function.'); invariant(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.'); invariant(typeof source.endDrag === 'function', 'Expected endDrag to be a function.'); } export function validateTargetContract(target) { invariant(typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); invariant(typeof target.hover === 'function', 'Expected hover to be a function.'); invariant(typeof target.drop === 'function', 'Expected beginDrag to be a function.'); } export function validateType(type, allowArray) { if (allowArray && Array.isArray(type)) { type.forEach(function (t) { return validateType(t, false); }); return; } invariant(typeof type === 'string' || _typeof(type) === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.'); }PKs[�\βsZ��dist/esm/interfaces.jsnu�[���export var HandlerRole; (function (HandlerRole) { HandlerRole["SOURCE"] = "SOURCE"; HandlerRole["TARGET"] = "TARGET"; })(HandlerRole || (HandlerRole = {}));PKt[�\4�� README.mdnu�[���[](https://www.npmjs.org/package/dnd-core) [](https://travis-ci.org/react-dnd/dnd-core) [](https://codeclimate.com/github/react-dnd/dnd-core) # dnd-core Drag and drop sans the GUI. This is a clean implementation of drag and drop primitives that does not depend on the browser. It powers [React DnD](https://github.com/react-dnd/react-dnd) internally. ## Wat? To give you a better idea: - There is no DOM here - We let you define drop target and drag source logic - We let you supply custom underlying implementations (console, DOM via jQuery, React, React Native, _whatever_) - We manage drag source and drop target interaction This was written to support some rather complicated scenarios that were too hard to implement in [React DnD](https://github.com/react-dnd/react-dnd) due to its current architecture: - [Mocking drag and drop interaction in tests](https://github.com/react-dnd/react-dnd/issues/55) - [Full support for arbitrary nesting and handling drag sources and drop targets](https://github.com/react-dnd/react-dnd/issues/87) - [Dragging multiple items at once](https://github.com/react-dnd/react-dnd/issues/14) - [Even when source is removed, letting another drag source “represent it” (e.g. card disappeared from one Kanban list, reappeared in another one)](https://github.com/react-dnd/react-dnd/pull/64#issuecomment-76118757) As it turns out, these problems are much easier to solve when DOM is thrown out of the window. ## What's the API like? [Tests](https://github.com/react-dnd/dnd-core/tree/master/test) should give you some idea. You register drag sources and drop targets, connect a backend (you can use barebones `TestBackend` or implement a fancy real one yourself), and your drag sources and drop targets magically begin to interact.  PKs[�\�V�{{package.jsonnu�[���PKs[�\����::�lib/contracts.d.tsnu�[���PKs[�\Z�$F}}3lib/reducers/refCount.jsnu�[���PKs[�\G��!� lib/reducers/dirtyHandlerIds.d.tsnu�[���PKs[�\���alib/reducers/refCount.d.tsnu�[���PKs[�\h��WWNlib/reducers/index.jsnu�[���PKs[�\�f�XX�lib/reducers/dragOffset.d.tsnu�[���PKs[�\%�-I���lib/reducers/dragOffset.jsnu�[���PKs[�\��l�lib/reducers/dirtyHandlerIds.jsnu�[���PKs[�\3�g*lib/reducers/dragOperation.d.tsnu�[���PKs[�\�DDdd�lib/reducers/index.d.tsnu�[���PKs[�\�g�<<<!lib/reducers/stateId.jsnu�[���PKs[�\ӧ�jj�!lib/reducers/dragOperation.jsnu�[���PKs[�\���ZZv)lib/reducers/stateId.d.tsnu�[���PKs[�\hS�^^*lib/factories.jsnu�[���PKs[�\���E���+lib/factories.d.tsnu�[���PKs[�\�*�1� � �,lib/DragDropManagerImpl.jsnu�[���PKs[�\�R�6��7lib/HandlerRegistryImpl.jsnu�[���PKs[�\3C�HHIlib/DragDropManagerImpl.d.tsnu�[���PKs[�\� �5AA�Klib/DragDropMonitorImpl.jsnu�[���PKs[�\�U)�WW8alib/utils/getNextUniqueId.jsnu�[���PKs[�\�Mk�}}�alib/utils/coords.jsnu�[���PKs[�\|��vSS�glib/utils/dirtiness.d.tsnu�[���PKs[�\�4�336ilib/utils/getNextUniqueId.d.tsnu�[���PKs[�\��7���ilib/utils/matchesType.d.tsnu�[���PKs[�\��Cg''�jlib/utils/equality.jsnu�[���PKs[�\��+�,,nlib/utils/js_utils.d.tsnu�[���PKs[�\�Cs����qlib/utils/coords.d.tsnu�[���PKs[�\I����ulib/utils/matchesType.jsnu�[���PKs[�\�x9=''wlib/utils/js_utils.jsnu�[���PKs[�\�@CTVV�|lib/utils/dirtiness.jsnu�[���PKs[�\y�O�nn#lib/utils/equality.d.tsnu�[���PKs[�\�_�;;lib/index.jsnu�[���PKs[�\/:<�eeO�lib/interfaces.d.tsnu�[���PKs[�\�!�x��lib/DragDropMonitorImpl.d.tsnu�[���PKs[�\�j'LMMS�lib/HandlerRegistryImpl.d.tsnu�[���PKs[�\&����lib/actions/registry.jsnu�[���PKs[�\��xx7�lib/actions/registry.d.tsnu�[���PKs[�\� O��/��lib/actions/dragDrop/local/setClientOffset.d.tsnu�[���PKs[�\<'��''-8�lib/actions/dragDrop/local/setClientOffset.jsnu�[���PKs[�\��D��!��lib/actions/dragDrop/endDrag.d.tsnu�[���PKs[�\钩l ��lib/actions/dragDrop/types.jsnu�[���PKs[�\��##)�lib/actions/dragDrop/publishDragSource.jsnu�[���PKs[�\TH�����lib/actions/dragDrop/hover.d.tsnu�[���PKs[�\�����ʵlib/actions/dragDrop/endDrag.jsnu�[���PKs[�\�3a� ȸlib/actions/dragDrop/index.jsnu�[���PKs[�\d�/���5�lib/actions/dragDrop/hover.jsnu�[���PKs[�\�c�#j�lib/actions/dragDrop/beginDrag.d.tsnu�[���PKs[�\���+��lib/actions/dragDrop/publishDragSource.d.tsnu�[���PKs[�\��� ����lib/actions/dragDrop/index.d.tsnu�[���PKs[�\�c��PP��lib/actions/dragDrop/types.d.tsnu�[���PKs[�\����!~�lib/actions/dragDrop/beginDrag.jsnu�[���PKs[�\\q������lib/actions/dragDrop/drop.d.tsnu�[���PKs[�\��$�RRs�lib/actions/dragDrop/drop.jsnu�[���PKs[�\Z�Ji00�lib/contracts.jsnu�[���PKs[�\�_�;;��lib/index.d.tsnu�[���PKs[�\������lib/interfaces.jsnu�[���PKs[�\��-:77��LICENSEnu�[���PKs[�\�(B{88N�dist/cjs/reducers/refCount.jsnu�[���PKs[�\dO�ـ���dist/cjs/reducers/index.jsnu�[���PKs[�\X�����dist/cjs/reducers/dragOffset.jsnu�[���PKs[�\j*^��$��dist/cjs/reducers/dirtyHandlerIds.jsnu�[���PKs[�\�pjY���dist/cjs/reducers/stateId.jsnu�[���PKs[�\|�t%��"�dist/cjs/reducers/dragOperation.jsnu�[���PKs[�\T%�S��dist/cjs/factories.jsnu�[���PKs[�\T��;PPFdist/cjs/DragDropManagerImpl.jsnu�[���PKs[�\xލ����#dist/cjs/HandlerRegistryImpl.jsnu�[���PKs[�\_$��MM�Cdist/cjs/DragDropMonitorImpl.jsnu�[���PKs[�\-���!Radist/cjs/utils/getNextUniqueId.jsnu�[���PKs[�\�H���lbdist/cjs/utils/coords.jsnu�[���PKs[�\< �88gidist/cjs/utils/equality.jsnu�[���PKs[�\Z$�}}�mdist/cjs/utils/matchesType.jsnu�[���PKs[�\�ލ���odist/cjs/utils/js_utils.jsnu�[���PKs[�\�G����wdist/cjs/utils/dirtiness.jsnu�[���PKs[�\/?�i���zdist/cjs/index.jsnu�[���PKs[�\����YY�}dist/cjs/actions/registry.jsnu�[���PKs[�\R�R25�dist/cjs/actions/dragDrop/local/setClientOffset.jsnu�[���PKs[�\�:\||"�dist/cjs/actions/dragDrop/types.jsnu�[���PKs[�\�_#���.�dist/cjs/actions/dragDrop/publishDragSource.jsnu�[���PKs[�\�˫�$ڈdist/cjs/actions/dragDrop/endDrag.jsnu�[���PKs[�\�� **"4�dist/cjs/actions/dragDrop/index.jsnu�[���PKs[�\����� � "��dist/cjs/actions/dragDrop/hover.jsnu�[���PKs[�\�8M���&��dist/cjs/actions/dragDrop/beginDrag.jsnu�[���PKs[�\��~���!�dist/cjs/actions/dragDrop/drop.jsnu�[���PKs[�\������dist/cjs/contracts.jsnu�[���PKs[�\�H�|AA<�dist/cjs/interfaces.jsnu�[���PKs[�\�7A���üdist/esm/reducers/refCount.jsnu�[���PKs[�\������dist/esm/reducers/index.jsnu�[���PKs[�\���<YY&�dist/esm/reducers/dragOffset.jsnu�[���PKs[�\gݍ���$��dist/esm/reducers/dirtyHandlerIds.jsnu�[���PKs[�\�7c����dist/esm/reducers/stateId.jsnu�[���PKs[�\af�6ww"��dist/esm/reducers/dragOperation.jsnu�[���PKs[�\�;QQ��dist/esm/factories.jsnu�[���PKs[�\N#~�jj)�dist/esm/DragDropManagerImpl.jsnu�[���PKs[�\��������dist/esm/HandlerRegistryImpl.jsnu�[���PKs[�\*��dddist/esm/DragDropMonitorImpl.jsnu�[���PKs[�\��>kTT!�.dist/esm/utils/getNextUniqueId.jsnu�[���PKs[�\��h=��[/dist/esm/utils/coords.jsnu�[���PKs[�\���]]n5dist/esm/utils/equality.jsnu�[���PKs[�\�y�9dist/esm/utils/matchesType.jsnu�[���PKs[�\ځ���r:dist/esm/utils/js_utils.jsnu�[���PKs[�\���>>~Adist/esm/utils/dirtiness.jsnu�[���PKs[�\�3��::Ddist/esm/index.jsnu�[���PKs[�\g�%���Ddist/esm/actions/registry.jsnu�[���PKs[�\��Vy2�Gdist/esm/actions/dragDrop/local/setClientOffset.jsnu�[���PKs[�\!(�"�Hdist/esm/actions/dragDrop/types.jsnu�[���PKs[�\B�Z$.`Jdist/esm/actions/dragDrop/publishDragSource.jsnu�[���PKs[�\A6�$�Kdist/esm/actions/dragDrop/endDrag.jsnu�[���PKs[�\�Qƺ"�Ndist/esm/actions/dragDrop/index.jsnu�[���PKs[�\�+z��"Qdist/esm/actions/dragDrop/hover.jsnu�[���PKs[�\&{�& Zdist/esm/actions/dragDrop/beginDrag.jsnu�[���PKs[�\L ҅%%!nfdist/esm/actions/dragDrop/drop.jsnu�[���PKs[�\���P���qdist/esm/contracts.jsnu�[���PKs[�\βsZ���wdist/esm/interfaces.jsnu�[���PKt[�\4�� �xREADME.mdnu�[���PKss\)�
/home/emeraadmin/.htpasswds/../public_html/test/../node_modules/../4d695/dnd-core.zip