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AAQ,SAAU,GAExB,KAAK,eAAe,OAAO,EAC5B,GAAG,KACJ,EAID,uBACC,SAAgC,GAC/B,OAAO,KAAK,GAAS,SAAQ,SAAU,GACtC,IAAI,GAGH,EAAkB,KAAK,gBAAgB,GAAQ,MAAM,EAAiB,mBAAmB,EAAQ,IACnG,GAAG,KACJ,EAMD,0BACC,SAAmC,GAE9B,EAAU,QACb,KAAK,wBAAwB,EAAU,QAGpC,KAAK,eAAe,YACnB,EAAU,SACb,KAAK,eAAe,WAAW,EAAU,SAKvC,EAAU,UACT,EAAI,WAAoB,SAAG,EAAU,QAAS,KAAK,MAAM,UAC5D,KAAK,uBAAuB,EAAU,SAIpC,EAAU,eACT,EAAI,WAAoB,SAAG,EAAU,aAAc,KAAK,MAAM,eACjE,KAAK,0BAA0B,EAAU,cAIvC,EAAU,gBACT,EAAI,WAAoB,SAAG,EAAU,cAAe,KAAK,MAAM,gBAClE,KAAK,yBAAyB,EAAU,cAG3C,EAMD,sBACC,WACC,OAAO,CACR,EAMD,qBACC,WACC,KAAK,eAAe,SACrB,EAMD,OACC,WACC,OAAO,KAAK,MAAM,SAAW,KAAK,MAAM,SAAW,QAAiB,QAAE,cAAc,QAAS,CAAE,KAAM,SACtG,IAOF,QAAiB,QAAI","file":"/npm/kendo-ui-react-jquery-upload@1.0.4/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/kendo-ui-react-jquery-upload@1.0.4/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","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _kendoUpload = require('kendo/js/kendo.upload.js');\n\nvar _kendoUpload2 = _interopRequireDefault(_kendoUpload);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _deepDiff = require('deep-diff');\n\nvar _deepDiff2 = _interopRequireDefault(_deepDiff);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // import/require dependencies\n\n\n// create a React component, that is a wrapper for a Kendo UI widget\nvar KendoUpload = _react2['default'].createClass({\n\tdisplayName: 'KendoUpload',\n\n\n\t//component is in the DOM, so do stuff to it in this callback\n\tcomponentDidMount: function () {\n\t\tfunction componentDidMount() {\n\t\t\t//get, child element node for this component\n\t\t\tvar elementNode = _reactDom2['default'].findDOMNode(this);\n\n\t\t\t//determine if a selector was passed on which to invoke the KUI widget\n\t\t\tif (this.props.selector) {\n\t\t\t\telementNode = elementNode.querySelector(this.props.selector);\n\t\t\t}\n\n\t\t\t//instantiate and save reference to the Kendo UI widget on elementNode\n\t\t\t//note I am not using jQuery plugin to instantiate, don't want to wait for namespace on $.fn\n\t\t\tthis.widgetInstance = new _kendoUpload2['default'].ui.Upload(elementNode, this.props.options);\n\n\t\t\t//if props are avaliable for events, triggers, unbind events, or methods make it happen now\n\t\t\tthis.props.events ? this.bindEventsToKendoWidget(this.props.events) : null;\n\t\t\tthis.props.methods ? this.callKendoWidgetMethods(this.props.methods) : null;\n\t\t\tthis.props.triggerEvents ? this.triggerKendoWidgetEvents(this.props.triggerEvents) : null;\n\t\t}\n\n\t\treturn componentDidMount;\n\t}(),\n\n\t//instance methods for updating widget\n\ttriggerKendoWidgetEvents: function () {\n\t\tfunction triggerKendoWidgetEvents(events) {\n\t\t\tevents.forEach(function (event) {\n\t\t\t\t//loop over events, and trigger\n\t\t\t\tthis.widgetInstance.trigger(event);\n\t\t\t}, this);\n\t\t}\n\n\t\treturn triggerKendoWidgetEvents;\n\t}(),\n\tbindEventsToKendoWidget: function () {\n\t\tfunction bindEventsToKendoWidget(events) {\n\t\t\tObject.keys(events).forEach(function (event) {\n\t\t\t\t//loop over events and bind\n\t\t\t\tthis.widgetInstance.bind(event, events[event]);\n\t\t\t}, this);\n\t\t}\n\n\t\treturn bindEventsToKendoWidget;\n\t}(),\n\tunbindEventsToKendoWidget: function () {\n\t\tfunction unbindEventsToKendoWidget(events) {\n\t\t\tevents.forEach(function (event) {\n\t\t\t\t//loop ove revents and unbind\n\t\t\t\tthis.widgetInstance.unbind(event);\n\t\t\t}, this);\n\t\t}\n\n\t\treturn unbindEventsToKendoWidget;\n\t}(),\n\tcallKendoWidgetMethods: function () {\n\t\tfunction callKendoWidgetMethods(methods) {\n\t\t\tObject.keys(methods).forEach(function (method) {\n\t\t\t\tvar _widgetInstance;\n\n\t\t\t\t//loop over methods and call\n\t\t\t\t(_widgetInstance = this.widgetInstance)[method].apply(_widgetInstance, _toConsumableArray(methods[method]));\n\t\t\t}, this);\n\t\t}\n\n\t\treturn callKendoWidgetMethods;\n\t}(),\n\n\t//not called on inital render, but whenever parent state changes this is called\n\tcomponentWillReceiveProps: function () {\n\t\tfunction componentWillReceiveProps(nextProps) {\n\t\t\t//always update the widget with nextProp changes if avaliable\n\t\t\tif (nextProps.events) {\n\t\t\t\tthis.bindEventsToKendoWidget(nextProps.events);\n\t\t\t}\n\n\t\t\tif (this.widgetInstance.setOptions) {\n\t\t\t\tif (nextProps.options) {\n\t\t\t\t\tthis.widgetInstance.setOptions(nextProps.options);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//try and determine if any of the nextProps have changed, and if so, update the widget\n\t\t\tif (nextProps.methods) {\n\t\t\t\tif ((0, _deepDiff2['default'])(nextProps.methods, this.props.methods)) {\n\t\t\t\t\tthis.callKendoWidgetMethods(nextProps.methods);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (nextProps.unbindEvents) {\n\t\t\t\tif ((0, _deepDiff2['default'])(nextProps.unbindEvents, this.props.unbindEvents)) {\n\t\t\t\t\tthis.unbindEventsToKendoWidget(nextProps.unbindEvents);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (nextProps.triggerEvents) {\n\t\t\t\tif ((0, _deepDiff2['default'])(nextProps.triggerEvents, this.props.triggerEvents)) {\n\t\t\t\t\tthis.triggerKendoWidgetEvents(nextProps.triggerEvents);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn componentWillReceiveProps;\n\t}(),\n\n\t//don't run render again, create widget once, then leave it alone\n\tshouldComponentUpdate: function () {\n\t\tfunction shouldComponentUpdate() {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn shouldComponentUpdate;\n\t}(),\n\n\t//destory it, when the component is unmouted\n\tcomponentWillUnmount: function () {\n\t\tfunction componentWillUnmount() {\n\t\t\tthis.widgetInstance.destroy();\n\t\t}\n\n\t\treturn componentWillUnmount;\n\t}(),\n\n\t//use the passed in React nodes or a plain <div> if no React child nodes are defined\n\trender: function () {\n\t\tfunction render() {\n\t\t\treturn this.props.children ? this.props.children : _react2['default'].createElement('input', { type: 'files' });\n\t\t}\n\n\t\treturn render;\n\t}()\n});\n\n//export the wrapped component\nexports['default'] = KendoUpload;"]}