{"version":3,"sources":["webpack:///./src/templates/article/article.js","webpack:///./node_modules/@material-ui/icons/ArrowBack.js","webpack:///./node_modules/react-disqus-comments/build/main.js","webpack:///./node_modules/react-disqus-comments/build/components/DisqusThread.js","webpack:///./src/templates/article/article.module.scss"],"names":["Article","description","re","data","disqusConfig","url","strapiWpis","link","identifier","id","title","Tytul","Tekst","length","split","join","substr","keywords","tagi","className","classes","article","fadeIn","loading","fluid","Obraz","childImageSharp","image","transformImageUri","uri","startsWith","process","text","to","icon","disqus","shortname","_interopRequireDefault","_interopRequireWildcard","Object","defineProperty","exports","value","default","React","_default","createElement","d","module","_extends","assign","target","i","arguments","source","key","prototype","hasOwnProperty","call","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","_react2","_propTypes2","obj","__esModule","_classCallCheck","instance","TypeError","_possibleConstructorReturn","self","ReferenceError","DISQUS_CONFIG","__disqusAdded","copyProps","context","onNewComment","language","rest","keys","indexOf","_objectWithoutProperties","prop","page","callbacks","DisqusThread","_React$Component","this","__proto__","getPrototypeOf","apply","subClass","superClass","create","constructor","setPrototypeOf","_inherits","loadDisqus","nextProps","nextState","_this2","reduce","memo","some","config","_defineProperty","child","document","parent","getElementsByTagName","async","type","src","appendChild","_this3","forEach","DISQUS","reset","reload","replace","window","disqus_config","addDisqusScript","Component","displayName","propTypes","string","isRequired","category_id","func","defaultProps","location","href"],"mappings":"8FAAA,oKAkEeA,UAxDC,SAAC,GAAc,IASNC,EAEjBC,EAXWC,EAAW,EAAXA,KACbC,EAAe,CACjBC,IACE,mCACAF,EAAKG,WAAWC,KAElBC,WAAYL,EAAKG,WAAWG,GAC5BC,MAAOP,EAAKG,WAAWK,OASzB,OACE,wBAAC,IAAD,KACE,wBAAC,IAAD,CAAKD,MAAOP,EAAKG,WAAWK,MAAOV,aAThBA,EAS4CE,EAAKG,WAAWM,MAP7EV,EAAI,UACDD,EAAYY,OAFC,IAGhBZ,EAAYa,MAAMZ,GAAIa,KAAK,K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,EAAY3B,QAAQ0F,QAEhCzC,EAAa6C,aAAe,CAC1BpI,IAAuB,oBAAX0H,OAAyB,KAAOA,OAAOW,SAASC,MAE9DlG,EAAQE,QAAUiD,G,qBC7RlB5C,EAAOP,QAAU,CAAC,QAAU,iCAAiC,MAAQ,+BAA+B,YAAc,qCAAqC,MAAQ,+BAA+B,KAAO,8BAA8B,OAAS,gCAAgC,KAAO,8BAA8B,KAAO","file":"component---src-templates-article-article-js-0735ac9d5024786f7c61.js","sourcesContent":["import React from \"react\"\nimport { graphql, Link } from \"gatsby\"\nimport Img from \"gatsby-image\"\nimport ReactMarkdown from \"react-markdown\"\nimport ReactDisqusComments from \"react-disqus-comments\"\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\n\nimport Layout from \"../../components/layout\"\nimport classes from \"./article.module.scss\"\nimport SEO from \"../../components/seo\"\nconst Article = ({ data }) => {\n let disqusConfig = {\n url: `${\n \"https://www.harp0n.pl/blog/post/\" +\n data.strapiWpis.link\n }`,\n identifier: data.strapiWpis.id,\n title: data.strapiWpis.Tytul,\n }\n const cutDescription = description => {\n const words_limit = 200; \n let re =/[*#\\n]+/\n return description.length < words_limit\n ? description.split(re).join(' ')\n : description.split(re).join(' ').substr(0,words_limit) + \"...\"\n }\n return (\n \n \n
\n

{data.strapiWpis.Tytul}

\n
\n \n \n uri.startsWith(\"http\")\n ? uri\n : `${process.env.IMAGE_BASE_URL}${uri}`\n }\n className={classes.text}\n >\n {data.strapiWpis.Tekst}\n \n
\n \n powrót do listy\n \n\n
\n \n
\n
\n
\n )\n}\n\nArticle.propTypes = {}\n\nexport default Article\n\nexport const query = graphql`\n query ArticleTemplate($id: String!) {\n strapiWpis(id: { eq: $id }) {\n id\n link\n Tekst\n Tytul\n tagi\n Obraz {\n childImageSharp {\n fluid(maxWidth: 1000) {\n ...GatsbyImageSharpFluid\n }\n }\n }\n }\n }\n`\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n}), 'ArrowBack');\n\nexports.default = _default;","'use strict';\n\nmodule.exports = require('./components/DisqusThread');","'use strict';\n\nrequire(\"core-js/modules/es.array.reduce.js\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nvar DISQUS_CONFIG = ['shortname', 'identifier', 'title', 'url', 'category_id', 'onNewComment', 'language'];\nvar __disqusAdded = false;\n\nfunction copyProps(context, props) {\n var onNewComment = props.onNewComment,\n language = props.language,\n rest = _objectWithoutProperties(props, ['onNewComment', 'language']);\n\n for (var prop in rest) {\n context.page[prop] = rest[prop];\n } // Setting the language - if none is provided, the default one is used\n\n\n context.language = language;\n\n if (onNewComment) {\n context.callbacks = {\n onNewComment: [onNewComment]\n };\n }\n}\n\nvar DisqusThread = function (_React$Component) {\n _inherits(DisqusThread, _React$Component);\n\n function DisqusThread() {\n _classCallCheck(this, DisqusThread);\n\n return _possibleConstructorReturn(this, (DisqusThread.__proto__ || Object.getPrototypeOf(DisqusThread)).apply(this, arguments));\n }\n\n _createClass(DisqusThread, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.loadDisqus();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.loadDisqus();\n }\n }, {\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps, nextState) {\n return nextProps.identifier !== this.props.identifier;\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var props = Object.keys(this.props).reduce(function (memo, key) {\n return DISQUS_CONFIG.some(function (config) {\n return config === key;\n }) ? memo : _extends({}, memo, _defineProperty({}, key, _this2.props[key]));\n }, {});\n return _react2.default.createElement('div', props, _react2.default.createElement('div', {\n id: 'disqus_thread'\n }));\n }\n }, {\n key: 'addDisqusScript',\n value: function addDisqusScript() {\n if (__disqusAdded) {\n return;\n }\n\n var child = this.disqus = document.createElement('script');\n var parent = document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0];\n child.async = true;\n child.type = 'text/javascript';\n child.src = '//' + this.props.shortname + '.disqus.com/embed.js';\n parent.appendChild(child);\n __disqusAdded = true;\n }\n }, {\n key: 'loadDisqus',\n value: function loadDisqus() {\n var _this3 = this;\n\n var props = {}; // Extract Disqus props that were supplied to this component\n\n DISQUS_CONFIG.forEach(function (prop) {\n // prop \"shortname\" is only necessary for loading the script, not for the config itself\n if (prop !== 'shortname' && !!_this3.props[prop]) {\n props[prop] = _this3.props[prop];\n }\n }); // If Disqus has already been added, reset it\n\n if (typeof DISQUS !== 'undefined') {\n DISQUS.reset({\n reload: true,\n config: function config() {\n copyProps(this, props); // Disqus needs hashbang URL, see https://help.disqus.com/customer/portal/articles/472107\n\n this.page.url = this.page.url.replace(/#/, '') + '#!newthread';\n }\n });\n } else {\n // Otherwise add Disqus to the page\n window.disqus_config = function () {\n copyProps(this, props);\n };\n\n this.addDisqusScript();\n }\n }\n }]);\n\n return DisqusThread;\n}(_react2.default.Component);\n\nDisqusThread.displayName = 'DisqusThread';\nDisqusThread.propTypes = {\n id: _propTypes2.default.string,\n\n /**\n * `shortname` tells the Disqus service your forum's shortname,\n * which is the unique identifier for your website as registered\n * on Disqus. If undefined , the Disqus embed will not load.\n */\n shortname: _propTypes2.default.string.isRequired,\n\n /**\n * `identifier` tells the Disqus service how to identify the\n * current page. When the Disqus embed is loaded, the identifier\n * is used to look up the correct thread. If disqus_identifier\n * is undefined, the page's URL will be used. The URL can be\n * unreliable, such as when renaming an article slug or changing\n * domains, so we recommend using your own unique way of\n * identifying a thread.\n */\n identifier: _propTypes2.default.string,\n\n /**\n * `title` tells the Disqus service the title of the current page.\n * This is used when creating the thread on Disqus for the first time.\n * If undefined, Disqus will use the attribute of the page.\n * If that attribute could not be used, Disqus will use the URL of the page.\n */\n title: _propTypes2.default.string,\n\n /**\n * `url` tells the Disqus service the URL of the current page.\n * If undefined, Disqus will take the window.location.href.\n * This URL is used to look up or create a thread if disqus_identifier\n * is undefined. In addition, this URL is always saved when a thread is\n * being created so that Disqus knows what page a thread belongs to.\n */\n url: _propTypes2.default.string,\n\n /**\n * `category_id` tells the Disqus service the category to be used for\n * the current page. This is used when creating the thread on Disqus\n * for the first time.\n */\n category_id: _propTypes2.default.string,\n\n /**\n * `onNewComment` function accepts one parameter `comment` which is a\n * JavaScript object with comment `id` and `text`. This allows you to track\n * user comments and replies and run a script after a comment is posted.\n */\n onNewComment: _propTypes2.default.func,\n\n /**\n * `language` tells the Disqus service which language should be used.\n * Please refer to https://www.transifex.com/disqus/disqus/ on which languages can be used\n * If undefined, English is used as default one\n */\n language: _propTypes2.default.string\n};\nDisqusThread.defaultProps = {\n url: typeof window === 'undefined' ? null : window.location.href\n};\nexports.default = DisqusThread;","// extracted by mini-css-extract-plugin\nmodule.exports = {\"article\":\"article-module--article--2L3Q6\",\"title\":\"article-module--title--dUrj2\",\"description\":\"article-module--description--385Pr\",\"image\":\"article-module--image--1BVLe\",\"text\":\"article-module--text--2jwQ2\",\"disqus\":\"article-module--disqus--3rkOU\",\"link\":\"article-module--link--3saN6\",\"icon\":\"article-module--icon--3Qski\"};"],"sourceRoot":""}