@pdftron/webviewer
Version:
[WebViewer](https://www.apryse.com/webviewer) is a powerful JavaScript Document SDK and UI Component Library that is a part of the [Apryse PDF SDK](https://www.apryse.com). It provides a slick, out-of-the-box responsive UI that interacts with the core lib
2 lines • 28.6 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{1573:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d}));n(9),n(10),n(14),n(38),n(130),n(20),n(12),n(18),n(42),n(8),n(19),n(11),n(13);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function i(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||function(e){var t,n=e;return"Symbol(react.forward_ref)"===(null==n||null===(t=n.$$typeof)||void 0===t?void 0:t.toString())}(e);var t}function a(e,t){}function s(e){return"function"==typeof e}function c(){}function u(e){if(!function(e){return"object"===r(e)&&null!==e}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function d(e,t){return"string"==typeof e||"symbol"===r(e)||!!t&&Array.isArray(e)&&e.every((function(e){return d(e,!1)}))}},1663:function(e,t,n){"use strict";var r,o=n(75);!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(r||(r={}));var i=1,a=0;function s(e){return void 0===e.button||e.button===a}function c(e){return!!e.targetTouches}function u(e,t){return c(e)?function(e,t){return 1===e.targetTouches.length?u(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?u(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}var d=function(){var e=!1;try{addEventListener("test",(function(){}),Object.defineProperty({},"passive",{get:function(){return e=!0,!0}}))}catch(e){}return e}();function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h,f=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.enableTouchEvents=!0,this.enableMouseEvents=!1,this.enableKeyboardEvents=!1,this.ignoreContextMenu=!1,this.enableHoverOutsideTarget=!1,this.touchSlop=0,this.scrollAngleRanges=void 0,this.context=n,this.delayTouchStart=t.delayTouchStart||t.delay||0,this.delayMouseStart=t.delayMouseStart||t.delay||0,Object.keys(t).forEach((function(e){null!=t[e]&&(r[e]=t[e])}))}var t,n,r;return t=e,(n=[{key:"window",get:function(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&l(t.prototype,n),r&&l(t,r),e}();function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=(v(h={},r.mouse,{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"}),v(h,r.touch,{start:"touchstart",move:"touchmove",end:"touchend"}),v(h,r.keyboard,{keydown:"keydown"}),h),b=function(){function e(t,n,o){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getSourceClientOffset=function(e){return function(e){var t=1===e.nodeType?e:e.parentElement;if(t){var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}}(a.sourceNodes[e])},this.handleTopMoveStartCapture=function(e){s(e)&&(a.moveStartSourceIds=[])},this.handleMoveStart=function(e){Array.isArray(a.moveStartSourceIds)&&a.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=function(e){if(s(e)){var t=u(e);t&&(c(e)&&(a.lastTargetTouchFallback=e.targetTouches[0]),a._mouseClientOffset=t),a.waitingForDelay=!1}},this.handleTopMoveStartDelay=function(e){if(s(e)){var t=e.type===g.touch.start?a.options.delayTouchStart:a.options.delayMouseStart;a.timeout=setTimeout(a.handleTopMoveStart.bind(a,e),t),a.waitingForDelay=!0}},this.handleTopMoveCapture=function(){a.dragOverTargetIds=[]},this.handleMove=function(e,t){a.dragOverTargetIds&&a.dragOverTargetIds.unshift(t)},this.handleTopMove=function(e){if(a.timeout&&clearTimeout(a.timeout),a.document&&!a.waitingForDelay){var t,n,r,o,i=a.moveStartSourceIds,s=a.dragOverTargetIds,c=a.options.enableHoverOutsideTarget,d=u(e,a.lastTargetTouchFallback);if(d)if(a._isScrolling||!a.monitor.isDragging()&&function(e,t,n,r,o){if(!o)return!1;for(var i=180*Math.atan2(r-t,n-e)/Math.PI+180,a=0;a<o.length;++a)if((null==o[a].start||i>=o[a].start)&&(null==o[a].end||i<=o[a].end))return!0;return!1}(a._mouseClientOffset.x||0,a._mouseClientOffset.y||0,d.x,d.y,a.options.scrollAngleRanges))a._isScrolling=!0;else if(!a.monitor.isDragging()&&a._mouseClientOffset.hasOwnProperty("x")&&i&&(t=a._mouseClientOffset.x||0,n=a._mouseClientOffset.y||0,r=d.x,o=d.y,Math.sqrt(Math.pow(Math.abs(r-t),2)+Math.pow(Math.abs(o-n),2))>(a.options.touchSlop?a.options.touchSlop:0))&&(a.moveStartSourceIds=void 0,a.actions.beginDrag(i,{clientOffset:a._mouseClientOffset,getSourceClientOffset:a.getSourceClientOffset,publishSource:!1})),a.monitor.isDragging()){var l=a.sourceNodes[a.monitor.getSourceId()];a.installSourceNodeRemovalObserver(l),a.actions.publishDragSource(),e.preventDefault();var h=(s||[]).map((function(e){return a.targetNodes[e]})),f=a.options.getDropTargetElementsAtPoint?a.options.getDropTargetElementsAtPoint(d.x,d.y,h):a.document.elementsFromPoint(d.x,d.y),p=[];for(var v in f)if(f.hasOwnProperty(v)){var g=f[v];for(p.push(g);g;)g=g.parentElement,-1===p.indexOf(g)&&p.push(g)}var b=p.filter((function(e){return h.indexOf(e)>-1})).map((function(e){for(var t in a.targetNodes)if(e===a.targetNodes[t])return t})).filter((function(e){return!!e})).filter((function(e,t,n){return n.indexOf(e)===t}));if(c)for(var y in a.targetNodes)if(a.targetNodes[y]&&a.targetNodes[y].contains(l)&&-1===b.indexOf(y)){b.unshift(y);break}b.reverse(),a.actions.hover(b,{clientOffset:d})}}},this.handleTopMoveEndCapture=function(e){a._isScrolling=!1,a.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0==(e.buttons&i)}(e)&&(a.monitor.isDragging()&&!a.monitor.didDrop()?(e.preventDefault(),a._mouseClientOffset={},a.uninstallSourceNodeRemovalObserver(),a.actions.drop(),a.actions.endDrag()):a.moveStartSourceIds=void 0)},this.handleCancelOnEscape=function(e){"Escape"===e.key&&a.monitor.isDragging()&&(a._mouseClientOffset={},a.uninstallSourceNodeRemovalObserver(),a.actions.endDrag())},this.options=new f(o,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes={},this.sourcePreviewNodes={},this.sourcePreviewNodeOptions={},this.targetNodes={},this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(r.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(r.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(r.keyboard)}var t,n,a;return t=e,(n=[{key:"setup",value:function(){this.window&&(Object(o.a)(!e.isSetUp,"Cannot have two Touch backends at the same time."),e.isSetUp=!0,this.addEventListener(this.window,"start",this.getTopMoveStartHandler()),this.addEventListener(this.window,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(this.window,"move",this.handleTopMove),this.addEventListener(this.window,"move",this.handleTopMoveCapture,!0),this.addEventListener(this.window,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(this.window,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(this.window,"keydown",this.handleCancelOnEscape,!0))}},{key:"teardown",value:function(){this.window&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(this.window,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(this.window,"start",this.handleTopMoveStart),this.removeEventListener(this.window,"move",this.handleTopMoveCapture,!0),this.removeEventListener(this.window,"move",this.handleTopMove),this.removeEventListener(this.window,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(this.window,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(this.window,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}},{key:"addEventListener",value:function(e,t,n,r){var o=d?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=g[r][t];i&&e.addEventListener(i,n,o)}))}},{key:"removeEventListener",value:function(e,t,n,r){var o=d?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){var i=g[r][t];i&&e.removeEventListener(i,n,o)}))}},{key:"connectDragSource",value:function(e,t){var n=this,r=this.handleMoveStart.bind(this,e);return this.sourceNodes[e]=t,this.addEventListener(t,"start",r),function(){delete n.sourceNodes[e],n.removeEventListener(t,"start",r)}}},{key:"connectDragPreview",value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions[e]=n,this.sourcePreviewNodes[e]=t,function(){delete r.sourcePreviewNodes[e],delete r.sourcePreviewNodeOptions[e]}}},{key:"connectDropTarget",value:function(e,t){var n=this;if(!this.document)return function(){return null};var r=function(r){if(n.document&&n.monitor.isDragging()){var o;switch(r.type){case g.mouse.move:o={x:r.clientX,y:r.clientY};break;case g.touch.move:o={x:r.touches[0].clientX,y:r.touches[0].clientY}}var i=null!=o?n.document.elementFromPoint(o.x,o.y):void 0,a=i&&t.contains(i);return i===t||a?n.handleMove(r,e):void 0}};return this.addEventListener(this.document.body,"move",r),this.targetNodes[e]=t,function(){n.document&&(delete n.targetNodes[e],n.removeEventListener(n.document.body,"move",r))}}},{key:"getTopMoveStartHandler",value:function(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}},{key:"installSourceNodeRemovalObserver",value:function(e){var t=this;this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver((function(){e&&!e.parentElement&&(t.resurrectSourceNode(),t.uninstallSourceNodeRemovalObserver())})),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}},{key:"resurrectSourceNode",value:function(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}},{key:"uninstallSourceNodeRemovalObserver",value:function(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){if(this.window)return this.window.document}}])&&p(t.prototype,n),a&&p(t,a),e}();t.a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new b(e,t,n)}},1664:function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));n(9),n(10),n(14),n(38),n(21),n(20),n(12),n(22),n(18),n(16),n(59),n(40),n(24),n(42),n(43),n(8),n(84),n(17),n(19),n(11),n(13);var r=n(482),o=n(0),i=n(1721),a=n(75),s=n(610),c=(n(76),n(129),n(1573));function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(){function e(t){u(this,e),h(this,"isDisposed",!1),h(this,"action",void 0),this.action=Object(c.c)(t)?t:c.g}return l(e,[{key:"dispose",value:function(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function(e){return Boolean(e&&Object(c.c)(e.dispose))}},{key:"_fixup",value:function(t){return e.isDisposable(t)?t:e.empty}},{key:"create",value:function(t){return new e(t)}}]),e}();h(f,"empty",{dispose:c.g});var p=function(){function e(){u(this,e),h(this,"isDisposed",!1),h(this,"disposables",void 0);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.disposables=n}return l(e,[{key:"add",value:function(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function(e){var t=!1;if(!this.isDisposed){var n=this.disposables.indexOf(e);-1!==n&&(t=!0,this.disposables.splice(n,1),e.dispose())}return t}},{key:"clear",value:function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}}]),e}(),v=function(){function e(){u(this,e),h(this,"isDisposed",!1),h(this,"current",void 0)}return l(e,[{key:"getDisposable",value:function(){return this.current}},{key:"setDisposable",value:function(e){var t=this.isDisposed;if(!t){var n=this.current;this.current=e,n&&n.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),e}(),g=n(375),b=n.n(g);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e,t)||function(){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 w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){var t=e.DecoratedComponent,n=e.createHandler,u=e.createMonitor,d=e.createConnector,l=e.registerHandler,h=e.containerDisplayName,g=e.getType,y=e.collect,w=e.options.arePropsEqual,j=void 0===w?i.a:w,T=t,C=t.displayName||t.name||"Component",M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(M,e);var t,h,b,w=D(M);function M(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,M),k(E(t=w.call(this,e)),"decoratedRef",Object(o.createRef)()),k(E(t),"handlerId",void 0),k(E(t),"manager",void 0),k(E(t),"handlerMonitor",void 0),k(E(t),"handlerConnector",void 0),k(E(t),"handler",void 0),k(E(t),"disposable",void 0),k(E(t),"currentType",void 0),k(E(t),"handleChange",(function(){var e=t.getCurrentState();Object(i.a)(e,t.state)||t.setState(e)})),t.disposable=new v,t.receiveProps(e),t.dispose(),t}return t=M,(h=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return Object(a.a)(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function(e,t){return!j(e,this.props)||!Object(i.a)(t,this.state)}},{key:"componentDidMount",value:function(){this.disposable=new v,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function(e){j(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"receiveProps",value:function(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(g(e)))}},{key:"receiveType",value:function(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=m(l(e,this.handler,this.manager),2),n=t[0],r=t[1];this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new p(new f(o),new f(r)))}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?y(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return Object(r.jsx)(s.a.Consumer,{children:function(t){var n=t.dragDropManager;return e.receiveDragDropManager(n),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){var t;return null===(t=e.handlerConnector)||void 0===t?void 0:t.reconnect()})),Object(r.jsx)(T,Object.assign({},e.props,e.getCurrentState(),{ref:Object(c.e)(T)?e.decoratedRef:null}),void 0)}},void 0)}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&(Object(a.a)(void 0!==e,"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",C,C),void 0!==e&&(this.manager=e,this.handlerMonitor=u(e),this.handlerConnector=d(e.getBackend()),this.handler=n(this.handlerMonitor,this.decoratedRef)))}}])&&O(t.prototype,h),b&&O(t,b),M}(o.Component);return k(M,"DecoratedComponent",t),k(M,"displayName","".concat(h,"(").concat(C,")")),b()(M,t)}},1869:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(9),n(10),n(14),n(21),n(20),n(12),n(22),n(18),n(16),n(8),n(17),n(19),n(11),n(13);var r=n(0),o=n(1593),i=n(1722);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=Object(o.a)().getMonitor(),n=a(Object(i.a)(t,e),2),s=n[0],c=n[1];return Object(r.useEffect)((function(){return t.subscribeToOffsetChange(c)})),Object(r.useEffect)((function(){return t.subscribeToStateChange(c)})),s}},1876:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(75),o=n(2080),i=n(2078),a=n(2079),s=n(1573),c=n(1664);n(27),n(76),n(85),n(24),n(37),n(8),n(56),n(29);function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=["canDrop","hover","drop"],h=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,"props",null),d(this,"spec",void 0),d(this,"monitor",void 0),d(this,"ref",void 0),this.spec=t,this.monitor=n,this.ref=r}var t,n,r;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"canDrop",value:function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){this.spec.hover&&this.props&&this.spec.hover(this.props,this.monitor,Object(s.b)(this.ref))}},{key:"drop",value:function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}])&&u(t.prototype,n),r&&u(t,r),e}();function f(e){return Object.keys(e).forEach((function(t){Object(r.a)(l.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',l.join(", "),t),Object(r.a)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,n){return new h(e,t,n)}}function p(e,t,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(s.a)("DropTarget","type, spec, collect[, options]",e,t,n,u);var d=e;"function"!=typeof e&&(Object(r.a)(Object(s.f)(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),d=function(){return e}),Object(r.a)(Object(s.d)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var l=f(t);return Object(r.a)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),Object(r.a)(Object(s.d)(u),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(e){return Object(c.a)({containerDisplayName:"DropTarget",createHandler:l,registerHandler:o.b,createMonitor:function(e){return new i.a(e)},createConnector:function(e){return new a.a(e)},DecoratedComponent:e,getType:d,collect:n,options:u})}}},1877:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(75),o=n(2080),i=n(2082),a=n(2081),s=n(1573),c=n(1664);n(27),n(76),n(85),n(24),n(37),n(8),n(29);function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=["canDrag","beginDrag","isDragging","endDrag"],h=["beginDrag"],f=function(){function e(t,n,r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,"props",null),d(this,"spec",void 0),d(this,"monitor",void 0),d(this,"ref",void 0),d(this,"beginDrag",(function(){if(o.props)return o.spec.beginDrag(o.props,o.monitor,o.ref.current)})),this.spec=t,this.monitor=n,this.ref=r}var t,n,r;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"canDrag",value:function(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,Object(s.b)(this.ref))}}])&&u(t.prototype,n),r&&u(t,r),e}();function p(e){return Object.keys(e).forEach((function(t){Object(r.a)(l.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',l.join(", "),t),Object(r.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),h.forEach((function(t){Object(r.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,n){return new f(e,t,n)}}function v(e,t,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(s.a)("DragSource","type, spec, collect[, options]",e,t,n,u);var d=e;"function"!=typeof e&&(Object(r.a)(Object(s.f)(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),d=function(){return e}),Object(r.a)(Object(s.d)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var l=p(t);return Object(r.a)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),Object(r.a)(Object(s.d)(u),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function(e){return Object(c.a)({containerDisplayName:"DragSource",createHandler:l,registerHandler:o.a,createConnector:function(e){return new i.a(e)},createMonitor:function(e){return new a.a(e)},DecoratedComponent:e,getType:d,collect:n,options:u})}}},630:function(e,t,n){"use strict";var r;function o(){return r||((r=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),r}n.d(t,"a",(function(){return o}))}}]);
//# sourceMappingURL=chunk.13.js.map