{"version":3,"sources":["jsdelivr-header.js","/npm/cytoscape-compound-drag-and-drop@1.1.0/cytoscape-compound-drag-and-drop.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCNA,SAA2C,EAAM,GAC1B,iBAAZ,SAA0C,iBAAX,OACxC,OAAO,QAAU,IACQ,mBAAX,QAAyB,OAAO,IAC9C,OAAO,GAAI,GACe,iBAAZ,QACd,QAAsC,6BAAI,IAE1C,EAAmC,6BAAI,GACxC,CATD,CASG,MAAM,WACT,OACc,EAAsB,CAE9B,IACE,IAGR,EAAO,QAA2B,MAAjB,OAAO,OAAiB,OAAO,OAAO,KAAK,QAAU,SAAU,GAC9E,IAAK,IAAI,EAAO,UAAU,OAAQ,EAAO,IAAI,MAAM,EAAO,EAAI,EAAO,EAAI,GAAI,EAAO,EAAG,EAAO,EAAM,IAClG,EAAK,EAAO,GAAK,UAAU,GAU7B,OAPA,EAAK,QAAO,SAAU,GACpB,OAAc,MAAP,CACT,IAAG,SAAQ,SAAU,GACnB,OAAO,KAAK,GAAK,SAAQ,SAAU,GACjC,OAAO,EAAI,GAAK,EAAI,EACtB,GACF,IACO,CACT,CAEO,EAED,IACE,IAGR,EAAO,QAAU,CACf,YAAa,SAAqB,GAChC,OAAO,CACT,EAEA,WAAY,SAAoB,EAAa,GAC3C,OAAO,CACT,EAEA,YAAa,SAAqB,EAAc,GAC9C,OAAO,CACT,EAEA,cAAe,SAAuB,EAAa,GACjD,MAAO,CAAC,CACV,EAEA,mBAAoB,CAElB,iBAAiB,EACjB,eAAe,GAEjB,cAAe,GAEf,aAAc,GAIT,EAED,IACA,CAAE,EAAQ,EAA0B,KAE1C,IAAI,EAAS,EAAoB,KAE7B,EAAW,EAAoB,KAE/B,EAAS,EAAoB,IAE7B,EAAY,EAAoB,KAEhC,EAAc,SAAqB,EAAI,GACzC,KAAK,GAAK,EACV,KAAK,QAAU,EAAO,CAAC,EAAG,EAAU,GACpC,KAAK,UAAY,GACjB,KAAK,SA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AAI,EAAI,EACd,GAAI,EAAG,GAAK,EACZ,GAAI,EAAG,GAAK,EACZ,EAAG,EAAG,EAAI,EAAI,EAElB,EAUE,WAAY,EACZ,cA7EkB,SAAuB,EAAG,GAC5C,OAAO,EAAW,EAAU,EAAG,GACjC,EA4EE,aA1EiB,SAAsB,GACvC,OAAO,EAAE,KAAK,CACZ,OAAQ,MAEZ,EAuEE,UArEc,SAAmB,EAAG,GACpC,OAAO,EAAE,KAAK,CACZ,OAAQ,EAAO,MAEnB,EAoEO,EAED,IACA,CAAE,EAAQ,EAA0B,KAE1C,IAAI,EAAO,EAAoB,KAG3B,EAAW,SAAkB,GAC1B,GAKL,EAAU,OAAQ,sBAAuB,EAC3C,EAEyB,oBAAd,WAET,EAAS,WAGX,EAAO,QAAU,CAEV,GAKO,EAA2B,CAAC,EAGhC,SAAS,EAAoB,GAE5B,IAAI,EAAe,EAAyB,GAC5C,QAAqB,IAAjB,EACH,OAAO,EAAa,QAGrB,IAAI,EAAS,EAAyB,GAAY,CAGjD,QAAS,CAAC,GAOX,OAHA,EAAoB,GAAU,EAAQ,EAAO,QAAS,GAG/C,EAAO,OACf,CAO0B,CAAoB,KAniBxC,IACF,EAsgBA,CAiCd","file":"/npm/cytoscape-compound-drag-and-drop@1.1.0/cytoscape-compound-drag-and-drop.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/cytoscape-compound-drag-and-drop@1.1.0/cytoscape-compound-drag-and-drop.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 if(typeof exports === 'object')\n\t\texports[\"cytoscapeCompoundDragAndDrop\"] = factory();\n\telse\n\t\troot[\"cytoscapeCompoundDragAndDrop\"] = factory();\n})(self, function() {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 658:\n/***/ ((module) => {\n\n// Simple, internal Object.assign() polyfill for options objects etc.\nmodule.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {\n  for (var _len = arguments.length, srcs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    srcs[_key - 1] = arguments[_key];\n  }\n\n  srcs.filter(function (src) {\n    return src != null;\n  }).forEach(function (src) {\n    Object.keys(src).forEach(function (k) {\n      return tgt[k] = src[k];\n    });\n  });\n  return tgt;\n};\n\n/***/ }),\n\n/***/ 738:\n/***/ ((module) => {\n\n/* eslint-disable no-unused-vars */\nmodule.exports = {\n  grabbedNode: function grabbedNode(node) {\n    return true;\n  },\n  // filter function to specify which nodes are valid to grab and drop into other nodes\n  dropTarget: function dropTarget(_dropTarget, grabbedNode) {\n    return true;\n  },\n  // filter function to specify which parent nodes are valid drop targets\n  dropSibling: function dropSibling(_dropSibling, grabbedNode) {\n    return true;\n  },\n  // filter function to specify which orphan nodes are valid drop siblings\n  newParentNode: function newParentNode(grabbedNode, dropSibling) {\n    return {};\n  },\n  // specifies element json for parent nodes added by dropping an orphan node on another orphan (a drop sibling)\n  boundingBoxOptions: {\n    // same as https://js.cytoscape.org/#eles.boundingBox, used when calculating if one node is dragged over another\n    includeOverlays: false,\n    includeLabels: true\n  },\n  overThreshold: 10,\n  // make dragging over a drop target easier by expanding the hit area by this amount on all sides\n  outThreshold: 10 // make dragging out of a drop target a bit harder by expanding the hit area by this amount on all sides\n\n};\n\n/***/ }),\n\n/***/ 904:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\nvar assign = __webpack_require__(658);\n\nvar defaults = __webpack_require__(738);\n\nvar toggle = __webpack_require__(43);\n\nvar listeners = __webpack_require__(444);\n\nvar DragAndDrop = function DragAndDrop(cy, options) {\n  this.cy = cy;\n  this.options = assign({}, defaults, options);\n  this.listeners = [];\n  this.enabled = true;\n  this.addListeners();\n};\n\nvar destroy = function destroy() {\n  this.removeListeners();\n};\n\n[toggle, listeners, {\n  destroy: destroy\n}].forEach(function (def) {\n  assign(DragAndDrop.prototype, def);\n});\n\nmodule.exports = function (options) {\n  var cy = this;\n  return new DragAndDrop(cy, options);\n};\n\n/***/ }),\n\n/***/ 444:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\nvar _require = __webpack_require__(235),\n    isParent = _require.isParent,\n    isChild = _require.isChild,\n    isOnlyChild = _require.isOnlyChild,\n    getBounds = _require.getBounds,\n    getBoundsTuple = _require.getBoundsTuple,\n    boundsOverlap = _require.boundsOverlap,\n    expandBounds = _require.expandBounds,\n    getBoundsCopy = _require.getBoundsCopy,\n    setParent = _require.setParent,\n    removeParent = _require.removeParent;\n\nvar addListener = function addListener(event, selector, callback) {\n  this.listeners.push({\n    event: event,\n    selector: selector,\n    callback: callback\n  });\n\n  if (selector == null) {\n    this.cy.on(event, callback);\n  } else {\n    this.cy.on(event, selector, callback);\n  }\n};\n\nvar addListeners = function addListeners() {\n  var _this = this;\n\n  var options = this.options,\n      cy = this.cy;\n\n  var isMultiplySelected = function isMultiplySelected(n) {\n    return n.selected() && cy.elements('node:selected').length > 1;\n  };\n\n  var canBeGrabbed = function canBeGrabbed(n) {\n    return !isParent(n) && !isMultiplySelected(n) && options.grabbedNode(n);\n  };\n\n  var canBeDropTarget = function canBeDropTarget(n) {\n    return !isChild(n) && !n.same(_this.grabbedNode) && options.dropTarget(n, _this.grabbedNode);\n  };\n\n  var canBeDropSibling = function canBeDropSibling(n) {\n    return isChild(n) && !n.same(_this.grabbedNode) && options.dropSibling(n, _this.grabbedNode);\n  };\n\n  var canPullFromParent = function canPullFromParent(n) {\n    return isChild(n);\n  };\n\n  var getBoundTuplesNode = function getBoundTuplesNode(n) {\n    return getBoundsTuple(n, options.boundingBoxOptions);\n  };\n\n  var canBeInBoundsTuple = function canBeInBoundsTuple(n) {\n    return (canBeDropTarget(n) || canBeDropSibling(n)) && !n.same(_this.dropTarget);\n  };\n\n  var updateBoundsTuples = function updateBoundsTuples() {\n    return _this.boundsTuples = cy.nodes(canBeInBoundsTuple).map(getBoundTuplesNode);\n  };\n\n  var reset = function reset() {\n    _this.grabbedNode.removeClass('cdnd-grabbed-node');\n\n    _this.dropTarget.removeClass('cdnd-drop-target');\n\n    _this.dropSibling.removeClass('cdnd-drop-sibling');\n\n    _this.grabbedNode = cy.collection();\n    _this.dropTarget = cy.collection();\n    _this.dropSibling = cy.collection();\n    _this.dropTargetBounds = null;\n    _this.boundsTuples = [];\n    _this.inGesture = false;\n  };\n\n  this.addListener('grab', 'node', function (e) {\n    var node = e.target;\n\n    if (!_this.enabled || !canBeGrabbed(node)) {\n      return;\n    }\n\n    _this.inGesture = true;\n    _this.grabbedNode = node;\n    _this.dropTarget = cy.collection();\n    _this.dropSibling = cy.collection();\n\n    if (canPullFromParent(node)) {\n      _this.dropTarget = node.parent();\n      _this.dropTargetBounds = getBoundsCopy(_this.dropTarget, options.boundingBoxOptions);\n    }\n\n    updateBoundsTuples();\n\n    _this.grabbedNode.addClass('cdnd-grabbed-node');\n\n    _this.dropTarget.addClass('cdnd-drop-target');\n\n    node.emit('cdndgrab');\n  });\n  this.addListener('add', 'node', function (e) {\n    if (!_this.inGesture || !_this.enabled) {\n      return;\n    }\n\n    var newNode = e.target;\n\n    if (canBeInBoundsTuple(newNode)) {\n      _this.boundsTuples.push(getBoundsTuple(newNode, options.boundingBoxOptions));\n    }\n  });\n  this.addListener('remove', 'node', function (e) {\n    if (!_this.inGesture || !_this.enabled) {\n      return;\n    }\n\n    var rmedNode = e.target;\n    var rmedIsTarget = rmedNode.same(_this.dropTarget);\n    var rmedIsSibling = rmedNode.same(_this.dropSibling);\n    var rmedIsGrabbed = rmedNode.same(_this.grabbedNode); // try to clean things up if one of the drop nodes is removed\n\n    if (rmedIsTarget || rmedIsSibling || rmedIsGrabbed) {\n      if (rmedIsGrabbed) {\n        reset();\n      } else {\n        _this.dropTarget = cy.collection();\n        _this.dropSibling = cy.collection();\n        updateBoundsTuples();\n      }\n    }\n  });\n  this.addListener('drag', 'node', function () {\n    if (!_this.inGesture || !_this.enabled) {\n      return;\n    }\n\n    if (_this.dropTarget.nonempty()) {\n      // already in a parent\n      var bb = expandBounds(getBounds(_this.grabbedNode, options.boundingBoxOptions), options.outThreshold);\n      var parent = _this.dropTarget;\n      var sibling = _this.dropSibling;\n      var rmFromParent = !boundsOverlap(_this.dropTargetBounds, bb);\n      var grabbedIsOnlyChild = isOnlyChild(_this.grabbedNode);\n\n      if (rmFromParent) {\n        removeParent(_this.grabbedNode);\n        removeParent(_this.dropSibling);\n\n        _this.dropTarget.removeClass('cdnd-drop-target');\n\n        _this.dropSibling.removeClass('cdnd-drop-sibling');\n\n        var isFakeParent = _this.dropTarget && _this.dropTarget.hasClass('cdnd-new-parent');\n\n        if ((_this.dropSibling.nonempty() // remove extension-created parents on out\n        || grabbedIsOnlyChild) && isFakeParent // remove empty parents\n        ) {\n          _this.dropTarget.remove();\n        }\n\n        _this.dropTarget = cy.collection();\n        _this.dropSibling = cy.collection();\n        _this.dropTargetBounds = null;\n\n        if (isFakeParent) {\n          updateBoundsTuples();\n        }\n\n        _this.grabbedNode.emit('cdndout', [parent, sibling]);\n      }\n    } else {\n      // not in a parent\n      var _bb = expandBounds(getBounds(_this.grabbedNode, options.boundingBoxOptions), options.overThreshold);\n\n      var tupleOverlaps = function tupleOverlaps(t) {\n        return !t.node.removed() && boundsOverlap(_bb, t.bb);\n      };\n\n      var overlappingNodes = _this.boundsTuples.filter(tupleOverlaps).map(function (t) {\n        return t.node;\n      });\n\n      if (overlappingNodes.length > 0) {\n        // potential parent\n        var overlappingParents = overlappingNodes.filter(isParent);\n\n        var _parent, _sibling;\n\n        if (overlappingParents.length > 0) {\n          _sibling = cy.collection();\n          _parent = overlappingParents[0]; // TODO maybe use a metric here to select which one\n        } else {\n          _sibling = overlappingNodes[0]; // TODO maybe use a metric here to select which one\n\n          _parent = cy.add(options.newParentNode(_this.grabbedNode, _sibling));\n        }\n\n        _parent.addClass('cdnd-drop-target');\n\n        if (_parent !== _sibling) {\n          _parent.addClass('cdnd-new-parent');\n        }\n\n        _sibling.addClass('cdnd-drop-sibling');\n\n        setParent(_sibling, _parent);\n        _this.dropTargetBounds = getBoundsCopy(_parent, options.boundingBoxOptions);\n        setParent(_this.grabbedNode, _parent);\n        _this.dropTarget = _parent;\n        _this.dropSibling = _sibling;\n\n        _this.grabbedNode.emit('cdndover', [_parent, _sibling]);\n      }\n    }\n  });\n  this.addListener('free', 'node', function () {\n    if (!_this.inGesture || !_this.enabled) {\n      return;\n    }\n\n    var grabbedNode = _this.grabbedNode,\n        dropTarget = _this.dropTarget,\n        dropSibling = _this.dropSibling;\n    reset();\n    grabbedNode.emit('cdnddrop', [dropTarget, dropSibling]);\n  });\n};\n\nvar removeListeners = function removeListeners() {\n  var cy = this.cy;\n  this.listeners.forEach(function (lis) {\n    var event = lis.event,\n        selector = lis.selector,\n        callback = lis.callback;\n\n    if (selector == null) {\n      cy.removeListener(event, callback);\n    } else {\n      cy.removeListener(event, selector, callback);\n    }\n  });\n  this.listeners = [];\n};\n\nmodule.exports = {\n  addListener: addListener,\n  addListeners: addListeners,\n  removeListeners: removeListeners\n};\n\n/***/ }),\n\n/***/ 43:\n/***/ ((module) => {\n\nfunction enable() {\n  this.enabled = true;\n}\n\nfunction disable() {\n  this.enabled = false;\n}\n\nmodule.exports = {\n  enable: enable,\n  disable: disable\n};\n\n/***/ }),\n\n/***/ 235:\n/***/ ((module) => {\n\nvar isParent = function isParent(n) {\n  return n.isParent();\n};\n\nvar isChild = function isChild(n) {\n  return n.isChild();\n};\n\nvar isOnlyChild = function isOnlyChild(n) {\n  return isChild(n) && n.parent().children().length === 1;\n};\n\nvar getBounds = function getBounds(n, boundingBoxOptions) {\n  return n.boundingBox(boundingBoxOptions);\n};\n\nvar getBoundsTuple = function getBoundsTuple(n, boundingBoxOptions) {\n  return {\n    node: n,\n    bb: copyBounds(getBounds(n, boundingBoxOptions))\n  };\n};\n\nvar copyBounds = function copyBounds(bb) {\n  return {\n    x1: bb.x1,\n    x2: bb.x2,\n    y1: bb.y1,\n    y2: bb.y2,\n    w: bb.w,\n    h: bb.h\n  };\n};\n\nvar getBoundsCopy = function getBoundsCopy(n, boundingBoxOptions) {\n  return copyBounds(getBounds(n, boundingBoxOptions));\n};\n\nvar removeParent = function removeParent(n) {\n  return n.move({\n    parent: null\n  });\n};\n\nvar setParent = function setParent(n, parent) {\n  return n.move({\n    parent: parent.id()\n  });\n};\n\nvar boundsOverlap = function boundsOverlap(bb1, bb2) {\n  // case: one bb to right of other\n  if (bb1.x1 > bb2.x2) {\n    return false;\n  }\n\n  if (bb2.x1 > bb1.x2) {\n    return false;\n  } // case: one bb to left of other\n\n\n  if (bb1.x2 < bb2.x1) {\n    return false;\n  }\n\n  if (bb2.x2 < bb1.x1) {\n    return false;\n  } // case: one bb above other\n\n\n  if (bb1.y2 < bb2.y1) {\n    return false;\n  }\n\n  if (bb2.y2 < bb1.y1) {\n    return false;\n  } // case: one bb below other\n\n\n  if (bb1.y1 > bb2.y2) {\n    return false;\n  }\n\n  if (bb2.y1 > bb1.y2) {\n    return false;\n  } // otherwise, must have some overlap\n\n\n  return true;\n};\n\nvar expandBounds = function expandBounds(bb, padding) {\n  return {\n    x1: bb.x1 - padding,\n    x2: bb.x2 + padding,\n    w: bb.w + 2 * padding,\n    y1: bb.y1 - padding,\n    y2: bb.y2 + padding,\n    h: bb.h + 2 * padding\n  };\n};\n\nmodule.exports = {\n  isParent: isParent,\n  isChild: isChild,\n  isOnlyChild: isOnlyChild,\n  getBoundsTuple: getBoundsTuple,\n  boundsOverlap: boundsOverlap,\n  getBounds: getBounds,\n  expandBounds: expandBounds,\n  copyBounds: copyBounds,\n  getBoundsCopy: getBoundsCopy,\n  removeParent: removeParent,\n  setParent: setParent\n};\n\n/***/ }),\n\n/***/ 579:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\nvar impl = __webpack_require__(904); // registers the extension on a cytoscape lib ref\n\n\nvar register = function register(cytoscape) {\n  if (!cytoscape) {\n    return;\n  } // can't register if cytoscape unspecified\n\n\n  cytoscape('core', 'compoundDragAndDrop', impl); // register with cytoscape.js\n};\n\nif (typeof cytoscape !== 'undefined') {\n  // expose to global cytoscape (i.e. window.cytoscape)\n  register(cytoscape);\n}\n\nmodule.exports = register;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(579);\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});"]}