@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 • 29.5 kB
JavaScript
(window.webpackJsonpWebViewerUI=window.webpackJsonpWebViewerUI||[]).push([[14],{1576: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 s})),n.d(t,"c",(function(){return a})),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(117),n(20),n(12),n(18),n(41),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 s(e,t){}function a(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)}))}},1656:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,o=n(1736);!function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"}(r||(r={}));class i{get delay(){var e;return null!==(e=this.args.delay)&&void 0!==e?e:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var e;return null!==(e=this.args.ignoreContextMenu)&&void 0!==e&&e}get enableHoverOutsideTarget(){var e;return null!==(e=this.args.enableHoverOutsideTarget)&&void 0!==e&&e}get enableKeyboardEvents(){var e;return null!==(e=this.args.enableKeyboardEvents)&&void 0!==e&&e}get enableMouseEvents(){var e;return null!==(e=this.args.enableMouseEvents)&&void 0!==e&&e}get enableTouchEvents(){var e;return null===(e=this.args.enableTouchEvents)||void 0===e||e}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,t,n,r;return null!==(r=null!==(n=null===(e=this.args)||void 0===e?void 0:e.delayTouchStart)&&void 0!==n?n:null===(t=this.args)||void 0===t?void 0:t.delay)&&void 0!==r?r:0}get delayMouseStart(){var e,t,n,r;return null!==(r=null!==(n=null===(e=this.args)||void 0===e?void 0:e.delayMouseStart)&&void 0!==n?n:null===(t=this.args)||void 0===t?void 0:t.delay)&&void 0!==r?r:0}get window(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.context)||void 0===e?void 0:e.document)?this.context.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.args)||void 0===e?void 0:e.rootElement)||this.document}constructor(e,t){this.args=e,this.context=t}}const s=1,a=0;function c(e){return void 0===e.button||e.button===a}function u(e){return!!e.targetTouches}function d(e,t){return u(e)?function(e,t){return 1===e.targetTouches.length?d(e.targetTouches[0]):t&&1===e.touches.length&&e.touches[0].target===t.target?d(e.touches[0]):void 0}(e,t):{x:e.clientX,y:e.clientY}}const h=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get:()=>(e=!0,!0)}))}catch(e){}return e})(),l={[r.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[r.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[r.keyboard]:{keydown:"keydown"}};class p{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(e=this.dragOverTargetIds)||void 0===e?void 0:e.length)||0}}get document(){return this.options.document}setup(){const e=this.options.rootElement;e&&(Object(o.a)(!p.isSetUp,"Cannot have two Touch backends at the same time."),p.isSetUp=!0,this.addEventListener(e,"start",this.getTopMoveStartHandler()),this.addEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(e,"move",this.handleTopMove),this.addEventListener(e,"move",this.handleTopMoveCapture,!0),this.addEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(e,"keydown",this.handleCancelOnEscape,!0))}teardown(){const e=this.options.rootElement;e&&(p.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(e,"start",this.handleTopMoveStart),this.removeEventListener(e,"move",this.handleTopMoveCapture,!0),this.removeEventListener(e,"move",this.handleTopMove),this.removeEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(e,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,t,n,r=!1){const o=h?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){const i=l[r][t];i&&e.addEventListener(i,n,o)}))}removeEventListener(e,t,n,r=!1){const o=h?{capture:r,passive:!1}:r;this.listenerTypes.forEach((function(r){const i=l[r][t];i&&e.removeEventListener(i,n,o)}))}connectDragSource(e,t){const n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,"start",n),()=>{this.sourceNodes.delete(e),this.removeEventListener(t,"start",n)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,t){const n=this.options.rootElement;if(!this.document||!n)return()=>{};const r=r=>{if(!this.document||!n||!this.monitor.isDragging())return;let o;switch(r.type){case l.mouse.move:o={x:r.clientX,y:r.clientY};break;case l.touch.move:var i,s;o={x:(null===(i=r.touches[0])||void 0===i?void 0:i.clientX)||0,y:(null===(s=r.touches[0])||void 0===s?void 0:s.clientY)||0}}const a=null!=o?this.document.elementFromPoint(o.x,o.y):void 0,c=a&&t.contains(a);return a===t||c?this.handleMove(r,e):void 0};return this.addEventListener(this.document.body,"move",r),this.targetNodes.set(e,t),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,"move",r))}}getTopMoveStartHandler(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),e&&e.parentElement&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,t,n){this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&function(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}(t)},this.handleTopMoveStartCapture=e=>{c(e)&&(this.moveStartSourceIds=[])},this.handleMoveStart=e=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=e=>{if(!c(e))return;const t=d(e);t&&(u(e)&&(this.lastTargetTouchFallback=e.targetTouches[0]),this._mouseClientOffset=t),this.waitingForDelay=!1},this.handleTopMoveStartDelay=e=>{if(!c(e))return;const t=e.type===l.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,e),t),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(e,t)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(t)},this.handleTopMove=e=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:t,dragOverTargetIds:n}=this,r=this.options.enableHoverOutsideTarget,o=d(e,this.lastTargetTouchFallback);if(!o)return;if(this._isScrolling||!this.monitor.isDragging()&&function(e,t,n,r,o){if(!o)return!1;const i=180*Math.atan2(r-t,n-e)/Math.PI+180;for(let e=0;e<o.length;++e){const t=o[e];if(t&&(null==t.start||i>=t.start)&&(null==t.end||i<=t.end))return!0}return!1}(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,o.x,o.y,this.options.scrollAngleRanges))return void(this._isScrolling=!0);var i,s,a,c;if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&t&&(i=this._mouseClientOffset.x||0,s=this._mouseClientOffset.y||0,a=o.x,c=o.y,Math.sqrt(Math.pow(Math.abs(a-i),2)+Math.pow(Math.abs(c-s),2))>(this.options.touchSlop?this.options.touchSlop:0))&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(t,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const u=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(u),this.actions.publishDragSource(),e.cancelable&&e.preventDefault();const h=(n||[]).map(e=>this.targetNodes.get(e)).filter(e=>!!e),l=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(o.x,o.y,h):this.document.elementsFromPoint(o.x,o.y),p=[];for(const e in l){if(!l.hasOwnProperty(e))continue;let t=l[e];for(null!=t&&p.push(t);t;)t=t.parentElement,t&&-1===p.indexOf(t)&&p.push(t)}const f=p.filter(e=>h.indexOf(e)>-1).map(e=>this._getDropTargetId(e)).filter(e=>!!e).filter((e,t,n)=>n.indexOf(e)===t);if(r)for(const e in this.targetNodes){const t=this.targetNodes.get(e);if(u&&t&&t.contains(u)&&-1===f.indexOf(e)){f.unshift(e);break}}f.reverse(),this.actions.hover(f,{clientOffset:o})},this._getDropTargetId=e=>{const t=this.targetNodes.keys();let n=t.next();for(;!1===n.done;){const r=n.value;if(e===this.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=e=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,function(e){return void 0===e.buttons||0==(e.buttons&s)}(e)&&(this.monitor.isDragging()&&!this.monitor.didDrop()?(e.cancelable&&e.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()):this.moveStartSourceIds=void 0)},this.handleCancelOnEscape=e=>{"Escape"===e.key&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new i(n,t),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,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)}}const f=function(e,t={},n={}){return new p(e,t,n)}},1657:function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));n(9),n(10),n(14),n(38),n(21),n(20),n(12),n(22),n(18),n(16),n(60),n(40),n(24),n(41),n(42),n(8),n(86),n(17),n(19),n(11),n(13);var r=n(491),o=n(0),i=n(1722),s=n(75),a=n(619),c=(n(77),n(128),n(1576));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 h(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(){function e(t){u(this,e),l(this,"isDisposed",!1),l(this,"action",void 0),this.action=Object(c.c)(t)?t:c.g}return h(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}();l(p,"empty",{dispose:c.g});var f=function(){function e(){u(this,e),l(this,"isDisposed",!1),l(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 h(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),l(this,"isDisposed",!1),l(this,"current",void 0)}return h(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(388),b=n.n(g);function m(e){return(m="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 y(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=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return O(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 O(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 O(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 w(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 E(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=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return D(this,n)}}function D(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){var t=e.DecoratedComponent,n=e.createHandler,u=e.createMonitor,d=e.createConnector,h=e.registerHandler,l=e.containerDisplayName,g=e.getType,m=e.collect,O=e.options.arePropsEqual,D=void 0===O?i.a:O,j=t,M=t.displayName||t.name||"Component",k=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)}(k,e);var t,l,b,O=E(k);function k(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),C(T(t=O.call(this,e)),"decoratedRef",Object(o.createRef)()),C(T(t),"handlerId",void 0),C(T(t),"manager",void 0),C(T(t),"handlerMonitor",void 0),C(T(t),"handlerConnector",void 0),C(T(t),"handler",void 0),C(T(t),"disposable",void 0),C(T(t),"currentType",void 0),C(T(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=k,(l=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return Object(s.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!D(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){D(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=y(h(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 f(new p(o),new p(r)))}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?m(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return Object(r.jsx)(a.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)(j,Object.assign({},e.props,e.getCurrentState(),{ref:Object(c.e)(j)?e.decoratedRef:null}),void 0)}},void 0)}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&(Object(s.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",M,M),void 0!==e&&(this.manager=e,this.handlerMonitor=u(e),this.handlerConnector=d(e.getBackend()),this.handler=n(this.handlerMonitor,this.decoratedRef)))}}])&&w(t.prototype,l),b&&w(t,b),k}(o.Component);return C(k,"DecoratedComponent",t),C(k,"displayName","".concat(l,"(").concat(M,")")),b()(k,t)}},1736:function(e,t,n){"use strict";(function(e){function r(t,n,...r){if(void 0!==e&&void 0===n)throw new Error("invariant requires an error message argument");if(!t){let e;if(void 0===n)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let t=0;e=new Error(n.replace(/%s/g,(function(){return r[t++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}n.d(t,"a",(function(){return r}))}).call(this,n(236))},1878: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(1592),i=n(1723);function s(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=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(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 a(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=s(Object(i.a)(t,e),2),a=n[0],c=n[1];return Object(r.useEffect)((function(){return t.subscribeToOffsetChange(c)})),Object(r.useEffect)((function(){return t.subscribeToStateChange(c)})),a}},1885:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(75),o=n(2089),i=n(2087),s=n(2088),a=n(1576),c=n(1657);n(27),n(77),n(82),n(24),n(35),n(8),n(57),n(31);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 h=["canDrop","hover","drop"],l=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(a.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 p(e){return Object.keys(e).forEach((function(t){Object(r.a)(h.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',h.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 l(e,t,n)}}function f(e,t,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(a.a)("DropTarget","type, spec, collect[, options]",e,t,n,u);var d=e;"function"!=typeof e&&(Object(r.a)(Object(a.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(a.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 h=p(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(a.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:h,registerHandler:o.b,createMonitor:function(e){return new i.a(e)},createConnector:function(e){return new s.a(e)},DecoratedComponent:e,getType:d,collect:n,options:u})}}},1886:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(75),o=n(2089),i=n(2091),s=n(2090),a=n(1576),c=n(1657);n(27),n(77),n(82),n(24),n(35),n(8),n(31);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 h=["canDrag","beginDrag","isDragging","endDrag"],l=["beginDrag"],p=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(a.b)(this.ref))}}])&&u(t.prototype,n),r&&u(t,r),e}();function f(e){return Object.keys(e).forEach((function(t){Object(r.a)(h.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',h.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])})),l.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 p(e,t,n)}}function v(e,t,n){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(a.a)("DragSource","type, spec, collect[, options]",e,t,n,u);var d=e;"function"!=typeof e&&(Object(r.a)(Object(a.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(a.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 h=f(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(a.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:h,registerHandler:o.a,createConnector:function(e){return new i.a(e)},createMonitor:function(e){return new s.a(e)},DecoratedComponent:e,getType:d,collect:n,options:u})}}},637: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.14.js.map