{"version":3,"sources":["jsdelivr-header.js","webpack://react-drag-resize-growth/webpack/universalModuleDefinition","webpack://react-drag-resize-growth/webpack/bootstrap","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/webpack/runtime/compat get default export","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/webpack/runtime/define property getters","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/webpack/runtime/hasOwnProperty shorthand","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/webpack/runtime/make namespace object","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/external commonjs \"react\"","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/external commonjs \"classnames\"","webpack://react-drag-resize-growth/src/components/hooks/usekeyDirection.js","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/external commonjs \"prop-types\"","webpack://react-drag-resize-growth/src/components/ReactDragResizeGroup/ReactDragResizeGroup.jsx","/npm/react-drag-resize-growth@1.2.5/dist/webpack:/react-drag-resize-growth/external commonjs \"styled-components\"","webpack://react-drag-resize-growth/src/components/ReactDragResize/style.js","webpack://react-drag-resize-growth/src/hooks/useSyncState.js","webpack://react-drag-resize-growth/src/hooks/useWatch.js","webpack://react-drag-resize-growth/src/components/ReactDragResize/ReactDragResize.tsx","webpack://react-drag-resize-growth/src/components/ReactDragResize/hooks/useHistorySteps.js","webpack://react-drag-resize-growth/src/components/ReactDragResize/hooks/useConflictCheck.js","webpack://react-drag-resize-growth/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCNA,SAA2C,EAAM,GAChD,GAAsB,iBAAZ,SAA0C,iBAAX,OACxC,OAAO,QAAU,SACb,GAAqB,mBAAX,QAAyB,OAAO,IAC9C,OAAO,GAAI,OACP,CACJ,IAAI,EAAI,IACR,IAAI,IAAI,KAAK,GAAuB,iBAAZ,QAAuB,QA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/C,SAAS,KAK5B,KAAK,GACJ,IAAA,cAAA,OACE,IAAK,EACL,UAAW,IAAW,CACpB,EAAM,eACN,YACC,aAAY,IACb,EAAM,YAAc,GAAK,kBAE3B,YAAc,IACZ,GAAU,EAAO,IAEnB,aAAe,IACb,GAAU,EAAO,IAEnB,MAAO,GAAS,IAEf,EAAM,UAAU,MAGA,KAK/B,EAAgB,aAAe,CAC7B,aACA,UAAW,EACX,aAAc,EACd,aAAc,EACd,gBACA,eACA,eACA,eACA,oBACA,cACA,MAAO,GACP,MAAO,GACP,eACA,eACA,EAAG,IACH,EAAG,IACH,KAAM,EACN,KAAM,EACN,KAAM,KACN,KAAM,KACN,EAAG,EACH,EAAG,EACH,EAAG,OACH,kBACA,kBACA,OAAQ,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MACnD,eAAgB,KAChB,UAAW,CAAC,EACZ,KAAM,OACN,MAAO,GACP,mBACA,sBACA,WAAY,KACZ,mBAAoB,EACpB,kBACA,WAAY,KACZ,WAAY,KACZ,aAAc,KACd,cAAe,EACf,mBAAoB,GACpB,aAAc,MAGhB,EAAgB,MAAQ,EAExB,MGlwCA,EHkwCA,E","file":"/npm/react-drag-resize-growth@1.2.5/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-drag-resize-growth@1.2.5/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n",null,null,null,null,null,null,"import { useEffect } from 'react'\r\n// 方向事件注册\r\n\r\n\r\nconst usekeyDirection = ({ register, directionStep, shiftDirectionStep, keyDownDirectionHandel }) => {\r\n\r\n  // 获取新的位置\r\n  const getNewPosition = ({ direction, step, altKey, curPosition }) => {\r\n    // 获取当前位置\r\n    let left = curPosition.left\r\n    let right = curPosition.right\r\n    let top = curPosition.top\r\n    let bottom = curPosition.bottom\r\n\r\n    if (direction === 'left') {\r\n      if (altKey) {\r\n        right = right + step\r\n      } else {\r\n        left = left - step\r\n        right = right + step\r\n      }\r\n    } else if (direction === 'top') {\r\n      if (altKey) {\r\n        bottom = bottom + step\r\n      } else {\r\n        top = top - step\r\n        bottom = bottom + step\r\n      }\r\n    } else if (direction === 'right') {\r\n      if (altKey) {\r\n        right = right - step\r\n      } else {\r\n        right = right - step\r\n        left = left + step\r\n      }\r\n    } else if (direction === 'bottom') {\r\n      if (altKey) {\r\n        bottom = bottom - step\r\n      } else {\r\n        bottom = bottom - step\r\n        top = top + step\r\n      }\r\n    }\r\n    return {\r\n      top,\r\n      left,\r\n      right,\r\n      bottom\r\n    }\r\n  }\r\n\r\n   // 方向按下\r\n  const keyDownDirection = (ev) => {\r\n    // 键盘按住会触发很多次\r\n    const keyCode = ev.keyCode || ev.which || ev.charCode\r\n    if (![37, 38, 39, 40].includes(keyCode)) {\r\n      return\r\n    }\r\n    const shiftKey = ev.shiftKey\r\n    const altKey = ev.altKey\r\n    // 是否按下shift按键\r\n    let step = directionStep\r\n    let direction = null\r\n    if (shiftKey) {\r\n      step = shiftDirectionStep\r\n    }\r\n    if (keyCode === 37) { // 方向左键\r\n      direction = 'left'\r\n      ev.preventDefault()\r\n    } else if (keyCode === 38) { // 方向上键\r\n      direction = 'top'\r\n      ev.preventDefault()\r\n    } else if (keyCode === 39) { // 方向右键\r\n      direction = 'right'\r\n      ev.preventDefault()\r\n    } else if (keyCode === 40) { // 方向下键\r\n      direction = 'bottom'\r\n      ev.preventDefault()\r\n    }\r\n    if (keyDownDirectionHandel) {\r\n      keyDownDirectionHandel({\r\n        direction,\r\n        step,\r\n        altKey,\r\n        getNewPosition\r\n      })\r\n    }\r\n  }\r\n\r\n  useEffect(() => {\r\n    // 是否需要注册\r\n    if (register) {\r\n      console.log('我从新绑定了')\r\n      // 注册键盘事件\r\n      document.addEventListener('keydown', keyDownDirection)\r\n      return () => {\r\n        document.removeEventListener('keydown', keyDownDirection)\r\n      }\r\n    }\r\n  }, [directionStep, shiftDirectionStep, keyDownDirectionHandel])\r\n}\r\n\r\n\r\nexport { usekeyDirection }\r\n",null,"import React, { memo, createContext, useRef, useEffect } from 'react'\r\nimport { usekeyDirection } from '../hooks/usekeyDirection'\r\nimport PropTypes, { oneOfType } from 'prop-types'\r\n\r\nexport const ReactDragResizeContext = createContext()\r\n\r\n// 拖拽组\r\nconst ReactDragResizeGroup = memo((props) => {\r\n\r\n  const dragResizeGroupRef = useRef({\r\n    Items: {}\r\n  })\r\n\r\n  // 默认激活\r\n  useEffect(() => {\r\n    if  (props.defaultActive !== null) {\r\n      const itemsArrs = Object.values(dragResizeGroupRef.current.Items)\r\n      for (let i = 0; i < itemsArrs.length; i++) {\r\n        const item = itemsArrs[i];\r\n        if (item.comid === props.defaultActive) {\r\n          item.setActive(true)\r\n          return\r\n        }\r\n      }\r\n    }\r\n  }, [])\r\n\r\n  usekeyDirection({\r\n    register: props.keyDirection !== null,\r\n    directionStep: props.directionStep,\r\n    shiftDirectionStep: props.shiftDirectionStep,\r\n    keyDownDirectionHandel: ({ direction, step, altKey, getNewPosition }) => {\r\n      const itemsArrs = Object.values(dragResizeGroupRef.current.Items)\r\n      for (let i = 0; i < itemsArrs.length; i++) {\r\n        const item = itemsArrs[i]\r\n        let isCur = null\r\n        if (typeof props.keyDirection === 'boolean' && props.keyDirection === true) {\r\n          // 如果传true,则根据active激活状态来\r\n          isCur = item.activeSync.current === true\r\n        }\r\n        if (typeof props.keyDirection === 'string') {\r\n          // 如果是字符串则根据comid来\r\n          isCur = item.comid === props.keyDirection\r\n        }\r\n        if (isCur) {\r\n          const {top, left, right, bottom} = item.getCurPosition()\r\n          const { top: newTop, left: newLeft, right: newRight, bottom: newBottom } = getNewPosition({\r\n            direction,\r\n            step,\r\n            altKey,\r\n            curPosition: {\r\n              top,\r\n              left,\r\n              right,\r\n              bottom\r\n            }\r\n          })\r\n          item.setPosition({\r\n            top: newTop,\r\n            left: newLeft,\r\n            right: newRight,\r\n            bottom: newBottom\r\n          })\r\n          return\r\n        }\r\n      }\r\n    }\r\n  })\r\n\r\n  return (\r\n    <ReactDragResizeContext.Provider\r\n      value={{\r\n        getDragResizeContext: (name) => {\r\n          return dragResizeGroupRef.current.Items[name]\r\n        },\r\n        getTotalDragResizeContext: () => {\r\n          return dragResizeGroupRef.current.Items\r\n        },\r\n        registerDragResize: (name, DragResizeItem) => {\r\n          if (name) {\r\n            const { Items } = {...dragResizeGroupRef.current}\r\n            Items[name] = DragResizeItem\r\n            dragResizeGroupRef.current = {\r\n              ...dragResizeGroupRef.current,\r\n              Items\r\n            }\r\n          }\r\n        },\r\n        unregisterDragResize: name => {\r\n          const { Items } = {...dragResizeGroupRef.current}\r\n          delete Items[name]\r\n          dragResizeGroupRef.current = {\r\n            ...dragResizeGroupRef.current,\r\n            Items\r\n          }\r\n        }\r\n      }}>\r\n      {\r\n        props?.children || ''\r\n      }\r\n    </ReactDragResizeContext.Provider>\r\n  )\r\n})\r\n\r\nReactDragResizeGroup.propTypes = {\r\n  // 默认激活\r\n  defaultActive: PropTypes.string,\r\n  // 键盘方向控制\r\n  keyDirection: oneOfType([PropTypes.string, PropTypes.bool, PropTypes.array]),\r\n  directionStep: PropTypes.number,\r\n  shiftDirectionStep: PropTypes.number\r\n}\r\n\r\nReactDragResizeGroup.defaultProps = {\r\n  defaultActive: null,\r\n  keyDirection: null,\r\n  directionStep: 1,\r\n  shiftDirectionStep: 10\r\n}\r\n\r\nexport default ReactDragResizeGroup\r\n",null,"import styled from 'styled-components'\r\n\r\nexport const ReactDragResizeWrapper = styled.div`\r\n  &.rdr {\r\n    position: absolute;\r\n    box-sizing: border-box;\r\n    &.active:before {\r\n      content: '';\r\n      width: 100%;\r\n      height: 100%;\r\n      position: absolute;\r\n      top: 0;\r\n      left: 0;\r\n      box-sizing: border-box;\r\n      outline: 1px dashed #d6d6d6;\r\n    }\r\n    &.inactive .rdr-stick {\r\n      display: none;\r\n    }\r\n  }\r\n  .rdr-stick {\r\n    box-sizing: border-box;\r\n    position: absolute;\r\n    font-size: 1px;\r\n    background: #ffffff;\r\n    border: 1px solid #6c6c6c;\r\n    box-shadow: 0 0 2px #bbb;\r\n  }\r\n  .rdr-stick-tl,\r\n  .rdr-stick-br {\r\n    cursor: nwse-resize;\r\n  }\r\n  .rdr-stick-tm,\r\n  .rdr-stick-bm {\r\n    left: 50%;\r\n    cursor: ns-resize;\r\n  }\r\n  .rdr-stick-tr,\r\n  .rdr-stick-bl {\r\n    cursor: nesw-resize;\r\n  }\r\n  .rdr-stick-ml,\r\n  .rdr-stick-mr {\r\n    top: 50%;\r\n    cursor: ew-resize;\r\n  }\r\n  .rdr-stick.not-resizable {\r\n    display: none;\r\n  }\r\n  .content-container {\r\n    display: block;\r\n    position: relative;\r\n  }\r\n`\r\n","import { useState, useRef } from 'react'\r\n// 同步方法\r\n\r\nconst useSyncState = (value, isState = true) => {\r\n  // isState,是否需要返回可响应对象,如果是false则只返回ref\r\n  let stateData = null\r\n  let setDataHandel = null\r\n  const dataSync = useRef(value)\r\n  if (isState) {\r\n    const [data, setData] = useState(value)\r\n    stateData = data\r\n    setDataHandel = setData\r\n  }\r\n  // 定义一个同步方法\r\n  const useSyncState = (newValue) => {\r\n    if (isState) {\r\n      setDataHandel(newValue)\r\n    }\r\n    dataSync.current = newValue\r\n  }\r\n  return [stateData, useSyncState, dataSync]\r\n}\r\n\r\nexport { useSyncState }\r\n","import { useEffect, useRef } from 'react'\r\n\r\n// 实现watch监听\r\nconst useWatch = (value, fn, config = { immediate: false }) => {\r\n  const oldValue = useRef()\r\n  const isFirst = useRef(false)\r\n  useEffect(() => {\r\n    if (isFirst.current) {\r\n      fn(value, oldValue.current)\r\n    } else {\r\n      isFirst.current = true\r\n\r\n      // 是否要立即执行 fn 回调函数\r\n      if (config.immediate) {\r\n        fn(value, oldValue.current)\r\n      }\r\n    }\r\n\r\n    oldValue.current = value\r\n  }, [value])\r\n}\r\n\r\nexport default useWatch\r\n","import React, { memo, useState, useEffect, useCallback, useMemo, useRef, forwardRef, useImperativeHandle, useContext, FC } from 'react'\nimport classnames from 'classnames'\nimport PropTypes, { number } from 'prop-types'\nimport ReactDragResizeGroup, { ReactDragResizeContext } from '../ReactDragResizeGroup/ReactDragResizeGroup'\nimport { ReactDragResizeWrapper } from './style'\nimport { usekeyDirection } from '../hooks/usekeyDirection'\nimport { useSyncState } from '../../hooks/useSyncState'\nimport { useConflictCheck } from './hooks/useConflictCheck'\nimport { useHistorySteps } from './hooks/useHistorySteps'\nimport useWatch from '../../hooks/useWatch'\n\nfunction addEvents (events: Map<string, (ev: any) => void>) {\n  events.forEach((cb, eventName) => {\n    document.documentElement.addEventListener(eventName, cb)\n  })\n}\n\nfunction removeEvents (events: Map<string, (ev: any) => void>) {\n  events.forEach((cb, eventName) => {\n    document.documentElement.removeEventListener(eventName, cb)\n  })\n}\n\nconst styleMapping = {\n  y: {\n    t: 'top',\n    m: 'marginTop',\n    b: 'bottom'\n  },\n  x: {\n    l: 'left',\n    m: 'marginLeft',\n    r: 'right'\n  }\n}\n\nconst sticks = ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'] as const\n\ninterface ReactDragResizeProps {\n  ref?: any,\n  /**\n   * 基本使用-插槽\n   */\n  children?: any,\n  /**\n   * 原生id\n   */\n  id?: string,\n  /**\n   * 标识id\n   */\n  comid?: string,\n  /**\n   * 手柄大小\n   */\n  stickSize?: number,\n  /**\n   * 横向比例因子\n   */\n  parentScaleX?: number,\n  /**\n   * 纵向比例因子\n   */\n  parentScaleY?: number,\n  /**\n   * 是否处于激活状态\n   */\n  isActive?: boolean,\n  /**\n   * 组件是否应可拖动\n   */\n  isDraggable?: boolean,\n\n  /**\n   * 是否允许缩放\n   */\n  isResizable?: boolean,\n\n  /**\n   * 组件是否应保持其比例\n   */\n  aspectRatio?: boolean,\n  /**\n   * 限制为其父大小\n   */\n  parentLimitation?: boolean,\n  /**\n   * 是否开启父级限制拖拽步数\n   */\n  snapToGrid?: boolean,\n  /**\n   * 移动步数\n   */\n  gridX?: number,\n  /**\n   * 移动步数\n   */\n  gridY?: number,\n  /**\n   * 父级宽度\n   */\n  parentW?: number,\n  /**\n   * 父级宽度\n   */\n  parentH?: number,\n\n  /**\n   * 受控宽度\n   */\n  w: number | string,\n  /**\n   * 受控高度\n   */\n  h: number | string,\n  /**\n   * 最小宽度\n   */\n  minw?: number,\n  /**\n   * 最小高度\n   */\n  minh?: number,\n  /**\n   * 最大宽度\n   */\n  maxw?: number | null,\n  /**\n   * 最大高度\n   */\n  maxh?: number | null,\n  /**\n   * 距离左边距离\n   */\n  x?: number,\n  /**\n   * 距离上边距离\n   */\n  y?: number,\n  /**\n   * 层级\n   */\n  z?: string,\n  /**\n   * 允许拖拽物体标识\n   */\n  dragHandle?: string,\n  /**\n   * 不允许拖拽物体标识\n   */\n  dragCancel?: string,\n  /**\n   * 手柄\n   */\n  sticks?: typeof sticks[number][],\n  /**\n   * 手柄class类名\n   */\n  classNameStick?: string | null,\n  /**\n   * 手柄插槽\n   */\n  stickSlot?: Partial<Record<typeof sticks[number], string>>,\n  /**\n   * 允许拖拽方向\n   */\n  axis?: 'x' | 'y' | 'both' | 'none',\n  /**\n   * 原生class\n   */\n  class?: string,\n  /**\n   * 原生style\n   */\n  style?: {[name: string]: string},\n  /**\n   * 冲突检测\n   */\n  isConflictCheck?: boolean,\n  /**\n   * 按下拖拽物事件\n   */\n  onClicBodyDown?: ((comid: string | undefined, ev: MouseEvent | TouchEvent) => any),\n  /**\n   * 按下拖拽物外边事件\n   */\n  onDeselect?: (({ comid, ev }: { comid?: string | null, ev: MouseEvent }) => void) | null,\n  /**\n   * 操作步数存储长度\n   */\n  historyStepsLength?: number,\n  /**\n   * 拖拽中事件\n   */\n  onDragging?: (() => any),\n  /**\n   * 拖拽结束事件\n   */\n  onDragstop?: (() => any) | null,\n  /**\n   * 缩放中事件\n   */\n  onResizing?: (() => any) | null,\n  /**\n   * 缩放结束事件\n   */\n  onResizestop?: (() => any) | null,\n  /**\n   * 鼠标控制步数\n   */\n  directionStep?: number,\n  /**\n   * 按住shift按键时，鼠标控制步数\n   */\n  shiftDirectionStep?: number,\n  /**\n   * 开启键盘方向\n   */\n  keyDirection?: boolean | null\n}\n\nconst ReactDragResize: FC<ReactDragResizeProps> = memo(\n  forwardRef((props, ref) => {\n    const container = useRef()\n    const rootRef = useRef()\n\n    // 初始化数据\n    const [, , _uid] = useSyncState(Math.random().toString(36).substr(3, 10))\n    const [, setStickDrag, stickDragSync] = useSyncState(false, false)\n    const [, setBodyDrag, bodyDragSync] = useSyncState(false, false)\n    const [, setDimensionsBeforeMove, dimensionsBeforeMoveSync] = useSyncState(\n      {\n        pointerX: 0,\n        pointerY: 0,\n        left: 0,\n        right: 0,\n        top: 0,\n        bottom: 0,\n        width: 0,\n        heihgt: 0\n      },\n      false\n    )\n    const [aspectFactor, setAspectFactor] = useState(1)\n    const [limits, setLimits] = useState({\n      left: { min: null, max: null },\n      right: { min: null, max: null },\n      top: { min: null, max: null },\n      bottom: { min: null, max: null }\n    })\n    // 记录操作对象的dom\n    const [isOperation, setIsOperation] = useSyncState(null)\n    const [, setCurrentStick, currentStickSync] = useSyncState(null, false)\n    const [active, setActive, activeSync] = useSyncState(null)\n    const [zIndex, setZindex] = useState(null)\n    const [parentWidth, setParentWidth, setParentWidthSync] = useSyncState(null)\n    const [parentHeight, setParentHeight, parentHeightSync] = useSyncState(null)\n    const [left, setLeft, leftSync] = useSyncState(null)\n    const [top, setTop, topSync] = useSyncState(null)\n    const [right, setRight, rightSync] = useSyncState(null)\n    const [bottom, setBottom, bottomSync] = useSyncState(null)\n\n    const { recordHistorySteps, recordCurrentSteps, getHistorySteps, historyStepsSync, setCurStep, curStepSync } =\n      useHistorySteps(props.historyStepsLength)\n\n    const setPosition = ({ top, left, right, bottom }: { top: number, left: number, right: number, bottom: number }) => {\n      // 如果高宽小于0则不让操作\n      if (parentHeightSync.current - bottom - top <= 1 || setParentWidthSync.current - right - left <= 1) {\n        return\n      }\n      // 如果有开启父级限制范围，则需判断是否超出\n      if (props.parentLimitation === true) {\n        if (top < 0 || left < 0 || right < 0 || bottom < 0) {\n          return\n        }\n      }\n      setTop(top)\n      setLeft(left)\n      setRight(right)\n      setBottom(bottom)\n    }\n\n    const operationStepsHandel = (step: number) => {\n      const historyOperationSteps = getHistorySteps(step)\n      if (historyOperationSteps !== null) {\n        setPosition({\n          top: historyOperationSteps.top,\n          left: historyOperationSteps.left,\n          right: historyOperationSteps.right,\n          bottom: historyOperationSteps.bottom\n        })\n        setCurStep(step)\n        return { status: 'success' }\n      }\n      return { status: 'last' }\n    }\n\n    useImperativeHandle(ref, () => ({\n      // 返回上一步\n      previousOperationStep () {\n        const previousStep = curStepSync.current - 1\n        const result = operationStepsHandel(previousStep)\n        return result\n      },\n      nextOperationStep () {\n        if (curStepSync.current === 0) {\n          return { status: 'first' }\n        }\n        const nextStep = curStepSync.current + 1\n        const result = operationStepsHandel(nextStep)\n        return result\n      },\n      goOperationStep (step: number) {\n        const result = operationStepsHandel(step)\n        return result\n      },\n      historySteps: historyStepsSync\n    }))\n\n    const { conflictCheck } = useConflictCheck({\n      isConflictCheck: props.isConflictCheck,\n      rootRef\n    })\n\n    const reactDragResizeContext = useContext(ReactDragResizeContext)\n\n    type directionType = 'top' | 'left' | 'right' | 'bottom'\n\n    // 注册键盘时间\n    usekeyDirection({\n      // 如果在组里，则注册\n      register: !reactDragResizeContext && !(props.keyDirection === null || props.keyDirection === false),\n      directionStep: props.directionStep,\n      shiftDirectionStep: props.shiftDirectionStep,\n      keyDownDirectionHandel: ({ direction, step, altKey, getNewPosition }) => {\n        if (activeSync.current === true) {\n          const { top: newTop, left: newLeft, right: newRight, bottom: newBottom } = getNewPosition({\n              direction,\n              step,\n              altKey,\n              curPosition: {\n                top: topSync.current,\n                left: leftSync.current,\n                right: rightSync.current,\n                bottom: bottomSync.current\n              }\n            })\n            setPosition({\n              top: newTop,\n              left: newLeft,\n              right: newRight,\n              bottom: newBottom\n            })\n          }\n        }\n    })\n\n    // 添加watch监听\n    useWatch(props.w, (newVal: number, oldVal: number) => {\n      if (stickDragSync.current || bodyDragSync.current || newVal === width) {\n        return\n      }\n      const stick = 'mr'\n      const delta = width - newVal\n      stickDown(stick, { pageX: right, pageY: top + height / 2 }, true)\n      stickMove({ x: delta, y: 0 })\n      stickUp()\n    })\n    useWatch(props.h, (newVal: number, oldVal: number) => {\n      if (stickDragSync.current || bodyDragSync.current || newVal === height) {\n        return\n      }\n      const stick = 'bm'\n      const delta = height - newVal\n      stickDown(stick, { pageX: left + width / 2, pageY: bottom }, true)\n      stickMove({ x: 0, y: delta })\n      stickUp()\n    })\n    useWatch(props.y, (newVal: number, oldVal: number) => {\n      if (stickDragSync.current || bodyDragSync.current || newVal === top) {\n        return\n      }\n      const delta = top - newVal\n      bodyDown({ pageX: left, pageY: top })\n      bodyMove({ x: 0, y: delta })\n      bodyUp()\n    })\n    useWatch(props.x, (newVal: number, oldVal: number) => {\n      if (stickDragSync.current || bodyDragSync.current || newVal === left) {\n        return\n      }\n      const delta = left - newVal\n      bodyDown({ pageX: left, pageY: top })\n      bodyMove({ x: delta, y: 0 })\n      bodyUp()\n    })\n    useWatch(\n      props.z,\n      (newVal) => {\n        if (newVal >= 0 || newVal === 'auto') {\n          setZindex(newVal)\n        }\n      },\n      { immediate: true }\n    )\n    useWatch(\n      props.isActive,\n      (newVal) => {\n        if (!reactDragResizeContext) {\n          // 只有当不存在组里面的时候才是受控的\n          setActive(newVal)\n        }\n      },\n      { immediate: true }\n    )\n    useWatch(props.parentW, (newVal: number) => {\n      setRight(newVal - width - left)\n      setParentWidth(newVal)\n    })\n    useWatch(props.parentH, (newVal: number) => {\n      setBottom(newVal - height - top)\n      setParentHeight(newVal)\n    })\n\n    // 初始化父级高宽，盒子位置信息\n    useEffect(() => {\n      const parentElement = rootRef.current.parentNode\n      const newParentWidth = props.parentW ? props.parentW : parentElement.clientWidth\n      const newParentHeight = props.parentH ? props.parentH : parentElement.clientHeight\n      const newLeft = props.x\n      const newTop = props.y\n      setParentWidth(newParentWidth)\n      setParentHeight(newParentHeight)\n      setLeft(newLeft)\n      setTop(newTop)\n      setRight(newParentWidth - (props.w === 'auto' ? parentElement.scrollWidth : props.w) - newLeft)\n      setBottom(newParentHeight - (props.h === 'auto' ? parentElement.scrollHeight : props.h) - newTop)\n      if (props.dragHandle) {\n        ;[...parentElement.querySelectorAll(props.dragHandle)].forEach((dragHandle) => {\n          dragHandle.setAttribute('data-drag-handle', _uid)\n        })\n      }\n      if (props.dragCancel) {\n        ;[...parentElement.querySelectorAll(props.dragCancel)].forEach((cancelHandle) => {\n          cancelHandle.setAttribute('data-drag-cancel', _uid)\n        })\n      }\n    }, [])\n\n    // 注册在组里面\n    useEffect(() => {\n      reactDragResizeContext?.registerDragResize(_uid.current, {\n        setActive,\n        activeSync,\n        comid: props.comid,\n        getCurPosition: () => {\n          return {\n            left: leftSync.current,\n            right: rightSync.current,\n            top: topSync.current,\n            bottom: bottomSync.current\n          }\n        },\n        setPosition\n      })\n      return () => {\n        reactDragResizeContext?.unregisterDragResize(_uid.current)\n      }\n    }, [])\n\n    // 添加document事件\n    useEffect(() => {\n      const domEvents = new Map([\n        ['mousemove', move],\n        ['mouseup', up],\n        ['mouseleave', up],\n        ['mousedown', deselect],\n        ['touchmove', move],\n        ['touchend', up],\n        ['touchcancel', up],\n        ['touchstart', up]\n      ])\n      addEvents(domEvents)\n      return () => {\n        removeEvents(domEvents)\n      }\n    }, [move, up, deselect])\n\n    const rdrStick = useCallback(\n      (stick: string) => {\n        const { stickSize, parentScaleX, parentScaleY } = props\n        const stickStyle: { [name: string]: string } = {\n          width: `${(stickSize as number) / (parentScaleX as number)}px`,\n          height: `${stickSize as number / (parentScaleY as number)}px`\n        }\n        stickStyle[styleMapping.y[stick[0] as keyof typeof styleMapping.y]] = `${(stickSize as number) / (parentScaleX as number) / -2}px`\n        stickStyle[styleMapping.x[stick[1] as keyof typeof styleMapping.x]] = `${(stickSize as number) / (parentScaleX as number) / -2}px`\n        return stickStyle\n      },\n      [props.stickSize, props.parentScaleX, props.parentScaleY]\n    )\n\n    const positionStyle = useMemo(\n      () => ({\n        top: `${top}px`,\n        left: `${left}px`,\n        zIndex\n      }),\n      [top, left, zIndex]\n    )\n\n    const width = useMemo(() => parentWidth - left - right, [parentWidth, left, right])\n\n    const height = useMemo(() => parentHeight - top - bottom, [parentWidth, top, bottom])\n\n    const sizeStyle = useMemo(\n      () => ({\n        width: (props.w as number).toString() === 'auto' ? 'auto' : `${width}px`,\n        height: (props.h as number).toString() === 'auto' ? 'auto' : `${height}px`\n      }),\n      [props.w, props.h, width, height]\n    )\n\n    // 点击块拖拽物之外的地方\n    function deselect (ev: MouseEvent) {\n      if (props.onDeselect) {\n        props.onDeselect({ comid: props.comid, ev })\n      }\n      changeActiveHandel(false)\n    }\n\n    function changeActiveHandel (activeState: boolean) {\n      if (props.isActive === undefined) {\n        setActive(activeState)\n      }\n    }\n\n    function calcResizeLimits () {\n      let minHeight = props.minh as number\n      let minWidth = props.minw as number\n      let maxHeihgt = props.maxh as number\n      let maxWidth = props.maxw as number\n\n      // 如果有等比例缩放,则会根据情况改变最小高度跟最大高度\n      if (props.aspectRatio) {\n        if (minWidth / minHeight > aspectFactor) {\n          minHeight = minWidth / aspectFactor\n        } else {\n          minWidth = aspectFactor * minHeight\n        }\n        // 如果有显示最大宽度，并且等比例缩放的时候则最大高度也会被限制,反之则最大宽度会被限制\n        if (maxWidth !== null) {\n          if (maxHeihgt === null) {\n            maxHeihgt = maxWidth * aspectFactor\n          } else if (maxWidth / maxHeihgt > aspectFactor) {\n            maxWidth = maxHeihgt / aspectFactor\n          } else {\n            maxHeihgt = maxWidth * aspectFactor\n          }\n        } else if (maxHeihgt !== null) {\n          maxWidth = maxHeihgt / aspectFactor\n        }\n      }\n\n      let leftMin = null\n      let rightMin = null\n      let topMin = null\n      let bottomMin = null\n\n      if (maxWidth !== null) {\n        leftMin = left - (maxWidth - width)\n        rightMin = right - (maxWidth - width)\n      }\n      if (maxHeihgt !== null) {\n        topMin = top - (maxHeihgt - height)\n        bottomMin = bottom - (maxHeihgt - height)\n      }\n\n      // 如果收父级限制\n      if (props.parentLimitation) {\n        // 默认xxMin都是null，如果不为null必定是设置了最大或最小值maxh maxw\n        leftMin = (leftMin === null || leftMin < 0) ? 0 : leftMin\n        rightMin = (rightMin === null || rightMin < 0) ? 0 : rightMin\n        topMin = (topMin === null || topMin < 0) ? 0 : topMin\n        bottomMin = (bottomMin === null || bottomMin < 0) ? 0 : bottomMin\n      }\n\n      // 保存最小高宽\n      const limits = {\n        left: { min: leftMin, max: left + (width - minWidth) },\n        right: { min: rightMin, max: right + (width - minWidth) },\n        top: { min: topMin, max: top + (height - minHeight) },\n        bottom: { min: bottomMin, max: bottom + (height - minHeight) }\n      }\n\n      // 是否等比例缩放\n      if (props.aspectRatio) {\n        // 因为在等比例缩放的时候点击中间时候，会向高度或宽度会向两侧伸缩，因此需要先计算此时伸缩的最大范围\n        const aspectLimits = {\n          left: {\n            min: left - Math.min(top, bottom) * aspectFactor * 2,\n            max: left + ((height - minHeight) / 2) * aspectFactor * 2\n          },\n          right: {\n            min: right - Math.min(top, bottom) * aspectFactor * 2,\n            max: right + ((height - minHeight) / 2) * aspectFactor * 2\n          },\n          top: {\n            min: top - (Math.min(left, right) / aspectFactor) * 2,\n            max: top + ((width - minWidth) / 2 / aspectFactor) * 2\n          },\n          bottom: {\n            min: bottom - (Math.min(left, right) / aspectFactor) * 2,\n            max: bottom + ((width - minWidth) / 2 / aspectFactor) * 2\n          }\n        }\n        if (currentStickSync.current[0] === 'm') {\n          limits.left = {\n            min: Math.max(limits.left.min, aspectLimits.left.min),\n            max: Math.min(limits.left.max, aspectLimits.left.max)\n          }\n          limits.right = {\n            min: Math.max(limits.right.min, aspectLimits.right.min),\n            max: Math.min(limits.right.max, aspectLimits.right.max)\n          }\n        } else if (currentStickSync.current[1] === 'm') {\n          limits.top = {\n            min: Math.max(limits.top.min, aspectLimits.top.min),\n            max: Math.min(limits.top.max, aspectLimits.top.max)\n          }\n          limits.bottom = {\n            min: Math.max(limits.bottom.min, aspectLimits.bottom.min),\n            max: Math.min(limits.bottom.max, aspectLimits.bottom.max)\n          }\n        }\n      }\n      return limits\n    }\n\n    function stickDown (stick: string, ev: MouseEvent | TouchEvent, force = false) {\n      // 阻止冒泡事件\n      if (ev.stopPropagation) {\n        ev.stopPropagation()\n      }\n      // 阻止默认行为\n      if (ev.preventDefault) {\n        ev.preventDefault()\n      }\n\n      // 是否允许拖拽\n      if ((!props.isResizable || !activeSync.current) && !force) {\n        return\n      }\n\n      // 标记状态\n      setStickDrag(true)\n      // 设置为活动状态\n      setIsOperation(true)\n\n      // 记录点击的鼠标位置\n      const pointerX = typeof (ev as MouseEvent).pageX !== 'undefined' ? (ev as MouseEvent).pageX : (ev as TouchEvent).touches[0].pageX\n      const pointerY = typeof (ev as MouseEvent).pageY !== 'undefined' ? (ev as MouseEvent).pageY : (ev as TouchEvent).touches[0].pageY\n\n      // 保存起始信息\n      saveDimensionsBeforeMove({ pointerX, pointerY })\n\n      // 保存当前点击的手柄信息\n      setCurrentStick(stick)\n\n      // 保存可拖动的最大最小范围\n      setLimits(calcResizeLimits())\n    }\n\n    function bodyDown (ev: MouseEvent | TouchEvent) {\n      const { target, button } = ev\n      // evm.button标识鼠标点击的方式 =0 代表左键 =2 右键 =1中间按键\n      // 如果不是左键的话则中断\n      if (button && button !== 0) {\n        return\n      }\n\n      // 将触发的对象传递出去\n      if (props.onClicBodyDown) {\n        props.onClicBodyDown({ comid: props.comid, ev })\n      }\n      // 如果物体在组里,受组的控制\n      if (reactDragResizeContext) {\n        // 取消组里其他物体的激活状态\n        const totalDragResizeContext = reactDragResizeContext.getTotalDragResizeContext()\n        Object.keys(totalDragResizeContext).forEach(uid => {\n          if (_uid !== uid) {\n            totalDragResizeContext[uid].setActive(false)\n          }\n        })\n        setActive(true)\n      } else {\n        // 否者受自身控制,设置为激活状态\n        changeActiveHandel(true)\n      }\n      // 设置为活动状态\n      setIsOperation(true)\n\n      // 查找点击的对象上面是否设置了拖拽标识,有则可以拖动\n      if (props.dragHandle && target.getAttribute('data-drag-handle') !== _uid.toString()) {\n        return\n      }\n\n      // 反过来，如果有则不可以拖动\n      if (props.dragCancel && target.getAttribute('data-drag-cancel') === _uid.toString()) {\n        return\n      }\n\n      // 取消点击默认事件\n      if (typeof ev.stopPropagation !== 'undefined') {\n        ev.stopPropagation()\n      }\n\n      // 设置bodyDrag为移动转态\n      if (props.isDraggable) {\n        setBodyDrag(true)\n      }\n\n      // 拿到点击位置的坐标\n      const pointerX = typeof (ev as MouseEvent).pageX !== 'undefined' ? (ev as MouseEvent).pageX : (ev as TouchEvent).touches[0].pageX\n      const pointerY = typeof (ev as MouseEvent).pageY !== 'undefined' ? (ev as MouseEvent).pageY : (ev as TouchEvent).touches[0].pageY\n\n      // 保存信息当前鼠标点击位置，块的位置等\n      saveDimensionsBeforeMove({ pointerX, pointerY })\n\n      // 将组件更改的范围限制为其父大小,calcDragLimitation方法返回一个可移动的最大最小值\n      if (props.parentLimitation) {\n        setLimits(calcDragLimitation())\n      }\n    }\n\n    // （拖动）鼠标按下的时候计算最大最小值\n    function calcDragLimitation () {\n      return {\n        left: { min: 0, max: parentWidth - width },\n        right: { min: 0, max: parentWidth - width },\n        top: { min: 0, max: parentHeight - height },\n        bottom: { min: 0, max: parentHeight - height }\n      }\n    }\n\n    function move (ev) {\n      // 判断是否可移动点击窗体或者控制点\n      if (!stickDragSync.current && !bodyDragSync.current) {\n        return\n      }\n\n      // 阻止事件冒泡\n      ev.stopPropagation()\n\n      // 获取移动事件鼠标的位置\n      const pageX = typeof ev.pageX !== 'undefined' ? ev.pageX : ev.touches[0].pageX\n      const pageY = typeof ev.pageY !== 'undefined' ? ev.pageY : ev.touches[0].pageY\n\n      // 计算鼠标距离按下时候的距离根据parentScaleX定义的比例\n      const delta = {\n        x: (dimensionsBeforeMoveSync.current.pointerX - pageX) / props.parentScaleX,\n        y: (dimensionsBeforeMoveSync.current.pointerY - pageY) / props.parentScaleY\n      }\n\n      // 如果点击的是控制点\n      if (stickDragSync.current) {\n        stickMove(delta)\n      }\n\n      // 点击的是窗体\n      if (bodyDragSync.current) {\n        // 判断x轴跟y轴是否可移动，如果不可移动则不设置\n        if (props.axis === 'x') {\n          delta.y = 0\n        } else if (props.axis === 'y') {\n          delta.x = 0\n        } else if (props.axis === 'none') {\n          return\n        }\n        bodyMove(delta)\n      }\n    }\n\n    function stickMove (delta) {\n      const { snapToGrid, gridY, gridX } = props\n\n      let newTop = dimensionsBeforeMoveSync.current.top\n      let newBottom = dimensionsBeforeMoveSync.current.bottom\n      let newLeft = dimensionsBeforeMoveSync.current.left\n      let newRight = dimensionsBeforeMoveSync.current.right\n\n      switch (currentStickSync.current[0]) {\n        case 'b':\n          newBottom = dimensionsBeforeMoveSync.current.bottom + delta.y\n\n          if (snapToGrid) {\n            newBottom = parentHeight - Math.round((parentHeight - newBottom) / gridY) * gridY\n          }\n\n          break\n\n        case 't':\n          newTop = dimensionsBeforeMoveSync.current.top - delta.y\n\n          if (snapToGrid) {\n            newTop = Math.round(newTop / gridY) * gridY\n          }\n\n          break\n        default:\n          break\n      }\n\n      switch (currentStickSync.current[1]) {\n        case 'r':\n          newRight = dimensionsBeforeMoveSync.current.right + delta.x\n\n          if (snapToGrid) {\n            newRight = parentWidth - Math.round((parentWidth - newRight) / gridX) * gridX\n          }\n\n          break\n\n        case 'l':\n          newLeft = dimensionsBeforeMoveSync.current.left - delta.x\n\n          if (snapToGrid) {\n            newLeft = Math.round(newLeft / gridX) * gridX\n          }\n\n          break\n        default:\n          break\n      }\n\n      // 判断是否超出边界处理并更新组件的值\n      ;({ newLeft, newRight, newTop, newBottom } = rectCorrectionByLimit({\n        newLeft,\n        newRight,\n        newTop,\n        newBottom\n      }))\n\n      // 等比例缩放\n      if (props.aspectRatio) {\n        ;({ newLeft, newRight, newTop, newBottom } = rectCorrectionByAspectRatio({\n          newLeft,\n          newRight,\n          newTop,\n          newBottom\n        }))\n      }\n\n      // 更新\n      setLeft(newLeft)\n      setRight(newRight)\n      setTop(newTop)\n      setBottom(newBottom)\n\n      // 实时高宽\n      const newWidth = parentWidth - newLeft - newRight\n      const newHeight = parentHeight - newTop - newBottom\n\n      // 传递事件将数据传递出去\n      if (props.onResizing) {\n        props.onResizing({\n          comid: props.comid,\n          beforeMove: dimensionsBeforeMoveSync.current,\n          curMove: {\n            top: newTop,\n            left: newLeft,\n            right: newRight,\n            bottom: newBottom,\n            width: newWidth,\n            height: newHeight\n          }\n        })\n      }\n    }\n\n    function rectCorrectionByAspectRatio (rect) {\n      let { newLeft, newRight, newTop, newBottom } = rect\n\n      let newWidth = parentWidth - newLeft - newRight\n      let newHeight = parentHeight - newTop - newBottom\n\n      if (currentStickSync.current[1] === 'm') {\n        const deltaHeight = newHeight - dimensionsBeforeMoveSync.current.height\n\n        newLeft -= (deltaHeight * aspectFactor) / 2\n        newRight -= (deltaHeight * aspectFactor) / 2\n      } else if (currentStickSync.current[0] === 'm') {\n        const deltaWidth = newWidth - dimensionsBeforeMoveSync.current.width\n\n        newTop -= deltaWidth / aspectFactor / 2\n        newBottom -= deltaWidth / aspectFactor / 2\n      } else if (newWidth / newHeight > aspectFactor) {\n        newWidth = aspectFactor * newHeight\n\n        if (currentStickSync.current[1] === 'l') {\n          newLeft = parentWidth - newRight - newWidth\n        } else {\n          newRight = parentWidth - newLeft - newWidth\n        }\n      } else {\n        newHeight = newWidth / aspectFactor\n\n        if (currentStickSync.current[0] === 't') {\n          newTop = parentHeight - newBottom - newHeight\n        } else {\n          newBottom = parentHeight - newTop - newHeight\n        }\n      }\n\n      return {\n        newLeft,\n        newRight,\n        newTop,\n        newBottom\n      }\n    }\n\n    function bodyMove (delta) {\n      const { gridX, gridY, snapToGrid } = props\n      let newTop = dimensionsBeforeMoveSync.current.top - delta.y\n      let newBottom = dimensionsBeforeMoveSync.current.bottom + delta.y\n      let newLeft = dimensionsBeforeMoveSync.current.left - delta.x\n      let newRight = dimensionsBeforeMoveSync.current.right + delta.x\n\n      // 是否限制移动的范围,必须按照某个步数来移动\n      if (snapToGrid) {\n        let alignTop = true\n        let alignLeft = true\n\n        // 这个操作是为了让格子移动如果超出一般则直接跳到下一个格子\n        let diffT = newTop - Math.floor(newTop / gridY) * gridY\n        let diffB = parentHeight - newBottom - Math.floor((parentHeight - newBottom) / gridY) * gridY\n        let diffL = newLeft - Math.floor(newLeft / gridX) * gridX\n        let diffR = parentWidth - newRight - Math.floor((parentWidth - newRight) / gridX) * gridX\n\n        if (diffT > gridY / 2) {\n          diffT -= gridY\n        }\n        if (diffB > gridY / 2) {\n          diffB -= gridY\n        }\n        if (diffL > gridX / 2) {\n          diffL -= gridX\n        }\n        if (diffR > gridX / 2) {\n          diffR -= gridX\n        }\n\n        // 根据比对判断盒子移动的方向\n        if (Math.abs(diffB) < Math.abs(diffT)) {\n          alignTop = false\n        }\n        if (Math.abs(diffR) < Math.abs(diffL)) {\n          alignLeft = false\n        }\n\n        newTop -= alignTop ? diffT : diffB\n        newBottom = parentHeight - height - newTop\n        newLeft -= alignLeft ? diffL : diffR\n        newRight = parentWidth - width - newLeft\n      }\n\n      // 判断是否超出边界处理并更新组件的值\n      ;({ newLeft, newRight, newTop, newBottom } = rectCorrectionByLimit({\n        newLeft,\n        newRight,\n        newTop,\n        newBottom\n      }))\n      setLeft(newLeft)\n      setRight(newRight)\n      setTop(newTop)\n      setBottom(newBottom)\n      // 传递事件将数据传递出去\n      if (props.onDragging) {\n        props.onDragging({\n          comid: props.comid,\n          beforeMove: dimensionsBeforeMoveSync.current,\n          curMove: {\n            top: newTop,\n            left: newLeft,\n            right: newRight,\n            bottom: newBottom,\n            width: width,\n            height: height\n          }\n        })\n      }\n    }\n\n    function rectCorrectionByLimit (rect) {\n      let { newRight, newLeft, newBottom, newTop } = rect\n\n      newLeft = sideCorrectionByLimit(limits.left, newLeft)\n      newRight = sideCorrectionByLimit(limits.right, newRight)\n      newTop = sideCorrectionByLimit(limits.top, newTop)\n      newBottom = sideCorrectionByLimit(limits.bottom, newBottom)\n\n      return {\n        newLeft,\n        newRight,\n        newTop,\n        newBottom\n      }\n    }\n\n    function sideCorrectionByLimit (limit, current) {\n      let value = current\n\n      if (limit.min !== null && current < limit.min) {\n        value = limit.min\n      } else if (limit.max !== null && limit.max < current) {\n        value = limit.max\n      }\n\n      return value\n    }\n\n    function up (ev) {\n      if (stickDragSync.current || bodyDragSync.current) {\n        // 冲突检测\n        const conflictResult = conflictCheck({\n          top,\n          left,\n          width,\n          height\n        })\n        // 冲突检测有开启，并且冲突了\n        if (conflictResult.type === 'on' && conflictResult.isConflict === true) {\n          setPosition({\n            top: dimensionsBeforeMoveSync.current.top,\n            left: dimensionsBeforeMoveSync.current.left,\n            right: dimensionsBeforeMoveSync.current.right,\n            bottom: dimensionsBeforeMoveSync.current.bottom\n          })\n        } else {\n          // 记录当前操作\n          recordCurrentSteps({\n            top,\n            left,\n            right,\n            bottom\n          })\n          // 记录上一次操作\n          recordHistorySteps({\n            dimensionsBeforeMoveData: dimensionsBeforeMoveSync.current\n          })\n        }\n        if (stickDragSync.current) {\n          stickUp(ev)\n        } else if (bodyDragSync.current) {\n          bodyUp(ev)\n        }\n      }\n    }\n\n    function stickUp () {\n      setStickDrag(false)\n      setIsOperation(false)\n      if (props.onResizing) {\n        props.onResizing({\n          comid: props.comid,\n          beforeMove: dimensionsBeforeMoveSync.current,\n          curMove: {\n            top: topSync.current,\n            left: leftSync.current,\n            right: rightSync.current,\n            bottom: bottomSync.current,\n            width: parentWidth - leftSync.current - rightSync.current,\n            height: parentHeight - topSync.current - bottomSync.current\n          }\n        })\n      }\n      if (props.onResizestop) {\n        props.onResizestop({\n          comid: props.comid,\n          beforeMove: dimensionsBeforeMoveSync.current,\n          curMove: {\n            top: topSync.current,\n            left: leftSync.current,\n            right: rightSync.current,\n            bottom: bottomSync.current,\n            width: parentWidth - leftSync.current - rightSync.current,\n            height: parentHeight - topSync.current - bottomSync.current\n          }\n        })\n      }\n      setDimensionsBeforeMove({\n        pointerX: 0,\n        pointerY: 0,\n        left: 0,\n        right: 0,\n        top: 0,\n        bottom: 0,\n        width: 0,\n        heihgt: 0\n      })\n      setLimits({\n        left: { min: null, max: null },\n        right: { min: null, max: null },\n        top: { min: null, max: null },\n        bottom: { min: null, max: null }\n      })\n    }\n\n    function bodyUp () {\n      // 接触按下转态，触发方法\n      setBodyDrag(false)\n      setIsOperation(false)\n      // 传递事件将数据传递出去\n      if (props.onDragging) {\n        props.onDragging({\n          comid: props.comid,\n          beforeMove: dimensionsBeforeMoveSync.current,\n          curMove: {\n            top: topSync.current,\n            left: leftSync.current,\n            right: rightSync.current,\n            bottom: bottomSync.current,\n            width: width,\n            height: height\n          }\n        })\n      }\n      if (props.onDragstop) {\n        props.onDragstop({\n          comid: props.comid,\n          beforeMove: dimensionsBeforeMoveSync.current,\n          curMove: {\n            top: topSync.current,\n            left: leftSync.current,\n            right: rightSync.current,\n            bottom: bottomSync.current,\n            width: width,\n            height: height\n          }\n        })\n      }\n\n      // 还原鼠标按下位置\n      setDimensionsBeforeMove({\n        pointerX: 0,\n        pointerY: 0,\n        left: 0,\n        right: 0,\n        top: 0,\n        bottom: 0,\n        width: 0,\n        heihgt: 0\n      })\n\n      // 还原父级最大最小值\n      setLimits({\n        left: { min: null, max: null },\n        right: { min: null, max: null },\n        top: { min: null, max: null },\n        bottom: { min: null, max: null }\n      })\n    }\n\n    function saveDimensionsBeforeMove ({ pointerX, pointerY }) {\n      setDimensionsBeforeMove({\n        pointerX,\n        pointerY,\n        left,\n        right,\n        top,\n        bottom,\n        width,\n        height\n      })\n      setAspectFactor(width / height)\n    }\n\n    return (\n      <ReactDragResizeWrapper\n        id={props.id}\n        data-testid=\"testid-drag-resize\"\n        ref={rootRef}\n        className={classnames([\n          'rdr',\n          props.className,\n          active ? 'active' : 'inactive',\n          props.class ? props.class : '',\n          isOperation ? 'Operation' : ''\n        ])}\n        onMouseDown={(ev) => {\n          bodyDown(ev)\n        }}\n        onTouchStart={(ev) => {\n          bodyDown(ev)\n        }}\n        onTouchEnd={(ev) => {\n          up(ev)\n        }}\n        style={{ ...positionStyle, ...props.style }}\n      >\n        <div style={sizeStyle} className=\"content-container\" ref={container}>\n          {props.children}\n        </div>\n        {props.sticks\n          .filter((stick) => {\n            const defaultSticks = ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']\n            if (defaultSticks.includes(stick)) {\n              return true\n            }\n            return false\n          })\n          .map((stick) => (\n            <div\n              key={stick}\n              className={classnames([\n                props.classNameStick,\n                'rdr-stick',\n                `rdr-stick-${stick}`,\n                props.isResizable ? '' : 'not-resizable'\n              ])}\n              onMouseDown={(event) => {\n                stickDown(stick, event)\n              }}\n              onTouchStart={(event) => {\n                stickDown(stick, event)\n              }}\n              style={rdrStick(stick)}\n            >\n              {props.stickSlot[stick]}\n            </div>\n          ))}\n      </ReactDragResizeWrapper>\n    )\n  })\n)\n\nReactDragResize.defaultProps = {\n  comid: undefined,\n  stickSize: 8,\n  parentScaleX: 1,\n  parentScaleY: 1,\n  isActive: undefined,\n  isDraggable: true,\n  isResizable: true,\n  aspectRatio: false,\n  parentLimitation: false,\n  snapToGrid: false,\n  gridX: 50,\n  gridY: 50,\n  parentW: undefined,\n  parentH: undefined,\n  w: 200,\n  h: 200,\n  minw: 0,\n  minh: 0,\n  maxw: null,\n  maxh: null,\n  x: 0,\n  y: 0,\n  z: 'auto',\n  dragHandle: undefined,\n  dragCancel: undefined,\n  sticks: ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'],\n  classNameStick: null,\n  stickSlot: {},\n  axis: 'both',\n  class: '',\n  isConflictCheck: false,\n  onClicBodyDown: undefined,\n  onDeselect: null,\n  historyStepsLength: 0,\n  onDragging: undefined,\n  onDragstop: null,\n  onResizing: null,\n  onResizestop: null,\n  directionStep: 1,\n  shiftDirectionStep: 10,\n  keyDirection: null\n}\n\nReactDragResize.Group = ReactDragResizeGroup\n\nexport default ReactDragResize\n","import { useSyncState } from '../../../hooks/useSyncState'\r\n// 记忆存储/回退功能\r\n\r\nconst useHistorySteps = (historyStepsLength) => {\r\n  // 操作步数存储\r\n  const [, , historyStepsSync] = useSyncState([], false)\r\n\r\n  // 以当前为0，-1为前一个\r\n  const [, setCurStep, curStepSync] = useSyncState(0, false)\r\n\r\n  // 记录历史步数步数\r\n  const recordHistorySteps = ({ dimensionsBeforeMoveData }) => {\r\n    // 看当前步数下表在哪，如果下表是回溯历史的时候，则应该清空回退的记录,步数回归0\r\n    if (curStepSync.current < 0) {\r\n      const arrIndex = historyStepsSync.current.length + curStepSync.current\r\n      historyStepsSync.current.splice(arrIndex)\r\n      setCurStep(0)\r\n    }\r\n    if (historyStepsLength > 0) {\r\n      if (historyStepsSync.current.length === historyStepsLength) {\r\n        // 存储数据满了需要删掉一个\r\n        historyStepsSync.current.splice(0, 1)\r\n      }\r\n      // 插入当前记录\r\n      historyStepsSync.current.push(dimensionsBeforeMoveData)\r\n    }\r\n  }\r\n\r\n  const [, setCurrentSteps, currentStepsSync] = useSyncState(null, false)\r\n  // 记录当前所在位置\r\n  const recordCurrentSteps = (dimensionsBeforeMoveData) => {\r\n    setCurrentSteps(dimensionsBeforeMoveData)\r\n  }\r\n\r\n  // 查询步数记录方法\r\n  const getHistorySteps = (steps) => {\r\n    if (steps === 0) {\r\n      // 返回到当前最新的位置\r\n      return currentStepsSync.current\r\n    }\r\n    // 转换成数组下标\r\n    const arrIndex = historyStepsSync.current.length + steps\r\n    if (arrIndex > -1) {\r\n      // 存在这个记录\r\n      return historyStepsSync.current[arrIndex]\r\n    }\r\n    // 不存在返回null\r\n    return null\r\n  }\r\n\r\n  return {\r\n    recordHistorySteps,\r\n    recordCurrentSteps,\r\n    getHistorySteps,\r\n    setCurStep,\r\n    curStepSync,\r\n    historyStepsSync\r\n  }\r\n}\r\n\r\nexport { useHistorySteps }\r\n","import { useEffect } from 'react'\r\n\r\n// 冲突检测\r\nconst useConflictCheck = ({ isConflictCheck, rootRef }) => {\r\n  useEffect(() => {\r\n    // 设置冲突检测\r\n    rootRef.current.setAttribute('data-is-check', `${isConflictCheck}`)\r\n  }, [])\r\n\r\n  function formatPostionVal (string) {\r\n    let num = string.replace(/[^0-9\\-,]/g, '')\r\n    if (num === undefined) num = 0\r\n    return parseFloat(num)\r\n  }\r\n\r\n  const conflictCheck = ({ top, left, width, height }) => {\r\n    if (isConflictCheck) {\r\n      const nodes = rootRef.current.parentNode.childNodes // 获取当前父节点下所有子节点\r\n      for (let i = 0; i < nodes.length; i++) {\r\n        const item = nodes[i]\r\n        if (\r\n          item.className !== undefined &&\r\n          !item.className.includes('Operation') &&\r\n          item.getAttribute('data-is-check') !== null &&\r\n          item.getAttribute('data-is-check') !== 'false'\r\n        ) {\r\n          const tw = item.offsetWidth\r\n          const th = item.offsetHeight\r\n          const tl = formatPostionVal(item.style.left)\r\n          const tt = formatPostionVal(item.style.top)\r\n\r\n          // 左上角与右下角重叠\r\n          const tfAndBr =\r\n            (top >= tt && left >= tl && tt + th > top && tl + tw > left) ||\r\n            (top <= tt && left < tl && top + height > tt && left + width > tl)\r\n          // 右上角与左下角重叠\r\n          const brAndTf =\r\n            (left <= tl && top >= tt && left + width > tl && top < tt + th) ||\r\n            (top < tt && left > tl && top + height > tt && left < tl + tw)\r\n          // 下边与上边重叠\r\n          const bAndT =\r\n            (top <= tt && left >= tl && top + height > tt && left < tl + tw) ||\r\n            (top >= tt && left <= tl && top < tt + th && left > tl + tw)\r\n          // 上边与下边重叠（宽度不一样）\r\n          const tAndB =\r\n            (top <= tt && left >= tl && top + height > tt && left < tl + tw) ||\r\n            (top >= tt && left <= tl && top < tt + th && left > tl + tw)\r\n          // 左边与右边重叠\r\n          const lAndR =\r\n            (left >= tl && top >= tt && left < tl + tw && top < tt + th) ||\r\n            (top > tt && left <= tl && left + width > tl && top < tt + th)\r\n          // 左边与右边重叠（高度不一样）\r\n          const rAndL =\r\n            (top <= tt && left >= tl && top + height > tt && left < tl + tw) ||\r\n            (top >= tt && left <= tl && top < tt + th && left + width > tl)\r\n\r\n          // 如果冲突，就将回退到移动前的位置\r\n          if (tfAndBr || brAndTf || bAndT || tAndB || lAndR || rAndL) {\r\n            return { type: 'on', isConflict: true }\r\n          }\r\n          return { type: 'on', isConflict: false }\r\n        }\r\n      }\r\n      return { type: 'on', isConflict: false }\r\n    }\r\n    return { type: 'off' }\r\n  }\r\n\r\n  return {\r\n    conflictCheck\r\n  }\r\n}\r\n\r\nexport { useConflictCheck }\r\n","import ReactDragResize from './components/ReactDragResize/ReactDragResize'\r\n\r\nexport default ReactDragResize\r\n"]}