{"version":3,"sources":["webpack:///../node_modules/gatsby-plugin-disqus/components/CommentEmbed.js","webpack:///../node_modules/gatsby-plugin-disqus/utils.js","webpack:///../node_modules/gatsby-plugin-disqus/components/CommentCount.js","webpack:///../node_modules/gatsby-plugin-disqus/components/Disqus.js","webpack:///../node_modules/gatsby-plugin-disqus/index.js","webpack:///../packages/flow-ui/widgets/src/Post/Post.Comments.jsx"],"names":["_interopRequireDefault","require","exports","__esModule","default","_inheritsLoose2","_react","_propTypes","CommentEmbed","_React$Component","apply","this","arguments","_proto","prototype","getSrc","Number","props","commentId","toString","showParentComment","showMedia","render","createElement","src","width","height","seamless","scrolling","frameBorder","__self","__source","fileName","lineNumber","columnNumber","Component","defaultProps","propTypes","string","isRequired","number","bool","insertScript","id","parent","script","window","document","async","appendChild","removeScript","getElementById","removeChild","debounce","func","wait","runOnFirstCall","timeout","context","args","deferredExecution","callNow","clearTimeout","setTimeout","isReactElement","shallowComparison","currentProps","nextProps","_ref","propNames","Set","Object","keys","concat","_toConsumableArray2","filter","name","length","element","isValidElement","Array","isArray","some","value","_extends2","_objectWithoutPropertiesLoose2","_utils","queueResetCount","DISQUSWIDGETS","getCount","reset","CommentCount","_this","call","shortname","GATSBY_DISQUS_SHORTNAME","componentDidMount","loadInstance","shouldComponentUpdate","componentDidUpdate","componentWillUnmount","cleanInstance","body","undefined","_this$props","config","placeholder","className","identifier","url","shape","title","Disqus","embedUrl","getDisqusConfig","page","remote_auth_s3","remoteAuthS3","api_key","apiKey","language","disqus_config","reloadInstance","DISQUS","reload","error","thread","hasChildNodes","firstChild","querySelector","iframe","parentNode","_Disqus","_CommentCount","_CommentEmbed","_default","PostComments","disqusConfig"],"mappings":"8FAEA,IAAIA,EAAyBC,EAAQ,QAErCC,EAAQC,YAAa,EACrBD,EAAQE,aAAU,EAElB,IAAIC,EAAkBL,EAAuBC,EAAQ,SAEjDK,EAASN,EAAuBC,EAAQ,SAExCM,EAAaP,EAAuBC,EAAQ,SAI5CO,EAA4B,SA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ByE,MAAOxG,EAAWH,QAAQkC,OAQ1BuE,IAAKtG,EAAWH,QAAQkC,OASxBkF,SAAUjH,EAAWH,QAAQkC,OAK7B+E,aAAc9G,EAAWH,QAAQkC,OAKjCiF,OAAQhH,EAAWH,QAAQkC,W,oCC1K/B,IAAItC,EAAyBC,EAAQ,QAErCC,EAAQC,YAAa,EACrBD,EAAQE,aAAU,EAElB,IAAIgI,EAAUpI,EAAuBC,EAAQ,SAE7CC,EAAQ8G,OAASoB,EAAQhI,QAEzB,IAAIiI,EAAgBrI,EAAuBC,EAAQ,SAEnDC,EAAQyF,aAAe0C,EAAcjI,QAErC,IAAIkI,EAAgBtI,EAAuBC,EAAQ,SAEnDC,EAAQM,aAAe8H,EAAclI,QACrC,IAAImI,EAAWH,EAAQhI,QACvBF,EAAQE,QAAUmI,G,kCCnBlB,yDAkBeC,UAdM,SAAC,GAAmB,IAAjBzB,EAAgB,EAAhBA,MAClB0B,EAAe,CACjB7B,WAFoC,EAATjE,GAG3BoE,MAAOA,GAET,OACE,YAAC,IAAD,KACE,YAAC,IAAD,MACA,YAAC,eAAD,CAAcN,OAAQgC,EAAc/B,YAAY,KAChD,YAAC,SAAD,CAAQD,OAAQgC","file":"21-c4c2698ec7d3af28dbda.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _jsxFileName = \"/Users/brettstevenson/Desktop/Folder/gatsby-plugin-workspace/gatsby-plugin-disqus/src/components/CommentEmbed.jsx\";\n\nvar CommentEmbed = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(CommentEmbed, _React$Component);\n\n function CommentEmbed() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = CommentEmbed.prototype;\n\n _proto.getSrc = function getSrc() {\n var RADIX_BASE = 36;\n var post = Number(this.props.commentId).toString(RADIX_BASE);\n var parentParam = this.props.showParentComment ? '1' : '0';\n var mediaParam = this.props.showMedia ? '1' : '0';\n return \"https://embed.disqus.com/p/\" + post + \"?p=\" + parentParam + \"&m=\" + mediaParam;\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/_react.default.createElement(\"iframe\", {\n src: this.getSrc(),\n width: this.props.width,\n height: this.props.height,\n seamless: \"seamless\",\n scrolling: \"no\",\n frameBorder: \"0\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 13\n }\n });\n };\n\n return CommentEmbed;\n}(_react.default.Component);\n\nexports.default = CommentEmbed;\nCommentEmbed.defaultProps = {\n width: 420,\n height: 320,\n showMedia: true,\n showParentComment: true\n};\nCommentEmbed.propTypes = {\n /*\n * This is used to determine the comment that gets embeded.\n * The ID can be found in the Disqus moderation panel or as a `data-post-id`\n * attribute on the HTML element.\n */\n commentId: _propTypes.default.string.isRequired,\n\n /*\n * Determines the width of the embedded comment container.\n */\n width: _propTypes.default.number,\n\n /*\n * Determines the height of the embedded comment container.\n */\n height: _propTypes.default.number,\n\n /*\n * Determines whether the embedded comment should include or omit media from \n * within the original comment.\n */\n showMedia: _propTypes.default.bool,\n\n /*\n * Determines whether the parent comment should be displayed for nested comments.\n */\n showParentComment: _propTypes.default.bool\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.insertScript = insertScript;\nexports.removeScript = removeScript;\nexports.debounce = debounce;\nexports.isReactElement = isReactElement;\nexports.shallowComparison = shallowComparison;\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction insertScript(src, id, parent) {\n var script = window.document.createElement('script');\n script.async = true;\n script.src = src;\n script.id = id;\n parent.appendChild(script);\n return script;\n}\n\nfunction removeScript(id, parent) {\n var script = window.document.getElementById(id);\n\n if (script) {\n parent.removeChild(script);\n }\n}\n\nfunction debounce(func, wait, runOnFirstCall) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n\n var deferredExecution = function deferredExecution() {\n timeout = null;\n\n if (!runOnFirstCall) {\n func.apply(context, args);\n }\n };\n\n var callNow = runOnFirstCall && !timeout;\n window.clearTimeout(timeout);\n timeout = setTimeout(deferredExecution, wait);\n\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n\nfunction isReactElement(element) {\n if (_react.default.isValidElement(element)) {\n return true;\n } else if (Array.isArray(element)) {\n return element.some(function (value) {\n return _react.default.isValidElement(value);\n });\n }\n\n return false;\n}\n\nfunction shallowComparison(currentProps, nextProps) {\n var _ref;\n\n // Perform a comparison of all props, excluding React Elements, to prevent\n // unnecessary updates\n var propNames = new Set(Object.keys(currentProps).concat(Object.keys(nextProps)));\n\n var changes = (_ref = []).concat.apply(_ref, (0, _toConsumableArray2.default)(propNames)).filter(function (name) {\n if (typeof currentProps[name] === 'object') {\n if (shallowComparison(currentProps[name], nextProps[name])) {\n return true;\n }\n } else if (currentProps[name] !== nextProps[name] && !isReactElement(currentProps[name])) {\n return true;\n }\n });\n\n return changes.length !== 0;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _utils = require(\"../utils\");\n\nvar _jsxFileName = \"/Users/brettstevenson/Desktop/Folder/gatsby-plugin-workspace/gatsby-plugin-disqus/src/components/CommentCount.jsx\";\nvar queueResetCount = (0, _utils.debounce)(function () {\n if (window.DISQUSWIDGETS) {\n window.DISQUSWIDGETS.getCount({\n reset: true\n });\n }\n}, 300, false);\n\nvar CommentCount = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(CommentCount, _React$Component);\n\n function CommentCount(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.shortname = typeof GATSBY_DISQUS_SHORTNAME !== \"undefined\" && GATSBY_DISQUS_SHORTNAME !== '' ? GATSBY_DISQUS_SHORTNAME : '';\n return _this;\n }\n\n var _proto = CommentCount.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.loadInstance();\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n if (this.props === nextProps) return false;\n return (0, _utils.shallowComparison)(this.props, nextProps);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.loadInstance();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cleanInstance();\n };\n\n _proto.loadInstance = function loadInstance() {\n if (window.document.getElementById('dsq-count-scr')) {\n queueResetCount();\n } else {\n (0, _utils.insertScript)(\"https://\" + this.shortname + \".disqus.com/count.js\", 'dsq-count-scr', window.document.body);\n }\n };\n\n _proto.cleanInstance = function cleanInstance() {\n (0, _utils.removeScript)('dsq-count-scr', window.document.body);\n window.DISQUSWIDGETS = undefined;\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n config = _this$props.config,\n placeholder = _this$props.placeholder,\n props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"config\", \"placeholder\"]);\n return /*#__PURE__*/_react.default.createElement(\"span\", (0, _extends2.default)({\n className: \"disqus-comment-count\",\n \"data-disqus-identifier\": config.identifier,\n \"data-disqus-url\": config.url\n }, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 7\n }\n }), placeholder);\n };\n\n return CommentCount;\n}(_react.default.Component);\n\nexports.default = CommentCount;\nCommentCount.defaultProps = {\n placeholder: '...'\n};\nCommentCount.propTypes = {\n config: _propTypes.default.shape({\n /*\n * Tells the Disqus service how to identify the current page. \n * When the Disqus embed is loaded, the identifier is used to look up \n * the correct thread. \n */\n identifier: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the title of the current page.\n * This is used when creating the thread on Disqus.\n */\n title: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the URL of the current page.\n * This URL is used when a thread is created so that Disqus knows which\n * page a thread belongs to.\n * (If undefined, Disqus will use the global.location.href)\n */\n url: _propTypes.default.string\n }),\n\n /*\n * This is the text that will be used as a placeholder prior to \n * loading the response.\n */\n placeholder: _propTypes.default.string\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _utils = require(\"../utils\");\n\nvar _jsxFileName = \"/Users/brettstevenson/Desktop/Folder/gatsby-plugin-workspace/gatsby-plugin-disqus/src/components/Disqus.jsx\";\n\nvar Disqus = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(Disqus, _React$Component);\n\n function Disqus(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.shortname = typeof GATSBY_DISQUS_SHORTNAME !== \"undefined\" && GATSBY_DISQUS_SHORTNAME !== '' ? GATSBY_DISQUS_SHORTNAME : '';\n _this.embedUrl = \"https://\" + _this.shortname + \".disqus.com/embed.js\";\n return _this;\n }\n\n var _proto = Disqus.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.loadInstance();\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n if (this.props === nextProps) {\n return false;\n }\n\n return (0, _utils.shallowComparison)(this.props, nextProps);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n this.loadInstance();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cleanInstance();\n };\n\n _proto.getDisqusConfig = function getDisqusConfig(config) {\n return function () {\n this.page.identifier = config.identifier;\n this.page.url = config.url;\n this.page.title = config.title;\n this.page.remote_auth_s3 = config.remoteAuthS3;\n this.page.api_key = config.apiKey;\n this.language = config.language;\n };\n };\n\n _proto.loadInstance = function loadInstance() {\n if (typeof window !== 'undefined' && window.document) {\n window.disqus_config = this.getDisqusConfig(this.props.config);\n\n if (window.document.getElementById('dsq-embed-scr')) {\n this.reloadInstance();\n } else {\n (0, _utils.insertScript)(this.embedUrl, 'dsq-embed-scr', window.document.body);\n }\n }\n };\n\n _proto.reloadInstance = function reloadInstance() {\n if (window && window.DISQUS) {\n window.DISQUS.reset({\n reload: true\n });\n }\n };\n\n _proto.cleanInstance = function cleanInstance() {\n (0, _utils.removeScript)('dsq-embed-scr', window.document.body);\n\n try {\n delete window.DISQUS;\n } catch (error) {\n window.DISQUS = undefined;\n }\n\n var thread = window.document.getElementById('disqus_thread');\n\n if (thread) {\n while (thread.hasChildNodes()) {\n thread.removeChild(thread.firstChild);\n }\n } // Retrieve and remove the sidebar iframe\n\n\n var iframeQuery = window.document.querySelector('[id^=\"dsq-app\"]');\n\n if (iframeQuery) {\n var iframe = window.document.getElementById(window.document.querySelector('[id^=\"dsq-app\"]').id);\n iframe.parentNode.removeChild(iframe);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n config = _this$props.config,\n props = (0, _objectWithoutPropertiesLoose2.default)(_this$props, [\"config\"]);\n return /*#__PURE__*/_react.default.createElement(\"div\", (0, _extends2.default)({\n id: \"disqus_thread\"\n }, props, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 86,\n columnNumber: 7\n }\n }));\n };\n\n return Disqus;\n}(_react.default.Component);\n\nexports.default = Disqus;\nDisqus.propTypes = {\n config: _propTypes.default.shape({\n /*\n * Tells the Disqus service how to identify the current page. \n * When the Disqus embed is loaded, the identifier is used to look up \n * the correct thread. \n */\n identifier: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the title of the current page.\n * This is used when creating the thread on Disqus.\n */\n title: _propTypes.default.string,\n\n /*\n * Tells the Disqus service the URL of the current page.\n * This URL is used when a thread is created so that Disqus knows which\n * page a thread belongs to.\n * (If undefined, Disqus will use the global.location.href)\n */\n url: _propTypes.default.string,\n\n /*\n * Tells the Disqus service to override the default site language for the\n * current page.\n * This allows for dynamically loading the Disqus embed in different \n * languages on a per-page basis.\n * (If undefined, Disqus will use the default site language)\n */\n language: _propTypes.default.string,\n\n /*\n The generated payload used to pass Single Sign-On (SSO) user data\n */\n remoteAuthS3: _propTypes.default.string,\n\n /*\n * This is the public API key for your Single Sign-On (SSO) integration\n */\n apiKey: _propTypes.default.string\n })\n};","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _Disqus = _interopRequireDefault(require(\"./components/Disqus\"));\n\nexports.Disqus = _Disqus.default;\n\nvar _CommentCount = _interopRequireDefault(require(\"./components/CommentCount\"));\n\nexports.CommentCount = _CommentCount.default;\n\nvar _CommentEmbed = _interopRequireDefault(require(\"./components/CommentEmbed\"));\n\nexports.CommentEmbed = _CommentEmbed.default;\nvar _default = _Disqus.default;\nexports.default = _default;","import React from 'react'\r\nimport { Box, Divider } from 'theme-ui'\r\nimport { Disqus, CommentCount } from 'gatsby-plugin-disqus'\r\n\r\nconst PostComments = ({ title, id }) => {\r\n let disqusConfig = {\r\n identifier: id,\r\n title: title\r\n }\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default PostComments\r\n"],"sourceRoot":""}