@quintype/arrow 3.19.7 → 3.19.8-imp-pd.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/AlsoRead/index.js +1 -0
  2. package/Attachment/index.js +1 -0
  3. package/Author/index.js +1 -0
  4. package/AuthorWithTime/index.js +1 -0
  5. package/BigFact/index.js +1 -0
  6. package/BlockQuote/index.js +1 -0
  7. package/Blurb/index.js +1 -0
  8. package/CollectionName/index.js +1 -0
  9. package/Headline/index.js +1 -0
  10. package/HeroImage/index.js +1 -0
  11. package/Image/index.js +1 -0
  12. package/ImageGallery/index.js +1 -0
  13. package/ImageSlideshow/index.js +1 -0
  14. package/LoadmoreButton/index.js +1 -0
  15. package/QuestionAnswer/index.js +1 -0
  16. package/Quote/index.js +1 -0
  17. package/Reference/index.js +1 -0
  18. package/ScrollSnap/index.js +1 -0
  19. package/SectionTag/index.js +1 -0
  20. package/StoryElement/index.js +1 -0
  21. package/Subheadline/index.js +1 -0
  22. package/Summary/index.js +1 -0
  23. package/Text/index.js +1 -0
  24. package/TimeStamp/index.js +1 -0
  25. package/Video/index.js +1 -0
  26. package/package.json +1 -1
  27. package/AlternateCollectionFilter/styles.arrow.css +0 -1
  28. package/AsideCollection/styles.arrow.css +0 -1
  29. package/AstrologyCollection/styles.arrow.css +0 -1
  30. package/AuthorIntroductionCard/styles.arrow.css +0 -1
  31. package/AuthorsList/styles.arrow.css +0 -1
  32. package/CollectionFilter/styles.arrow.css +0 -1
  33. package/ElevenStories/styles.arrow.css +0 -1
  34. package/FourColFiveStories/styles.arrow.css +0 -1
  35. package/FourColGrid/styles.arrow.css +0 -1
  36. package/FourColPortraitStories/styles.arrow.css +0 -1
  37. package/FourColSixteenStories/styles.arrow.css +0 -1
  38. package/FourColTwelveStories/styles.arrow.css +0 -1
  39. package/FourStorySlider/styles.arrow.css +0 -1
  40. package/FourStorySliderPortrait/styles.arrow.css +0 -1
  41. package/FourTabbedBigStorySlider/styles.arrow.css +0 -1
  42. package/FullScreenSlider/styles.arrow.css +0 -1
  43. package/HalfScreenSlider/styles.arrow.css +0 -1
  44. package/KeyEvents/styles.arrow.css +0 -1
  45. package/ListComponent/styles.arrow.css +0 -1
  46. package/ListicleStoryTemplate/styles.arrow.css +0 -1
  47. package/Listicles/styles.arrow.css +0 -1
  48. package/LiveBlogStoryTemplate/styles.arrow.css +0 -1
  49. package/MagazineEditions/styles.arrow.css +0 -1
  50. package/MagazineHeaderCard/styles.arrow.css +0 -1
  51. package/MagazineWidget/styles.arrow.css +0 -1
  52. package/OneColStoryList/styles.arrow.css +0 -1
  53. package/OpinionCollection/styles.arrow.css +0 -1
  54. package/PageIntroductionCard/styles.arrow.css +0 -1
  55. package/PhotoStoryTemplate/styles.arrow.css +0 -1
  56. package/README.md +0 -202
  57. package/SixColSixStories/styles.arrow.css +0 -1
  58. package/SocialShareTemplate/styles.arrow.css +0 -1
  59. package/StoryCard/styles.arrow.css +0 -1
  60. package/StoryCollection/styles.arrow.css +0 -1
  61. package/StoryElementCard/styles.arrow.css +0 -1
  62. package/StorycardContent/styles.arrow.css +0 -1
  63. package/TagIntroductionCard/styles.arrow.css +0 -1
  64. package/TextStoryTemplate/styles.arrow.css +0 -1
  65. package/ThreeColFlexStories/styles.arrow.css +0 -1
  66. package/ThreeColFourteenStories/styles.arrow.css +0 -1
  67. package/ThreeColGrid/styles.arrow.css +0 -1
  68. package/ThreeColSevenStory/styles.arrow.css +0 -1
  69. package/ThreeColSixStories/styles.arrow.css +0 -1
  70. package/ThreeColTwelveStories/styles.arrow.css +0 -1
  71. package/TwoColFourStories/styles.arrow.css +0 -1
  72. package/TwoColFourStoryHighlight/styles.arrow.css +0 -1
  73. package/TwoColSevenStories/styles.arrow.css +0 -1
  74. package/TwoColSixStories/styles.arrow.css +0 -1
  75. package/TwoColTenStoriesSidebar/styles.arrow.css +0 -1
  76. package/TwoColThreeStories/styles.arrow.css +0 -1
  77. package/VideoStoryTemplate/styles.arrow.css +0 -1
  78. package/app.scss +0 -274
  79. package/cjs/index.js +0 -1
  80. package/esm/index.js +0 -1
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import n from"lodash.get";import{Link as o,LazyLoadImages as a,ResponsiveImage as i}from"@quintype/components";import l from"prop-types";import"react-timeago";import"date-fns-tz";function s(){return s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s.apply(this,arguments)}function c(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function h(t){var e={exports:{}};return t(e,e.exports),e.exports}var p=h((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),d=f(h((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=p)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},l=i.handleMissingStyleName,s=void 0===l?n.default.handleMissingStyleName:l,c=i.autoResolveMultipleImports,u=void 0===c?n.default.autoResolveMultipleImports:c;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],l=a[1],s=r||n.default.handleMissingStyleName;return l?e[i]?e[i][l]?e[i][l]:o("CSS module does not exist: "+l,s):o("CSS module import does not exist: "+i,s):o("Invalid style name: "+t,s)}(t,e,s);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!u)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,s)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",s)})).filter((function(t){return t})).join(" "):""}}))),v=["element","render"],m=function(e){return function(r){var n=r.element,o=r.render,a=c(r,v);return n?o&&"function"==typeof o?o(r):t.createElement(e,s({},a,{element:n})):null}};m.propTypes={StoryElement:l.element};var y=function(e){var r=e.width,n=void 0===r?40:r,o=e.height,a=void 0===o?30:o,i=e.iconColor,l=void 0===i?"#99B0CB":i;return t.createElement("svg",{width:n,height:a,viewBox:"0 0 102 76",version:"1.1"},t.createElement("g",{id:"demo-home-copy",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",transform:"translate(-377.000000, -314.000000)"},t.createElement("g",{id:"Group-13",transform:"translate(377.000000, 314.000000)"},t.createElement("path",{d:"M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",id:"Combined-Shape",fill:l,fillRule:"nonzero"}),t.createElement("rect",{id:"Rectangle-19",stroke:l,strokeWidth:"3",x:"1.5",y:"1.5",width:"99",height:"73",rx:"3"}))))};y.propTypes={width:l.object,height:l.object,iconColor:l.object};var g=function(){return t.createElement("div",{className:"arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"},t.createElement("figure",{className:"arr--fallback-svg fallback-m_fallback-svg__tK9fL"},t.createElement(y,null)))},_=function(e){var r=e.slug;return r?t.createElement(o,{href:r,"aria-label":"image-fallback"},g()):g()};function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}_.propTypes={slug:l.string},h((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return A()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=O(i,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=u(t,e,r);if("normal"===s.type){if(n=r.done?d:h,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function m(){}function y(){}function g(){}var _={};s(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==r&&n.call(w,a)&&(_=w);var j=g.prototype=m.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,a,i,l){var s=u(t[o],t,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,l)}),(function(t){r("throw",t,i,l)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,l)}))}l(s.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=u(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:A}}function A(){return{value:e,done:!0}}return y.prototype=g,s(j,"constructor",g),s(g,"constructor",y),y.displayName=s(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},E(x.prototype),s(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(c(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(j),s(j,l,"Generator"),s(j,a,(function(){return this})),s(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return l.type="throw",l.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var w=Array.isArray,j="object"==typeof u&&u&&u.Object===Object&&u,E="object"==typeof self&&self&&self.Object===Object&&self,x=j||E||Function("return this")(),O=x.Symbol,S=Object.prototype,k=S.hasOwnProperty,L=S.toString,N=O?O.toStringTag:void 0;var A=function(t){var e=k.call(t,N),r=t[N];try{t[N]=void 0;var n=!0}catch(t){}var o=L.call(t);return n&&(e?t[N]=r:delete t[N]),o},C=Object.prototype.toString;var I=function(t){return C.call(t)},P=O?O.toStringTag:void 0;var R=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":P&&P in Object(t)?A(t):I(t)};var T=function(t){return null!=t&&"object"==typeof t};var z=function(t){return"symbol"==typeof t||T(t)&&"[object Symbol]"==R(t)},F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M=/^\w*$/;var G=function(t,e){if(w(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!z(t))||(M.test(t)||!F.test(t)||null!=e&&t in Object(e))};var $=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Y,W=function(t){if(!$(t))return!1;var e=R(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Z=x["__core-js_shared__"],B=(Y=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var V=function(t){return!!B&&B in t},K=Function.prototype.toString;var U=function(t){if(null!=t){try{return K.call(t)}catch(t){}try{return t+""}catch(t){}}return""},X=/^\[object .+?Constructor\]$/,q=Function.prototype,D=Object.prototype,H=q.toString,J=D.hasOwnProperty,Q=RegExp("^"+H.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var tt=function(t){return!(!$(t)||V(t))&&(W(t)?Q:X).test(U(t))};var et=function(t,e){return null==t?void 0:t[e]};var rt=function(t,e){var r=et(t,e);return tt(r)?r:void 0},nt=rt(Object,"create");var ot=function(){this.__data__=nt?nt(null):{},this.size=0};var at=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},it=Object.prototype.hasOwnProperty;var lt=function(t){var e=this.__data__;if(nt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return it.call(e,t)?e[t]:void 0},st=Object.prototype.hasOwnProperty;var ct=function(t){var e=this.__data__;return nt?void 0!==e[t]:st.call(e,t)};var ut=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nt&&void 0===e?"__lodash_hash_undefined__":e,this};function ft(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=ot,ft.prototype.delete=at,ft.prototype.get=lt,ft.prototype.has=ct,ft.prototype.set=ut;var ht=ft;var pt=function(){this.__data__=[],this.size=0};var dt=function(t,e){return t===e||t!=t&&e!=e};var vt=function(t,e){for(var r=t.length;r--;)if(dt(t[r][0],e))return r;return-1},mt=Array.prototype.splice;var yt=function(t){var e=this.__data__,r=vt(e,t);return!(r<0)&&(r==e.length-1?e.pop():mt.call(e,r,1),--this.size,!0)};var gt=function(t){var e=this.__data__,r=vt(e,t);return r<0?void 0:e[r][1]};var _t=function(t){return vt(this.__data__,t)>-1};var bt=function(t,e){var r=this.__data__,n=vt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function wt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}wt.prototype.clear=pt,wt.prototype.delete=yt,wt.prototype.get=gt,wt.prototype.has=_t,wt.prototype.set=bt;var jt=wt,Et=rt(x,"Map");var xt=function(){this.size=0,this.__data__={hash:new ht,map:new(Et||jt),string:new ht}};var Ot=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var St=function(t,e){var r=t.__data__;return Ot(e)?r["string"==typeof e?"string":"hash"]:r.map};var kt=function(t){var e=St(this,t).delete(t);return this.size-=e?1:0,e};var Lt=function(t){return St(this,t).get(t)};var Nt=function(t){return St(this,t).has(t)};var At=function(t,e){var r=St(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Ct(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ct.prototype.clear=xt,Ct.prototype.delete=kt,Ct.prototype.get=Lt,Ct.prototype.has=Nt,Ct.prototype.set=At;var It=Ct;function Pt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Pt.Cache||It),r}Pt.Cache=It;var Rt=Pt;var Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/\\(\\)?/g,Ft=function(t){var e=Rt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Tt,(function(t,r,n,o){e.push(n?o.replace(zt,"$1"):r||t)})),e}));var Mt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Gt=O?O.prototype:void 0,$t=Gt?Gt.toString:void 0;var Yt=function t(e){if("string"==typeof e)return e;if(w(e))return Mt(e,t)+"";if(z(e))return $t?$t.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Wt=function(t){return null==t?"":Yt(t)};var Zt=function(t,e){return w(t)?t:G(t,e)?[t]:Ft(Wt(t))};var Bt=function(t){if("string"==typeof t||z(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Vt=function(t,e){for(var r=0,n=(e=Zt(e,t)).length;null!=t&&r<n;)t=t[Bt(e[r++])];return r&&r==n?t:void 0};var Kt=function(t,e,r){var n=null==t?void 0:Vt(t,e);return void 0===n?r:n},Ut=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Xt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},qt={mobile:767,tablet:1024},Dt=l.shape({"sketches-host":l.string,"cdn-name":l.string,"cdn-image":l.string});l.shape({headline:l.string,"last-published-at":l.number,subheadline:l.string});var Ht=r(),Jt=["story","element","template","opts","css","config","render"],Qt={"./also-read.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px","card-image":"also-read-m_card-image__3CwAv","default-text":"also-read-m_default-text__hp2dp","alsoread-textLeftAlign":"also-read-m_alsoread-textLeftAlign__S0Dxe","alsoread-imageRightAlign":"also-read-m_alsoread-imageRightAlign__1bsF3",headline:"also-read-m_headline__VzF-c","alsoread-default":"also-read-m_alsoread-default__3cYER","card-image-wrapper":"also-read-m_card-image-wrapper__3GFzu",image:"also-read-m_image__2jdRP","content-wrapper":"also-read-m_content-wrapper__26AZX",alsoread:"also-read-m_alsoread__1crOV",dark:"also-read-m_dark__1pUib",light:"also-read-m_light__bTCze"}},te=function(e){var r,n,o=e.story,l=e.linkedImage,s=e.template,c=e.isRightAlign,u="textLeftAlign"===s,f=!!(r=Kt(qt,"mobile"))&&Kt(global,"document.documentElement.clientWidth")<=r,h=u?[16,9]:c&&f?[4,3]:[16,9],p=o["hero-image-caption"]||o.headline;return t.createElement("div",{className:"also-read-m_card-image-wrapper__3GFzu"},null==(n=l)||"object"===b(n)&&0===Object.entries(n).length&&n.constructor===Object||"string"==typeof n&&0===n.trim().length?t.createElement("div",{className:"arr--fallback-also-read also-read-m_image__2jdRP"},t.createElement(_,null)):t.createElement("figure",{className:"also-read-m_card-image__3CwAv"},t.createElement(a,null,t.createElement(i,{slug:l,"aspect-ratio":h,defaultWidth:480,widths:[250,480,640],imgParams:{auto:["format","compress"]},alt:p}))))};te.propTypes={story:l.shape({"hero-image-caption":l.string,headline:l.string}),linkedImage:l.string,template:l.string,isRightAlign:l.bool};var ee=function(r){var a=r.story,i=void 0===a?{}:a,l=r.element,u=r.template,f=void 0===u?"":u,h=r.opts,p=void 0===h?{}:h,v=r.css,m=void 0===v?{}:v;r.config,r.render;var y=c(r,Jt),g=l.text;if(!g)return null;var _=n(i,["linked-stories"],{}),b=n(l,["metadata","linked-story-id"]),w=n(_,[b,"url"]),j=n(_,[b,"hero-image-s3-key"],""),E=w&&w,x=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Xt(t);return Ut(e)<155?"light":"dark"}((e(Ht)||{}).theme),O=p.title,S=void 0===O?"":O,k=m.textColor,L=S||"Also Read",N=""===f||"default"===f,A="imageRightAlign"===f,C=f?"alsoread-".concat(f):"alsoread-default";return t.createElement(o,s({"data-test-id":"also-read",href:E,"aria-label":"also-read"},y,{className:"arrow-component arr--also-read-element "+d(C,Qt)+" "+(y&&y.className||"")}),!N&&t.createElement("div",{className:d("default-text ".concat(x),Qt)},L),N&&t.createElement(te,{story:i,linkedImage:j,template:f,isRightAlign:A}),t.createElement("div",{className:"also-read-m_content-wrapper__26AZX"},t.createElement("div",{className:"also-read-m_headline__VzF-c",style:k?{color:k}:{color:x},dangerouslySetInnerHTML:{__html:g}}),A&&t.createElement(te,{story:i,linkedImage:j,template:f})))};ee.propTypes={template:l.string,story:l.shape({"linked-stories":l.object}),element:l.shape({text:l.string,metadata:l.shape({linkedStoryId:l.shape({url:l.string,"hero-image-s3-key":l.string})})}),opts:l.shape({title:l.string}),config:Dt,render:l.func,css:l.object};var re=m(ee);export{re as AlsoRead};
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import{Link as o}from"@quintype/components";import"react-timeago";import"date-fns-tz";function a(){return a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a.apply(this,arguments)}function i(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t){var e={exports:{}};return t(e,e.exports),e.exports}var l=s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),h=u(s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=l)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},c=i.handleMissingStyleName,u=void 0===c?n.default.handleMissingStyleName:c,s=i.autoResolveMultipleImports,l=void 0===s?n.default.autoResolveMultipleImports:s;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],c=a[1],u=r||n.default.handleMissingStyleName;return c?e[i]?e[i][c]?e[i][c]:o("CSS module does not exist: "+c,u):o("CSS module import does not exist: "+i,u):o("Invalid style name: "+t,u)}(t,e,u);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!l)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,u)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",u)})).filter((function(t){return t})).join(" "):""}}))),f=["element","render"],p=function(e){return function(r){var n=r.element,o=r.render,c=i(r,f);return n?o&&"function"==typeof o?o(r):t.createElement(e,a({},c,{element:n})):null}};p.propTypes={StoryElement:n.element};var v=r();s((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=h;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw a;return k()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?v:f,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",d={};function m(){}function y(){}function _(){}var g={};u(g,a,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==r&&n.call(b,a)&&(g=b);var j=_.prototype=m.prototype=Object.create(g);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,h=s.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(h).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:k}}function k(){return{value:e,done:!0}}return y.prototype=_,u(j,"constructor",_),u(_,"constructor",y),y.displayName=u(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(x.prototype),u(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(j),u(j,c,"Generator"),u(j,a,(function(){return this})),u(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var d="object"==typeof c&&c&&c.Object===Object&&c,m="object"==typeof self&&self&&self.Object===Object&&self,y=d||m||Function("return this")(),_=y.Symbol,g=Object.prototype,w=g.hasOwnProperty,b=g.toString,j=_?_.toStringTag:void 0;var O=function(t){var e=w.call(t,j),r=t[j];try{t[j]=void 0;var n=!0}catch(t){}var o=b.call(t);return n&&(e?t[j]=r:delete t[j]),o},x=Object.prototype.toString;var E=function(t){return x.call(t)},N=_?_.toStringTag:void 0;var S=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":N&&N in Object(t)?O(t):E(t)};var L=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var P,k=function(t){if(!L(t))return!1;var e=S(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},F=y["__core-js_shared__"],T=(P=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"";var I=function(t){return!!T&&T in t},M=Function.prototype.toString;var z=function(t){if(null!=t){try{return M.call(t)}catch(t){}try{return t+""}catch(t){}}return""},C=/^\[object .+?Constructor\]$/,R=Function.prototype,A=Object.prototype,G=R.toString,$=A.hasOwnProperty,D=RegExp("^"+G.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var U=function(t){return!(!L(t)||I(t))&&(k(t)?D:C).test(z(t))};var Y=function(t,e){return null==t?void 0:t[e]};var q=function(t,e){var r=Y(t,e);return U(r)?r:void 0},H=q(Object,"create");var B=function(){this.__data__=H?H(null):{},this.size=0};var K=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},V=Object.prototype.hasOwnProperty;var J=function(t){var e=this.__data__;if(H){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return V.call(e,t)?e[t]:void 0},Q=Object.prototype.hasOwnProperty;var W=function(t){var e=this.__data__;return H?void 0!==e[t]:Q.call(e,t)};var X=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=H&&void 0===e?"__lodash_hash_undefined__":e,this};function Z(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Z.prototype.clear=B,Z.prototype.delete=K,Z.prototype.get=J,Z.prototype.has=W,Z.prototype.set=X;var tt=Z;var et=function(){this.__data__=[],this.size=0};var rt=function(t,e){return t===e||t!=t&&e!=e};var nt=function(t,e){for(var r=t.length;r--;)if(rt(t[r][0],e))return r;return-1},ot=Array.prototype.splice;var at=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ot.call(e,r,1),--this.size,!0)};var it=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]};var ct=function(t){return nt(this.__data__,t)>-1};var ut=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function st(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}st.prototype.clear=et,st.prototype.delete=at,st.prototype.get=it,st.prototype.has=ct,st.prototype.set=ut;var lt=st,ht=q(y,"Map");var ft=function(){this.size=0,this.__data__={hash:new tt,map:new(ht||lt),string:new tt}};var pt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var vt=function(t,e){var r=t.__data__;return pt(e)?r["string"==typeof e?"string":"hash"]:r.map};var dt=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e};var mt=function(t){return vt(this,t).get(t)};var yt=function(t){return vt(this,t).has(t)};var _t=function(t,e){var r=vt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function gt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gt.prototype.clear=ft,gt.prototype.delete=dt,gt.prototype.get=mt,gt.prototype.has=yt,gt.prototype.set=_t;var wt=gt;function bt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(bt.Cache||wt),r}bt.Cache=wt;var jt=bt;var Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xt=/\\(\\)?/g;(function(t){var e=jt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache})((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,(function(t,r,n,o){e.push(n?o.replace(xt,"$1"):r||t)})),e}));var Et=_?_.prototype:void 0;Et&&Et.toString;var Nt=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},St=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t};n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string});var Lt=["element","render"],Pt={"./attachment.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",tablet:"992px",headline:"attachment-m_headline__kP7Hs","button-wrapper":"attachment-m_button-wrapper__2fajK","file-name":"attachment-m_file-name__1LU9q",dark:"attachment-m_dark__3ixF7",light:"attachment-m_light__1kcpj",pdf:"attachment-m_pdf__3i_bR",doc:"attachment-m_doc__6vUVo attachment-m_pdf__3i_bR",wrapper:"attachment-m_wrapper__3gMwN","content-wrapper":"attachment-m_content-wrapper__3Yu0B"}},kt=function(r){var n=r.element,c=void 0===n?{}:n;r.render;var u=i(r,Lt),s=c["file-name"],l=c.url,f=c["content-type"];if(!f||!l)return null;var p="application/pdf"===f,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:St(t);return Nt(e)<155?"light":"dark"}((e(v)||{}).theme),m=s||(p?"Attached PDF":"Attached DOC");return t.createElement("div",a({"data-test-id":"attachment"},u,{className:"arrow-component arr--attachment-element "+h(d,Pt)+" "+(u&&u.className||"")}),t.createElement("div",{className:"attachment-m_headline__kP7Hs"},"Attachment"),t.createElement("div",{className:"attachment-m_wrapper__3gMwN"},p?t.createElement("div",{"data-test-id":"pdf",className:"attachment-m_pdf__3i_bR"},"PDF"):t.createElement("div",{"data-test-id":"doc",className:"attachment-m_doc__6vUVo attachment-m_pdf__3i_bR"},"DOC"),t.createElement("div",{className:"attachment-m_content-wrapper__3Yu0B"},t.createElement("div",{className:"attachment-m_file-name__1LU9q",dangerouslySetInnerHTML:{__html:m}}),t.createElement(o,{className:"attachment-m_button-wrapper__2fajK",href:l,target:"_blank",rel:"noopener noreferrer",download:!0,"aria-label":"button"},p?"Preview":"Download"))))};kt.propTypes={element:n.shape({url:n.string,fileName:n.string,contentType:n.string}),render:n.func};var Ft=p(kt);export{Ft as Attachment};
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import o from"lodash.get";import{Link as a,ResponsiveImage as i}from"@quintype/components";import"react-timeago";import"date-fns-tz";import{connect as u}from"react-redux";var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function l(t){var e={exports:{}};return t(e,e.exports),e.exports}var h=l((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),f=s(l((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=h)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},u=i.handleMissingStyleName,c=void 0===u?n.default.handleMissingStyleName:u,s=i.autoResolveMultipleImports,l=void 0===s?n.default.autoResolveMultipleImports:s;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],u=a[1],c=r||n.default.handleMissingStyleName;return u?e[i]?e[i][u]?e[i][u]:o("CSS module does not exist: "+u,c):o("CSS module import does not exist: "+i,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!l)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,c)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}}))),p=r();l((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),i=new N(n||[]);return a._invoke=function(t,e,r){var n=h;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw a;return I()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=O(i,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?v:f,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=v,r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",d={};function m(){}function y(){}function g(){}var _={};c(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==r&&n.call(w,a)&&(_=w);var x=g.prototype=m.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,a,i,u){var c=l(t[o],t,a);if("throw"!==c.type){var s=c.arg,h=s.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(h).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:I}}function I(){return{value:e,done:!0}}return y.prototype=g,c(x,"constructor",g),c(g,"constructor",y),y.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},j(E.prototype),c(E.prototype,i,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new E(s(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(x),c(x,u,"Generator"),c(x,a,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var v="object"==typeof c&&c&&c.Object===Object&&c,d="object"==typeof self&&self&&self.Object===Object&&self,m=v||d||Function("return this")(),y=m.Symbol,g=Object.prototype,_=g.hasOwnProperty,b=g.toString,w=y?y.toStringTag:void 0;var x=function(t){var e=_.call(t,w),r=t[w];try{t[w]=void 0;var n=!0}catch(t){}var o=b.call(t);return n&&(e?t[w]=r:delete t[w]),o},j=Object.prototype.toString;var E=function(t){return j.call(t)},O=y?y.toStringTag:void 0;var L=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":O&&O in Object(t)?x(t):E(t)};var S=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var N,P=function(t){if(!S(t))return!1;var e=L(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},I=m["__core-js_shared__"],T=(N=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var k=function(t){return!!T&&T in t},F=Function.prototype.toString;var z=function(t){if(null!=t){try{return F.call(t)}catch(t){}try{return t+""}catch(t){}}return""},M=/^\[object .+?Constructor\]$/,A=Function.prototype,C=Object.prototype,R=A.toString,G=C.hasOwnProperty,$=RegExp("^"+R.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var q=function(t){return!(!S(t)||k(t))&&(P(t)?$:M).test(z(t))};var Y=function(t,e){return null==t?void 0:t[e]};var B=function(t,e){var r=Y(t,e);return q(r)?r:void 0},W=B(Object,"create");var D=function(){this.__data__=W?W(null):{},this.size=0};var K=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},U=Object.prototype.hasOwnProperty;var H=function(t){var e=this.__data__;if(W){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return U.call(e,t)?e[t]:void 0},J=Object.prototype.hasOwnProperty;var Q=function(t){var e=this.__data__;return W?void 0!==e[t]:J.call(e,t)};var V=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=W&&void 0===e?"__lodash_hash_undefined__":e,this};function X(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}X.prototype.clear=D,X.prototype.delete=K,X.prototype.get=H,X.prototype.has=Q,X.prototype.set=V;var Z=X;var tt=function(){this.__data__=[],this.size=0};var et=function(t,e){return t===e||t!=t&&e!=e};var rt=function(t,e){for(var r=t.length;r--;)if(et(t[r][0],e))return r;return-1},nt=Array.prototype.splice;var ot=function(t){var e=this.__data__,r=rt(e,t);return!(r<0)&&(r==e.length-1?e.pop():nt.call(e,r,1),--this.size,!0)};var at=function(t){var e=this.__data__,r=rt(e,t);return r<0?void 0:e[r][1]};var it=function(t){return rt(this.__data__,t)>-1};var ut=function(t,e){var r=this.__data__,n=rt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ct(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ct.prototype.clear=tt,ct.prototype.delete=ot,ct.prototype.get=at,ct.prototype.has=it,ct.prototype.set=ut;var st=ct,lt=B(m,"Map");var ht=function(){this.size=0,this.__data__={hash:new Z,map:new(lt||st),string:new Z}};var ft=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var pt=function(t,e){var r=t.__data__;return ft(e)?r["string"==typeof e?"string":"hash"]:r.map};var vt=function(t){var e=pt(this,t).delete(t);return this.size-=e?1:0,e};var dt=function(t){return pt(this,t).get(t)};var mt=function(t){return pt(this,t).has(t)};var yt=function(t,e){var r=pt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function gt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gt.prototype.clear=ht,gt.prototype.delete=vt,gt.prototype.get=dt,gt.prototype.has=mt,gt.prototype.set=yt;var _t=gt;function bt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(bt.Cache||_t),r}bt.Cache=_t;var wt=bt;var xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jt=/\\(\\)?/g;(function(t){var e=wt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache})((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(xt,(function(t,r,n,o){e.push(n?o.replace(jt,"$1"):r||t)})),e}));var Et=y?y.prototype:void 0;Et&&Et.toString;var Ot=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Lt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t};n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string});var St={"./author.m.css":{author:"author-m_author__WRuLm","author-image":"author-m_author-image__3q2oc","author-name":"author-m_author-name__3WP-O","bottom-fix":"author-m_bottom-fix__223TT",prefix:"author-m_prefix__YSInK","rtl-image":"author-m_rtl-image__2nglD","ltr-image":"author-m_ltr-image__3bc0L",dark:"author-m_dark__2TTlp",light:"author-m_light__3y8_x"}},Nt=function(r){var n=r.story,u=r.hideAuthorImage,c=r.isBottom,s=r.prefix,l=void 0===s?"":s,h=r.config,v=void 0===h?{}:h,d=e(p)||{},m=o(d,["showAuthor"],!0),y=o(n,["authors","0"],""),g=y["avatar-url"],_=y["avatar-s3-key"],b=y.name,w=y.slug,x=c?"bottom-fix":"",j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Lt(t);return Ot(e)<155?"light":"dark"}(d.theme),E=o(v,["mountAt"],""),O=function(e){return l?t.createElement("div",{className:"arr-author-prefix "+f("prefix ".concat(j),St)},l):!u&&function(e){return g||_?t.createElement("div",{"data-test-id":"author-image",className:f("author-image ".concat(e,"-image"),St)},t.createElement("figure",null,_?t.createElement(i,{slug:_,"aspect-ratio":[1,1],defaultWidth:400,imgParams:{auto:["format","compress"]},alt:b}):t.createElement("img",{src:g}))):null}(e)};return t.createElement(t.Fragment,null,m&&t.createElement(a,{href:"".concat(E,"/author/")+w,"aria-label":"author-name",className:"author-name arr-author-name arrow-component "+f("author ".concat(x),St)},O("ltr"),t.createElement("div",{"data-test-id":"author-name",className:"author-name "+f("author-name ".concat(j),St)},b||n["author-name"]),!l&&O("rtl")))};var Pt=u((function(t){return{config:o(t,["qt","config"],{})}}))(Nt);Nt.propTypes={story:n.object.isRequired,hideAuthorImage:n.bool,isBottom:n.bool,prefix:n.string,config:n.object},Nt.defaultProps={hideAuthorImage:!1,isBottom:!1,prefix:""};export{Pt as Author};
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import n from"lodash.get";import{useSelector as o,connect as a}from"react-redux";import i from"prop-types";import u from"react-timeago";import{utcToZonedTime as c,format as l}from"date-fns-tz";import{Link as s,ResponsiveImage as f}from"@quintype/components";var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function m(t){var e={exports:{}};return t(e,e.exports),e.exports}var p=m((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),v=d(m((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=p)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},u=i.handleMissingStyleName,c=void 0===u?n.default.handleMissingStyleName:u,l=i.autoResolveMultipleImports,s=void 0===l?n.default.autoResolveMultipleImports:l;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],u=a[1],c=r||n.default.handleMissingStyleName;return u?e[i]?e[i][u]?e[i][u]:o("CSS module does not exist: "+u,c):o("CSS module import does not exist: "+i,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,c)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}}))),g=r(),y=function(){return e(g)};m((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),i=new S(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===d)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw a;return A()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=j(i,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?m:h,c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=m,r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",h="suspendedYield",d="executing",m="completed",p={};function v(){}function g(){}function y(){}var _={};c(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==r&&n.call(w,a)&&(_=w);var x=y.prototype=v.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function j(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:A}}function A(){return{value:e,done:!0}}return g.prototype=y,c(x,"constructor",y),c(y,"constructor",g),g.displayName=c(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},E(L.prototype),c(L.prototype,i,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new L(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(x),c(x,u,"Generator"),c(x,a,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var _=Array.isArray,b="object"==typeof h&&h&&h.Object===Object&&h,w="object"==typeof self&&self&&self.Object===Object&&self,x=b||w||Function("return this")(),E=x.Symbol,L=Object.prototype,j=L.hasOwnProperty,T=L.toString,O=E?E.toStringTag:void 0;var S=function(t){var e=j.call(t,O),r=t[O];try{t[O]=void 0;var n=!0}catch(t){}var o=T.call(t);return n&&(e?t[O]=r:delete t[O]),o},N=Object.prototype.toString;var A=function(t){return N.call(t)},z=E?E.toStringTag:void 0;var I=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":z&&z in Object(t)?S(t):A(t)};var k=function(t){return null!=t&&"object"==typeof t};var R=function(t){return"symbol"==typeof t||k(t)&&"[object Symbol]"==I(t)},M=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/;var F=function(t,e){if(_(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!R(t))||(C.test(t)||!M.test(t)||null!=e&&t in Object(e))};var P=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var G,Z=function(t){if(!P(t))return!1;var e=I(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},D=x["__core-js_shared__"],U=(G=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"";var $=function(t){return!!U&&U in t},q=Function.prototype.toString;var B=function(t){if(null!=t){try{return q.call(t)}catch(t){}try{return t+""}catch(t){}}return""},H=/^\[object .+?Constructor\]$/,Y=Function.prototype,J=Object.prototype,W=Y.toString,X=J.hasOwnProperty,K=RegExp("^"+W.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var V=function(t){return!(!P(t)||$(t))&&(Z(t)?K:H).test(B(t))};var Q=function(t,e){return null==t?void 0:t[e]};var tt=function(t,e){var r=Q(t,e);return V(r)?r:void 0},et=tt(Object,"create");var rt=function(){this.__data__=et?et(null):{},this.size=0};var nt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ot=Object.prototype.hasOwnProperty;var at=function(t){var e=this.__data__;if(et){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return ot.call(e,t)?e[t]:void 0},it=Object.prototype.hasOwnProperty;var ut=function(t){var e=this.__data__;return et?void 0!==e[t]:it.call(e,t)};var ct=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=et&&void 0===e?"__lodash_hash_undefined__":e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=rt,lt.prototype.delete=nt,lt.prototype.get=at,lt.prototype.has=ut,lt.prototype.set=ct;var st=lt;var ft=function(){this.__data__=[],this.size=0};var ht=function(t,e){return t===e||t!=t&&e!=e};var dt=function(t,e){for(var r=t.length;r--;)if(ht(t[r][0],e))return r;return-1},mt=Array.prototype.splice;var pt=function(t){var e=this.__data__,r=dt(e,t);return!(r<0)&&(r==e.length-1?e.pop():mt.call(e,r,1),--this.size,!0)};var vt=function(t){var e=this.__data__,r=dt(e,t);return r<0?void 0:e[r][1]};var gt=function(t){return dt(this.__data__,t)>-1};var yt=function(t,e){var r=this.__data__,n=dt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function _t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_t.prototype.clear=ft,_t.prototype.delete=pt,_t.prototype.get=vt,_t.prototype.has=gt,_t.prototype.set=yt;var bt=_t,wt=tt(x,"Map");var xt=function(){this.size=0,this.__data__={hash:new st,map:new(wt||bt),string:new st}};var Et=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Lt=function(t,e){var r=t.__data__;return Et(e)?r["string"==typeof e?"string":"hash"]:r.map};var jt=function(t){var e=Lt(this,t).delete(t);return this.size-=e?1:0,e};var Tt=function(t){return Lt(this,t).get(t)};var Ot=function(t){return Lt(this,t).has(t)};var St=function(t,e){var r=Lt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Nt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Nt.prototype.clear=xt,Nt.prototype.delete=jt,Nt.prototype.get=Tt,Nt.prototype.has=Ot,Nt.prototype.set=St;var At=Nt;function zt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(zt.Cache||At),r}zt.Cache=At;var It=zt;var kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/\\(\\)?/g,Mt=function(t){var e=It(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(kt,(function(t,r,n,o){e.push(n?o.replace(Rt,"$1"):r||t)})),e}));var Ct=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Ft=E?E.prototype:void 0,Pt=Ft?Ft.toString:void 0;var Gt=function t(e){if("string"==typeof e)return e;if(_(e))return Ct(e,t)+"";if(R(e))return Pt?Pt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Zt=function(t){return null==t?"":Gt(t)};var Dt=function(t,e){return _(t)?t:F(t,e)?[t]:Mt(Zt(t))};var Ut=function(t){if("string"==typeof t||R(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var $t=function(t,e){for(var r=0,n=(e=Dt(e,t)).length;null!=t&&r<n;)t=t[Ut(e[r++])];return r&&r==n?t:void 0};var qt=function(t,e,r){var n=null==t?void 0:$t(t,e);return void 0===n?r:n};var Bt=function(t,e,r,n){var o=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r};var Ht=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Wt=function(t){return(t=Zt(t))&&t.replace(Yt,Ht).replace(Jt,"")},Xt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Kt=function(t){return t.match(Xt)||[]},Vt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Qt=function(t){return Vt.test(t)},te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ee="["+te+"]",re="\\d+",ne="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+te+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ie="(?:\\ud83c[\\udde6-\\uddff]){2}",ue="[\\ud800-\\udbff][\\udc00-\\udfff]",ce="[A-Z\\xc0-\\xd6\\xd8-\\xde]",le="(?:"+oe+"|"+ae+")",se="(?:"+ce+"|"+ae+")",fe="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",he="[\\ufe0e\\ufe0f]?"+fe+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",ie,ue].join("|")+")[\\ufe0e\\ufe0f]?"+fe+")*"),de="(?:"+[ne,ie,ue].join("|")+")"+he,me=RegExp([ce+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,ce,"$"].join("|")+")",se+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,ce+le,"$"].join("|")+")",ce+"?"+le+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,de].join("|"),"g");var pe=function(t){return t.match(me)||[]};var ve=function(t,e,r){return t=Zt(t),void 0===(e=r?void 0:e)?Qt(t)?pe(t):Kt(t):t.match(e)||[]},ge=RegExp("['’]","g");var ye=function(t){return function(e){return Bt(ve(Wt(e).replace(ge,"")),t,"")}},_e=ye((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),be=ye((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),we=function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"en",i=o.showTime,u=void 0!==i&&i,c=o.isTimeFirst,l=void 0!==c&&c,s=o.isUpperCase,f=void 0!==s&&s,h=o.disableMeridiem,d=void 0!==h&&h,m=o.timeFormat,p=void 0===m?"12hours":m,v=o.localizedZeroToPad,g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],y=new Date(n),_=y.getDate().toString().padStart(2,0),b=g[y.getMonth()],w=b;f&&(w=_e(b));var x,E=y.getFullYear(),L=o.localizedMeridiem,j=o.localizedMonths,T=o.direction,O=void 0===T?"ltr":T,S=Ee(n,p,v,a),N=S;j&&(w=qt(j,[be(b)])||b);var A=Number(_).toLocaleString(a),z=E.toLocaleString(a).replace(/,/g,"");if(L){var I=S.includes("am"),k=L.am,R=void 0===k?"am":k,M=L.pm,C=void 0===M?"pm":M;N=(I?S.replace("am",R):S.replace("pm",C))||S}return"rtl"===O?(x=u?"".concat(N):"","".concat(A," ").concat(w,", ").concat(z," ").concat(x," ")):d?"".concat(w," ").concat(A,", ").concat(z):l?"".concat(N,", ").concat(A," ").concat(w," ").concat(z):(x=u?", ".concat(N):"","".concat(A," ").concat(w,", ").concat(z).concat(x))};function xe(t,e,r,n,o,a){var i,u=qt(o,["localizedPublishTime",r])||r;return"hour"===e&&t>23||-1!==["day","week","month","year"].indexOf(e)?we(t,e,r,n,o,a):t>1?(i=qt(o,["localizedPublishTime","".concat(e,"s")])||"".concat(e,"s"),"".concat(t.toLocaleString(a)," ").concat(i," ").concat(u)):(i=qt(o,["localizedPublishTime",e])||e,"".concat(t.toLocaleString(a)," ").concat(i," ").concat(u," "))}function Ee(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"12hours",r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=new Date(t),a=o.getHours(),i=o.getMinutes(),u=a>=12?"pm":"am";a=(a%=12)||12;var c="en"===n?"0":r;i=i<10?c+i.toLocaleString(n):i.toLocaleString(n);var l=a.toLocaleString(n)+":"+i+" "+u.toLocaleString(n);return"24hours"===e?o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):l}var Le=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},je=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},Te=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t),r=e?t:je(t),n=Le(r)<155?"light":"dark";return n};i.shape({"sketches-host":i.string,"cdn-name":i.string,"cdn-image":i.string}),i.shape({headline:i.string,"last-published-at":i.number,subheadline:i.string});var Oe={"./timestamp.m.css":{time:"timestamp-m_time__2v46i","time-wrapper":"timestamp-m_time-wrapper__3O2lM","bottom-fix":"timestamp-m_bottom-fix__1Zh8r",dark:"timestamp-m_dark__2lk9E",light:"timestamp-m_light__2QlrI"}},Se=function(e){var r=e.story,a=e.isBottom,i=e.config,s=void 0===i?{}:i,f=y()||{},h=n(s,["showTime"],n(f,["showTime"],!0)),d=r["last-published-at"]||r["first-published-at"],m=a?"bottom-fix":"",p=Te(f.theme),g=o((function(t){return n(t,["qt","config","isLocalizedNumber"],!1)}))?o((function(t){return n(t,["qt","config","language","ietf-code"],"en")})):"en";return t.createElement(t.Fragment,null,h&&t.createElement("div",{"data-test-id":"publish-time",className:"time arr--publish-time "+v("time ".concat(p," ").concat(m),Oe)},t.createElement("div",{className:"timestamp-m_time-wrapper__3O2lM"},function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(i&&"story"===a){var s=i&&c(e,i),f=s&&l(s,"yyyy-MM-dd'T'HH:mm:ssXXX",{timeZone:i}),h=we("","","",e,n);return t.createElement("time",{dateTime:f},h)}return t.createElement(u,{date:e,formatter:function(t,e,a,i){return r(t,e,a,i,n,o)}})}(d,xe,s,g))))};Se.propTypes={story:i.object,isBottom:i.bool,config:i.object,languageCode:i.string};var Ne={"./author.m.css":{author:"author-m_author__WRuLm","author-image":"author-m_author-image__3q2oc","author-name":"author-m_author-name__3WP-O","bottom-fix":"author-m_bottom-fix__223TT",prefix:"author-m_prefix__YSInK","rtl-image":"author-m_rtl-image__2nglD","ltr-image":"author-m_ltr-image__3bc0L",dark:"author-m_dark__2TTlp",light:"author-m_light__3y8_x"}},Ae=function(e){var r=e.story,o=e.hideAuthorImage,a=e.isBottom,i=e.prefix,u=void 0===i?"":i,c=e.config,l=void 0===c?{}:c,h=y()||{},d=n(h,["showAuthor"],!0),m=n(r,["authors","0"],""),p=m["avatar-url"],g=m["avatar-s3-key"],_=m.name,b=m.slug,w=a?"bottom-fix":"",x=Te(h.theme),E=n(l,["mountAt"],""),L=function(e){return u?t.createElement("div",{className:"arr-author-prefix "+v("prefix ".concat(x),Ne)},u):!o&&function(e){return p||g?t.createElement("div",{"data-test-id":"author-image",className:v("author-image ".concat(e,"-image"),Ne)},t.createElement("figure",null,g?t.createElement(f,{slug:g,"aspect-ratio":[1,1],defaultWidth:400,imgParams:{auto:["format","compress"]},alt:_}):t.createElement("img",{src:p}))):null}(e)};return t.createElement(t.Fragment,null,d&&t.createElement(s,{href:"".concat(E,"/author/")+b,"aria-label":"author-name",className:"author-name arr-author-name arrow-component "+v("author ".concat(w),Ne)},L("ltr"),t.createElement("div",{"data-test-id":"author-name",className:"author-name "+v("author-name ".concat(x),Ne)},_||r["author-name"]),!u&&L("rtl")))};var ze=a((function(t){return{config:n(t,["qt","config"],{})}}))(Ae);Ae.propTypes={story:i.object.isRequired,hideAuthorImage:i.bool,isBottom:i.bool,prefix:i.string,config:i.object},Ae.defaultProps={hideAuthorImage:!1,isBottom:!1,prefix:""};var Ie={"./dot.m.css":{dark:"dot-m_dark__1Njxl",light:"dot-m_light__27IA3"}},ke=function(e){var r=e.width,n=void 0===r?"3px":r,o=e.height,a=void 0===o?"3px":o,i=e.color,u=void 0===i?"light":i;return t.createElement("div",{className:v(u,Ie)},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:a,viewBox:"0 0 3 3"},t.createElement("circle",{cx:"87",cy:"9",r:"1",fill:"inherit",fillRule:"nonzero",transform:"translate(-86 -8)"})))};ke.propTypes={color:i.string,width:i.string,height:i.string};var Re={"./divider.m.css":{dark:"divider-m_dark__26FRi",light:"divider-m_light__w-7sy"}},Me=function(e){var r=e.width,n=void 0===r?"1":r,o=e.height,a=void 0===o?"10":o,i=e.color,u=void 0===i?"light":i;return t.createElement("div",{className:v(u,Re)},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:a},t.createElement("path",{fill:"inherit",d:"M0 0h1v10H0z"})))};Me.propTypes={color:i.string,width:i.string,height:i.string};var Ce={"./read-time.m.css":{"read-time-wrapper":"read-time-m_read-time-wrapper__3GyC_","dot-indicator":"read-time-m_dot-indicator__3Sqh2",dark:"read-time-m_dark__3yRaK",light:"read-time-m_light__1GAZu"}},Fe=function(e){var r=e.story,a=e.opts,i=void 0===a?{}:a,u=e.isLightTheme,c=void 0!==u&&u,l=y()||{},s=n(l,["showReadTime"])||n(i,["showReadTime"],!0),f=n(r,["read-time"],0),h=c?"light":Te(l.theme),d=o((function(t){return n(t,["qt","config","isLocalizedNumber"],!1)}))?o((function(t){return n(t,["qt","config","language","ietf-code"],"en")})):"en";if(!s||!f)return null;var m=n(i,["localizedTimeToRead"])||n(i,["localizationConfig","localizedTimeToRead"])||"min read";return t.createElement(t.Fragment,null,t.createElement("div",{"data-test-id":"read-time",className:"arrow-component arr--read-time "+v("read-time-wrapper ".concat(h),Ce)},t.createElement("span",{className:"read-time-indicator read-time-m_dot-indicator__3Sqh2"},t.createElement(ke,{color:h})),t.createElement("span",null,f.toLocaleString("".concat(d))," ",m)))};Fe.propTypes={story:i.shape({"read-time":i.number}),opts:i.shape({showReadTime:i.bool}),isLightTheme:i.bool,languageCode:i.string};var Pe={"./author-with-timestamp.m.css":{"author-time-wrapper":"author-with-timestamp-m_author-time-wrapper__G7_eI","author-image":"author-with-timestamp-m_author-image__24xrD",dot:"author-with-timestamp-m_dot__1LHXD","bottom-fix":"author-with-timestamp-m_bottom-fix__1rWGv",dash:"author-with-timestamp-m_dash__2L5XC"}},Ge=function(e){var r=e.story,o=e.separator,a=e.isBottom,i=e.hideAuthorImage,u=e.prefix,c=e.config,l=void 0===c?{}:c,s=e.isLightTheme,f=y()||{},h=n(l,["showAuthor"],n(f,["showAuthor"],!0)),d=n(l,["showTime"],n(f,["showTime"],!0)),m=n(f,["showReadTime"],!0),p=a?"bottom-fix":"",g="dot"===o?"dot":"dash",_=s?"light":Te(f.theme),b=function(){return d?t.createElement(t.Fragment,null,h&&t.createElement("span",{className:"arr-separator "+v("".concat(g),Pe)},"divider"===o?t.createElement(Me,{color:_}):t.createElement(ke,{color:_})),t.createElement(Se,{story:r,config:l}),m&&t.createElement(Fe,{story:r,opts:l,isLightTheme:s})):null};return t.createElement("div",{className:"arr--author-time "+v("author-time-wrapper ".concat(p),Pe)},h?t.createElement(t.Fragment,null,t.createElement(ze,{story:r,isBottom:!0,hideAuthorImage:i,prefix:u}),b()):b())};Ge.propTypes={story:i.object,separator:i.oneOf(["dot","divider"]),hideAuthorImage:i.bool,isBottom:i.bool,prefix:i.string,config:i.object,isLightTheme:i.bool},Ge.defaultProps={separator:"dot",isBottom:!1,hideAuthorImage:!0,prefix:"",isLightTheme:!1};export{Ge as AuthorWithTime};
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import"react-timeago";import"date-fns-tz";function o(){return o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(this,arguments)}function i(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function u(t){var e={exports:{}};return t(e,e.exports),e.exports}var s=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),l=c(u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=s)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},c=a.handleMissingStyleName,u=void 0===c?n.default.handleMissingStyleName:c,s=a.autoResolveMultipleImports,l=void 0===s?n.default.autoResolveMultipleImports:s;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],c=i[1],u=r||n.default.handleMissingStyleName;return c?e[a]?e[a][c]?e[a][c]:o("CSS module does not exist: "+c,u):o("CSS module import does not exist: "+a,u):o("Invalid style name: "+t,u)}(t,e,u);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!l)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,u)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",u)})).filter((function(t){return t})).join(" "):""}}))),f=["element","render"],h=function(e){return function(r){var n=r.element,a=r.render,c=i(r,f);return n?a&&"function"==typeof a?a(r):t.createElement(e,o({},c,{element:n})):null}};h.propTypes={StoryElement:n.element};var p=r();u((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?v:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function d(){}function g(){}function m(){}var _={};u(_,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==r&&n.call(w,i)&&(_=w);var j=m.prototype=d.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return g.prototype=m,u(j,"constructor",m),u(m,"constructor",g),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(x.prototype),u(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),u(j,c,"Generator"),u(j,i,(function(){return this})),u(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var v="object"==typeof a&&a&&a.Object===Object&&a,y="object"==typeof self&&self&&self.Object===Object&&self,d=v||y||Function("return this")(),g=d.Symbol,m=Object.prototype,_=m.hasOwnProperty,b=m.toString,w=g?g.toStringTag:void 0;var j=function(t){var e=_.call(t,w),r=t[w];try{t[w]=void 0;var n=!0}catch(t){}var o=b.call(t);return n&&(e?t[w]=r:delete t[w]),o},O=Object.prototype.toString;var x=function(t){return O.call(t)},E=g?g.toStringTag:void 0;var S=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":E&&E in Object(t)?j(t):x(t)};var L=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var N,P=function(t){if(!L(t))return!1;var e=S(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},k=d["__core-js_shared__"],I=(N=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var T=function(t){return!!I&&I in t},F=Function.prototype.toString;var M=function(t){if(null!=t){try{return F.call(t)}catch(t){}try{return t+""}catch(t){}}return""},z=/^\[object .+?Constructor\]$/,C=Function.prototype,G=Object.prototype,$=C.toString,A=G.hasOwnProperty,R=RegExp("^"+$.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var U=function(t){return!(!L(t)||T(t))&&(P(t)?R:z).test(M(t))};var Y=function(t,e){return null==t?void 0:t[e]};var K=function(t,e){var r=Y(t,e);return U(r)?r:void 0},X=K(Object,"create");var q=function(){this.__data__=X?X(null):{},this.size=0};var B=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},D=Object.prototype.hasOwnProperty;var H=function(t){var e=this.__data__;if(X){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return D.call(e,t)?e[t]:void 0},J=Object.prototype.hasOwnProperty;var Q=function(t){var e=this.__data__;return X?void 0!==e[t]:J.call(e,t)};var V=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=X&&void 0===e?"__lodash_hash_undefined__":e,this};function W(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}W.prototype.clear=q,W.prototype.delete=B,W.prototype.get=H,W.prototype.has=Q,W.prototype.set=V;var Z=W;var tt=function(){this.__data__=[],this.size=0};var et=function(t,e){return t===e||t!=t&&e!=e};var rt=function(t,e){for(var r=t.length;r--;)if(et(t[r][0],e))return r;return-1},nt=Array.prototype.splice;var ot=function(t){var e=this.__data__,r=rt(e,t);return!(r<0)&&(r==e.length-1?e.pop():nt.call(e,r,1),--this.size,!0)};var it=function(t){var e=this.__data__,r=rt(e,t);return r<0?void 0:e[r][1]};var at=function(t){return rt(this.__data__,t)>-1};var ct=function(t,e){var r=this.__data__,n=rt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ut(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ut.prototype.clear=tt,ut.prototype.delete=ot,ut.prototype.get=it,ut.prototype.has=at,ut.prototype.set=ct;var st=ut,lt=K(d,"Map");var ft=function(){this.size=0,this.__data__={hash:new Z,map:new(lt||st),string:new Z}};var ht=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var pt=function(t,e){var r=t.__data__;return ht(e)?r["string"==typeof e?"string":"hash"]:r.map};var vt=function(t){var e=pt(this,t).delete(t);return this.size-=e?1:0,e};var yt=function(t){return pt(this,t).get(t)};var dt=function(t){return pt(this,t).has(t)};var gt=function(t,e){var r=pt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}mt.prototype.clear=ft,mt.prototype.delete=vt,mt.prototype.get=yt,mt.prototype.has=dt,mt.prototype.set=gt;var _t=mt;function bt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(bt.Cache||_t),r}bt.Cache=_t;var wt=bt;var jt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/\\(\\)?/g;(function(t){var e=wt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache})((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(jt,(function(t,r,n,o){e.push(n?o.replace(Ot,"$1"):r||t)})),e}));var xt=g?g.prototype:void 0;xt&&xt.toString;var Et=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},St=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t};n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string});var Lt=["element","story","config"],Nt={"./big-fact.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px","bigfact-element":"big-fact-m_bigfact-element__3uAwv",light:"big-fact-m_light__ha49M",content:"big-fact-m_content__1u2Ul",attribution:"big-fact-m_attribution__3XK_P",dark:"big-fact-m_dark__7a_KC"}},Pt=function(r){var n=r.element;r.story,r.config;var a=i(r,Lt),c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:St(t);return Et(e)<155?"light":"dark"}((e(p)||{}).theme),u=n.metadata,s=u.content,f=u.attribution;return t.createElement("div",o({"data-test-id":"bigfact"},a,{className:"arrow-component arr--bigfact-element "+l("bigfact-element ".concat(c),Nt)+" "+(a&&a.className||"")}),t.createElement("div",{className:"big-fact-m_content__1u2Ul"},s),t.createElement("div",{"data-test-id":"attribution",className:l("attribution ".concat(c),Nt)},f))};Pt.propTypes={element:n.shape({metadata:n.shape({content:n.string,attribution:n.string})}),story:n.object,config:n.object};var kt=h(Pt);export{kt as BigFact};
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import n from"lodash.get";import o from"prop-types";import"react-timeago";import"date-fns-tz";function i(){return i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}function a(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function l(t){var e={exports:{}};return t(e,e.exports),e.exports}var s=l((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),h=u(l((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=s)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},c=a.handleMissingStyleName,u=void 0===c?n.default.handleMissingStyleName:c,l=a.autoResolveMultipleImports,s=void 0===l?n.default.autoResolveMultipleImports:l;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],c=i[1],u=r||n.default.handleMissingStyleName;return c?e[a]?e[a][c]?e[a][c]:o("CSS module does not exist: "+c,u):o("CSS module import does not exist: "+a,u):o("Invalid style name: "+t,u)}(t,e,u);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,u)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",u)})).filter((function(t){return t})).join(" "):""}})));l((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var _={};u(_,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(S([])));w&&w!==r&&n.call(w,i)&&(_=w);var k=g.prototype=y.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function q(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:e,done:!0}}return m.prototype=g,u(k,"constructor",g),u(g,"constructor",m),m.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},E(j.prototype),u(j.prototype,a,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new j(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(k),u(k,c,"Generator"),u(k,i,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),q(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;q(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var f=Array.isArray,p="object"==typeof c&&c&&c.Object===Object&&c,d="object"==typeof self&&self&&self.Object===Object&&self,v=p||d||Function("return this")(),y=v.Symbol,m=Object.prototype,g=m.hasOwnProperty,_=m.toString,b=y?y.toStringTag:void 0;var w=function(t){var e=g.call(t,b),r=t[b];try{t[b]=void 0;var n=!0}catch(t){}var o=_.call(t);return n&&(e?t[b]=r:delete t[b]),o},k=Object.prototype.toString;var E=function(t){return k.call(t)},j=y?y.toStringTag:void 0;var x=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":j&&j in Object(t)?w(t):E(t)};var O=function(t){return null!=t&&"object"==typeof t};var q=function(t){return"symbol"==typeof t||O(t)&&"[object Symbol]"==x(t)},N=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S=/^\w*$/;var L=function(t,e){if(f(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!q(t))||(S.test(t)||!N.test(t)||null!=e&&t in Object(e))};var I=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var P,T=function(t){if(!I(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},C=v["__core-js_shared__"],M=(P=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"";var z=function(t){return!!M&&M in t},F=Function.prototype.toString;var G=function(t){if(null!=t){try{return F.call(t)}catch(t){}try{return t+""}catch(t){}}return""},A=/^\[object .+?Constructor\]$/,B=Function.prototype,R=Object.prototype,$=B.toString,V=R.hasOwnProperty,H=RegExp("^"+$.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(t){return!(!I(t)||z(t))&&(T(t)?H:A).test(G(t))};var Z=function(t,e){return null==t?void 0:t[e]};var Y=function(t,e){var r=Z(t,e);return Q(r)?r:void 0},K=Y(Object,"create");var U=function(){this.__data__=K?K(null):{},this.size=0};var W=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},X=Object.prototype.hasOwnProperty;var D=function(t){var e=this.__data__;if(K){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return X.call(e,t)?e[t]:void 0},J=Object.prototype.hasOwnProperty;var tt=function(t){var e=this.__data__;return K?void 0!==e[t]:J.call(e,t)};var et=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=K&&void 0===e?"__lodash_hash_undefined__":e,this};function rt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=U,rt.prototype.delete=W,rt.prototype.get=D,rt.prototype.has=tt,rt.prototype.set=et;var nt=rt;var ot=function(){this.__data__=[],this.size=0};var it=function(t,e){return t===e||t!=t&&e!=e};var at=function(t,e){for(var r=t.length;r--;)if(it(t[r][0],e))return r;return-1},ct=Array.prototype.splice;var ut=function(t){var e=this.__data__,r=at(e,t);return!(r<0)&&(r==e.length-1?e.pop():ct.call(e,r,1),--this.size,!0)};var lt=function(t){var e=this.__data__,r=at(e,t);return r<0?void 0:e[r][1]};var st=function(t){return at(this.__data__,t)>-1};var ht=function(t,e){var r=this.__data__,n=at(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ft(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=ot,ft.prototype.delete=ut,ft.prototype.get=lt,ft.prototype.has=st,ft.prototype.set=ht;var pt=ft,dt=Y(v,"Map");var vt=function(){this.size=0,this.__data__={hash:new nt,map:new(dt||pt),string:new nt}};var yt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var mt=function(t,e){var r=t.__data__;return yt(e)?r["string"==typeof e?"string":"hash"]:r.map};var gt=function(t){var e=mt(this,t).delete(t);return this.size-=e?1:0,e};var _t=function(t){return mt(this,t).get(t)};var bt=function(t){return mt(this,t).has(t)};var wt=function(t,e){var r=mt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function kt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}kt.prototype.clear=vt,kt.prototype.delete=gt,kt.prototype.get=_t,kt.prototype.has=bt,kt.prototype.set=wt;var Et=kt;function jt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(jt.Cache||Et),r}jt.Cache=Et;var xt=jt;var Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/\\(\\)?/g,Nt=function(t){var e=xt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,(function(t,r,n,o){e.push(n?o.replace(qt,"$1"):r||t)})),e}));var St=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Lt=y?y.prototype:void 0,It=Lt?Lt.toString:void 0;var Pt=function t(e){if("string"==typeof e)return e;if(f(e))return St(e,t)+"";if(q(e))return It?It.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Tt=function(t){return null==t?"":Pt(t)};var Ct=function(t,e){return f(t)?t:L(t,e)?[t]:Nt(Tt(t))};var Mt=function(t){if("string"==typeof t||q(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var zt=function(t,e){for(var r=0,n=(e=Ct(e,t)).length;null!=t&&r<n;)t=t[Mt(e[r++])];return r&&r==n?t:void 0};var Ft=function(t,e,r){var n=null==t?void 0:zt(t,e);return void 0===n?r:n},Gt=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},At=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},Bt={mobile:767,tablet:1024},Rt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t),r=e?t:At(t),n=Gt(r)<155?"light":"dark";return n},$t=o.shape({"sketches-host":o.string,"cdn-name":o.string,"cdn-image":o.string}),Vt=o.shape({headline:o.string,"last-published-at":o.number,subheadline:o.string}),Ht=["element","render"],Qt=function(e){return function(r){var n=r.element,o=r.render,c=a(r,Ht);return n?o&&"function"==typeof o?o(r):t.createElement(e,i({},c,{element:n})):null}};Qt.propTypes={StoryElement:o.element};var Zt=function(e){var r=e.width,n=e.height,o=e.color,i=e.opacity,a="light"===o&&"#ffffff",c="dark"===o&&"#0d0d0d";return t.createElement("div",{className:"icon-m_curve-wrapper__3-sLV",style:{fill:"".concat(a||c||o)}},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,viewBox:"0 0 64 64"},t.createElement("path",{fill:"inherit",opacity:i,d:"M61 44.702c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067-2.638-2.712-3.956-6.704-3.956-11.976 0-4.971.716-9.227 2.147-12.767 1.432-3.54 3.165-6.553 5.2-9.039 2.034-2.485 4.144-4.481 6.33-5.988 2.184-1.506 4.106-2.56 5.763-3.163l5.652 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.035 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.007 3.163C60.171 39.13 61 41.69 61 44.702zm-33.004 0c0 3.465-1.13 6.214-3.39 8.248-2.261 2.033-5.125 3.05-8.59 3.05-4.07 0-7.423-1.356-10.06-4.067C3.319 49.22 2 45.229 2 39.957c0-4.971.716-9.227 2.148-12.767 1.431-3.54 3.164-6.553 5.199-9.039 2.034-2.485 4.144-4.481 6.33-5.988C17.86 10.657 19.782 9.603 21.44 9l5.651 7.909c-3.316 1.657-5.99 3.879-8.025 6.666-2.034 2.786-3.052 6.289-3.052 10.507.603-.15 1.432-.226 2.487-.226 3.014 0 5.35 1.054 7.008 3.163 1.657 2.11 2.486 4.67 2.486 7.683z"})))};Zt.propTypes={width:o.string,height:o.string,color:o.string,opacity:o.string};var Yt=function(e){var r=e.width,n=e.height,o=e.color,i=e.opacity,a="light"===o&&"#ffffff",c="dark"===o&&"#0d0d0d";return t.createElement("div",{className:"icon-m_edge-wrapper__xUOdp",style:{fill:"".concat(a||c||o)}},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,viewBox:"0 0 64 64"},t.createElement("path",{fill:"inherit",opacity:i,d:"M16.858 29.836v4.727H28V60H4V29.836c0-9.6 2.606-16.727 7.746-21.187C15.3 5.564 19.8 4 25.122 4v13.627c-2.888 0-8.264 0-8.264 12.209zm40.264-12.21V4c-5.32 0-9.82 1.564-13.376 4.65C38.606 13.108 36 20.236 36 29.835V60h24V34.563H48.857v-4.727c0-12.21 5.377-12.21 8.265-12.21z"})))};Yt.propTypes={width:o.string,height:o.string,color:o.string,opacity:o.string};var Kt=r(),Ut=["element","template","css","story","config","render"],Wt={"./block-quote.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px","blockquote-withBackground":"block-quote-m_blockquote-withBackground__1yW-u",icon:"block-quote-m_icon__m-EIZ","icon-border":"block-quote-m_icon-border__2xQQY",blockquote:"block-quote-m_blockquote__HPVh0","blockquote-default":"block-quote-m_blockquote-default__fZ8a1","blockquote-withBorder":"block-quote-m_blockquote-withBorder__1GVQL",border:"block-quote-m_border__1ZTPR",content:"block-quote-m_content__xpMqX",wrapper:"block-quote-m_wrapper__2KEhw",attribution:"block-quote-m_attribution__2m4s2","quote-wrapper":"block-quote-m_quote-wrapper__83bEy",dark:"block-quote-m_dark__HaZuG",light:"block-quote-m_light__1QrNc"}},Xt=function(e,r,n,o){var i,a=!!(i=Ft(Bt,"mobile"))&&Ft(global,"document.documentElement.clientWidth")<=i?"48px":"64px";return"withBackground"===r?"edgeIcon"===e?t.createElement(Yt,{width:a,height:a,color:o,opacity:".4"}):t.createElement(Zt,{width:a,height:a,color:o,opacity:".4"}):"withBackground"!==r?"edgeIcon"===e?t.createElement(Yt,{width:a,height:a,color:n}):t.createElement(Zt,{width:a,height:a,color:n}):void 0},Dt=function(r){var o=r.element,c=r.template,u=r.css,l=void 0===u?{}:u;r.story,r.config,r.render;var s=a(r,Ut),f=n(o,["metadata"]),p=f.content,d=f.attribution;if(!p)return null;var v=l.blockQuoteColor,y=l.backgroundShade,m=l.iconType,g=c?"blockquote-".concat(c):"blockquote",_="withBackground"===c,b=_?Rt(y):"",w=_&&y?{backgroundColor:y}:{},k=e(Kt)||{},E=Rt(_?w.backgroundColor:k.theme);return t.createElement("div",i({"data-test-id":"blockquote",style:w},s,{className:"arrow-component arr--block-quote "+h("".concat(g," ").concat(b),Wt)+" "+(s&&s.className||"")}),t.createElement("div",{className:"block-quote-m_quote-wrapper__83bEy"},"withBorder"===c?t.createElement("div",{className:"block-quote-m_icon-border__2xQQY"},t.createElement("div",{className:"block-quote-m_icon__m-EIZ"},Xt(m,c,v,b)),t.createElement("div",{className:"block-quote-m_border__1ZTPR",style:v&&{backgroundColor:v}})):t.createElement("div",{className:"block-quote-m_icon__m-EIZ"},Xt(m,c,v,b)),t.createElement("div",{className:"block-quote-m_wrapper__2KEhw",style:v&&{borderColor:v}},t.createElement("div",{dangerouslySetInnerHTML:{__html:p},className:h("content ".concat(E),Wt)}),t.createElement("div",{dangerouslySetInnerHTML:{__html:d},className:h("attribution ".concat(E),Wt)}))))};Dt.propTypes={element:o.shape({metadata:o.shape({content:o.string,attribution:o.string})}),template:o.string,story:Vt,config:$t,render:o.func,css:o.object};var Jt=Qt(Dt);export{Jt as BlockQuote,Dt as BlockQuoteBase};
package/Blurb/index.js ADDED
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r,useState as n,useEffect as o}from"react";import i from"prop-types";import"react-timeago";import"date-fns-tz";function a(){return a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a.apply(this,arguments)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t,e)||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 l(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function h(t){var e={exports:{}};return t(e,e.exports),e.exports}var p=h((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),v=f(h((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=p)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},u=a.handleMissingStyleName,c=void 0===u?n.default.handleMissingStyleName:u,l=a.autoResolveMultipleImports,s=void 0===l?n.default.autoResolveMultipleImports:l;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],u=i[1],c=r||n.default.handleMissingStyleName;return u?e[a]?e[a][u]?e[a][u]:o("CSS module does not exist: "+u,c):o("CSS module import does not exist: "+a,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,c)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}}))),d=["element","render"],y=function(e){return function(r){var n=r.element,o=r.render,i=l(r,d);return n?o&&"function"==typeof o?o(r):t.createElement(e,a({},i,{element:n})):null}};y.propTypes={StoryElement:i.element},h((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return I()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?v:h,c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=v,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",h="suspendedYield",p="executing",v="completed",d={};function y(){}function g(){}function m(){}var b={};c(b,i,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(k([])));w&&w!==r&&n.call(w,i)&&(b=w);var j=m.prototype=y.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function k(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:I}}function I(){return{value:e,done:!0}}return g.prototype=m,c(j,"constructor",m),c(m,"constructor",g),g.displayName=c(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(x.prototype),c(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),c(j,u,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var g="object"==typeof s&&s&&s.Object===Object&&s,m="object"==typeof self&&self&&self.Object===Object&&self,b=g||m||Function("return this")(),_=b.Symbol,w=Object.prototype,j=w.hasOwnProperty,O=w.toString,x=_?_.toStringTag:void 0;var E=function(t){var e=j.call(t,x),r=t[x];try{t[x]=void 0;var n=!0}catch(t){}var o=O.call(t);return n&&(e?t[x]=r:delete t[x]),o},S=Object.prototype.toString;var L=function(t){return S.call(t)},N=_?_.toStringTag:void 0;var k=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":N&&N in Object(t)?E(t):L(t)};var I=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var P,T=function(t){if(!I(t))return!1;var e=k(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},M=b["__core-js_shared__"],z=(P=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"";var C=function(t){return!!z&&z in t},F=Function.prototype.toString;var A=function(t){if(null!=t){try{return F.call(t)}catch(t){}try{return t+""}catch(t){}}return""},R=/^\[object .+?Constructor\]$/,$=Function.prototype,G=Object.prototype,B=$.toString,H=G.hasOwnProperty,Y=RegExp("^"+B.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var U=function(t){return!(!I(t)||C(t))&&(T(t)?Y:R).test(A(t))};var W=function(t,e){return null==t?void 0:t[e]};var J=function(t,e){var r=W(t,e);return U(r)?r:void 0},X=J(Object,"create");var q=function(){this.__data__=X?X(null):{},this.size=0};var D=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},K=Object.prototype.hasOwnProperty;var Q=function(t){var e=this.__data__;if(X){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return K.call(e,t)?e[t]:void 0},V=Object.prototype.hasOwnProperty;var Z=function(t){var e=this.__data__;return X?void 0!==e[t]:V.call(e,t)};var tt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=X&&void 0===e?"__lodash_hash_undefined__":e,this};function et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=q,et.prototype.delete=D,et.prototype.get=Q,et.prototype.has=Z,et.prototype.set=tt;var rt=et;var nt=function(){this.__data__=[],this.size=0};var ot=function(t,e){return t===e||t!=t&&e!=e};var it=function(t,e){for(var r=t.length;r--;)if(ot(t[r][0],e))return r;return-1},at=Array.prototype.splice;var ut=function(t){var e=this.__data__,r=it(e,t);return!(r<0)&&(r==e.length-1?e.pop():at.call(e,r,1),--this.size,!0)};var ct=function(t){var e=this.__data__,r=it(e,t);return r<0?void 0:e[r][1]};var lt=function(t){return it(this.__data__,t)>-1};var st=function(t,e){var r=this.__data__,n=it(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ft(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=nt,ft.prototype.delete=ut,ft.prototype.get=ct,ft.prototype.has=lt,ft.prototype.set=st;var ht=ft,pt=J(b,"Map");var vt=function(){this.size=0,this.__data__={hash:new rt,map:new(pt||ht),string:new rt}};var dt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var yt=function(t,e){var r=t.__data__;return dt(e)?r["string"==typeof e?"string":"hash"]:r.map};var gt=function(t){var e=yt(this,t).delete(t);return this.size-=e?1:0,e};var mt=function(t){return yt(this,t).get(t)};var bt=function(t){return yt(this,t).has(t)};var _t=function(t,e){var r=yt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function wt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}wt.prototype.clear=vt,wt.prototype.delete=gt,wt.prototype.get=mt,wt.prototype.has=bt,wt.prototype.set=_t;var jt=wt;function Ot(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ot.Cache||jt),r}Ot.Cache=jt;var xt=Ot;var Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/\\(\\)?/g;(function(t){var e=xt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache})((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Et,(function(t,r,n,o){e.push(n?o.replace(St,"$1"):r||t)})),e}));var Lt=_?_.prototype:void 0;Lt&&Lt.toString;var Nt=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},kt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},It=i.shape({"sketches-host":i.string,"cdn-name":i.string,"cdn-image":i.string}),Pt=i.shape({headline:i.string,"last-published-at":i.number,subheadline:i.string}),Tt=r(),Mt=["element","template","opts","css","story","config","render"],zt={"./blurb.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",blurb:"blurb-m_blurb__3pXi5","blurb-default":"blurb-m_blurb-default__JR86y","blurb-withBorder":"blurb-m_blurb-withBorder__SjW--",dark:"blurb-m_dark__1eErz",light:"blurb-m_light__OBWiH"}},Ct=function(r){var i=r.element,u=r.template,s=void 0===u?"":u,f=r.opts,h=void 0===f?{}:f,p=r.css,d=void 0===p?{}:p;r.story,r.config,r.render;var y=l(r,Mt),g=i.text,m=d.borderColor,b="withBorder"===s?{border:"solid 2px ".concat(m)}:{borderLeft:"solid 2px ".concat(m)},_=c(n(b),2),w=_[0],j=_[1];if(!g)return null;o((function(){var t=document.getElementsByTagName("HTML");t&&t.length&&"rtl"===t[0].dir.toLowerCase()&&"withBorder"!==s&&j({borderRight:"solid 2px ".concat(m)})}),[]);var O=h.isExternalLink,x=(void 0===O||O)&&function(t){var e=t,r=t.match(/(<a).*?(>)/g);return r&&r.forEach((function(t){/target=/g.test(t)||(e=e.replace(t,"<a aria-label='content' target='_blank'".concat(t.substring(2))))})),e}(g)||g,E=s?"blurb-".concat(s):"blurb",S=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:kt(t);return Nt(e)<155?"light":"dark"}((e(Tt)||{}).theme);return t.createElement("div",a({"data-test-id":"blurb",style:m&&w,dangerouslySetInnerHTML:{__html:x}},y,{className:"arrow-component arr-custom-style arr--blurb-element "+v("".concat(E," ").concat(S),zt)+" "+(y&&y.className||"")}))};Ct.propTypes={element:i.shape({text:i.string}),template:i.string,opts:i.shape({isExternalLink:i.bool}),story:Pt,config:It,render:i.func,css:i.object};var Ft=y(Ct);export{Ft as Blurb};
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import{connect as n}from"react-redux";import o,{PropTypes as i}from"prop-types";import{Link as a}from"@quintype/components";import c from"lodash.get";import"react-timeago";import"date-fns-tz";var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t){var e={exports:{}};return t(e,e.exports),e.exports}var f=s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),h=u(s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=f)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},c=a.handleMissingStyleName,l=void 0===c?n.default.handleMissingStyleName:c,u=a.autoResolveMultipleImports,s=void 0===u?n.default.autoResolveMultipleImports:u;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],c=i[1],l=r||n.default.handleMissingStyleName;return c?e[a]?e[a][c]?e[a][c]:o("CSS module does not exist: "+c,l):o("CSS module import does not exist: "+a,l):o("Invalid style name: "+t,l)}(t,e,l);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,l)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",l)})).filter((function(t){return t})).join(" "):""}}))),p=r();s((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var l=s(t,e,r);if("normal"===l.type){if(n=r.done?d:h,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=d,r.method="throw",r.arg=l.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function m(){}function y(){}function g(){}var _={};l(_,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==r&&n.call(w,i)&&(_=w);var x=g.prototype=m.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var l=s(t[o],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(l.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function F(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:P}}function P(){return{value:e,done:!0}}return y.prototype=g,l(x,"constructor",g),l(g,"constructor",y),y.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},j(L.prototype),l(L.prototype,a,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new L(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(x),l(x,c,"Generator"),l(x,i,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=F,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var d=Array.isArray,v="object"==typeof l&&l&&l.Object===Object&&l,m="object"==typeof self&&self&&self.Object===Object&&self,y=v||m||Function("return this")(),g=y.Symbol,_=Object.prototype,b=_.hasOwnProperty,w=_.toString,x=g?g.toStringTag:void 0;var j=function(t){var e=b.call(t,x),r=t[x];try{t[x]=void 0;var n=!0}catch(t){}var o=w.call(t);return n&&(e?t[x]=r:delete t[x]),o},L=Object.prototype.toString;var O=function(t){return L.call(t)},E=g?g.toStringTag:void 0;var N=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":E&&E in Object(t)?j(t):O(t)};var S=function(t){return null!=t&&"object"==typeof t};var F=function(t){return"symbol"==typeof t||S(t)&&"[object Symbol]"==N(t)},P=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/;var k=function(t,e){if(d(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!F(t))||(T.test(t)||!P.test(t)||null!=e&&t in Object(e))};var z=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var I,M=function(t){if(!z(t))return!1;var e=N(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},B=y["__core-js_shared__"],C=(I=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var A=function(t){return!!C&&C in t},$=Function.prototype.toString;var G=function(t){if(null!=t){try{return $.call(t)}catch(t){}try{return t+""}catch(t){}}return""},R=/^\[object .+?Constructor\]$/,Y=Function.prototype,D=Object.prototype,q=Y.toString,V=D.hasOwnProperty,H=RegExp("^"+q.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var J=function(t){return!(!z(t)||A(t))&&(M(t)?H:R).test(G(t))};var K=function(t,e){return null==t?void 0:t[e]};var Q=function(t,e){var r=K(t,e);return J(r)?r:void 0},U=Q(Object,"create");var W=function(){this.__data__=U?U(null):{},this.size=0};var X=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Z=Object.prototype.hasOwnProperty;var tt=function(t){var e=this.__data__;if(U){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Z.call(e,t)?e[t]:void 0},et=Object.prototype.hasOwnProperty;var rt=function(t){var e=this.__data__;return U?void 0!==e[t]:et.call(e,t)};var nt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=U&&void 0===e?"__lodash_hash_undefined__":e,this};function ot(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ot.prototype.clear=W,ot.prototype.delete=X,ot.prototype.get=tt,ot.prototype.has=rt,ot.prototype.set=nt;var it=ot;var at=function(){this.__data__=[],this.size=0};var ct=function(t,e){return t===e||t!=t&&e!=e};var lt=function(t,e){for(var r=t.length;r--;)if(ct(t[r][0],e))return r;return-1},ut=Array.prototype.splice;var st=function(t){var e=this.__data__,r=lt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ut.call(e,r,1),--this.size,!0)};var ft=function(t){var e=this.__data__,r=lt(e,t);return r<0?void 0:e[r][1]};var ht=function(t){return lt(this.__data__,t)>-1};var pt=function(t,e){var r=this.__data__,n=lt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function dt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}dt.prototype.clear=at,dt.prototype.delete=st,dt.prototype.get=ft,dt.prototype.has=ht,dt.prototype.set=pt;var vt=dt,mt=Q(y,"Map");var yt=function(){this.size=0,this.__data__={hash:new it,map:new(mt||vt),string:new it}};var gt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var _t=function(t,e){var r=t.__data__;return gt(e)?r["string"==typeof e?"string":"hash"]:r.map};var bt=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e};var wt=function(t){return _t(this,t).get(t)};var xt=function(t){return _t(this,t).has(t)};var jt=function(t,e){var r=_t(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Lt.prototype.clear=yt,Lt.prototype.delete=bt,Lt.prototype.get=wt,Lt.prototype.has=xt,Lt.prototype.set=jt;var Ot=Lt;function Et(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Et.Cache||Ot),r}Et.Cache=Ot;var Nt=Et;var St=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ft=/\\(\\)?/g,Pt=function(t){var e=Nt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(St,(function(t,r,n,o){e.push(n?o.replace(Ft,"$1"):r||t)})),e}));var Tt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},kt=g?g.prototype:void 0,zt=kt?kt.toString:void 0;var It=function t(e){if("string"==typeof e)return e;if(d(e))return Tt(e,t)+"";if(F(e))return zt?zt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Mt=function(t){return null==t?"":It(t)};var Bt=function(t,e){return d(t)?t:k(t,e)?[t]:Pt(Mt(t))};var Ct=function(t){if("string"==typeof t||F(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var At=function(t,e){for(var r=0,n=(e=Bt(e,t)).length;null!=t&&r<n;)t=t[Ct(e[r++])];return r&&r==n?t:void 0};var $t=function(t,e,r){var n=null==t?void 0:At(t,e);return void 0===n?r:n},Gt=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Rt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t},Yt={mobile:767,tablet:1024};o.shape({"sketches-host":o.string,"cdn-name":o.string,"cdn-image":o.string}),o.shape({headline:o.string,"last-published-at":o.number,subheadline:o.string});var Dt={"./collection-name.m.css":{collection:"collection-name-m_collection__JD6sx","collection-borderLeft":"collection-name-m_collection-borderLeft__3Dznk","border-left":"collection-name-m_border-left__3_pYw","collection-borderBottomFull":"collection-name-m_collection-borderBottomFull__Dkq3K","collection-borderBottom":"collection-name-m_collection-borderBottom__2rdQM","collection-crossLine":"collection-name-m_collection-crossLine__1sIpN","border-bottom":"collection-name-m_border-bottom__1MnlV",dark:"collection-name-m_dark__nMe5H",light:"collection-name-m_light__1vFDN"}},qt=function(r){var n,o=r.collectionNameBorderColor,i=void 0===o?"":o,l=r.collection,u=r.config,s=r.collectionNameTemplate,f=r.headerLevel,d=r.customCollectionName,v=void 0===d?"":d,m=r.navigate,y=void 0===m||m,g=e(p)||{},_=c(g,["showRowTitle"],!0),b=["borderLeft","borderBottom","crossLine","borderBottomFull"].includes(s)?" collection-".concat(s):"",w=y&&l&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.magazineSlug,n=void 0===r?"":r,o=e.isArchivePage;if(void 0!==o&&o)return"/magazine/archive/".concat(n);if(n)return"/magazine/".concat(n,"/").concat(t.slug);if("section"===t.template){var i=$t(t,["metadata","section","0","id"],""),a=e.sections,c=a&&a.find((function(t){return t.id===i}));return c?c["section-url"]:"/"}return"/collection/".concat(t.slug)}(l,u)||"",x=v||l.name||"",j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Rt(t);return Gt(e)<155?"light":"dark"}(g.theme),L="h"+f,O=Rt(i),E=b.includes("collection-borderBottomFull")?"4px solid ".concat(O):"",N=!!(n=$t(Yt,"mobile"))&&$t(global,"document.documentElement.clientWidth")<=n;return t.createElement(t.Fragment,null,_&&x&&t.createElement("div",{style:{borderBottom:E},"data-test-id":"collection-name",className:("arr--collection-name arrow-component ".concat(b)?"arr--collection-name arrow-component ".concat(b)+" ":"")+h("collection ".concat(j," ").concat(b),Dt)},b.includes("collection-borderLeft")&&t.createElement("span",{className:"arr-collection-name-border-left collection-name-m_border-left__3_pYw",style:{color:O,fontSize:function(){if(N)switch(f){case"1":return"32px";case"2":return"24px";case"3":default:return"20px";case"4":return"18px";case"5":case"6":return"16px"}switch(f){case"1":return"40px";case"2":return"32px";case"3":default:return"24px";case"4":return"20px";case"5":return"18px";case"6":return"16px"}}()}}),w&&!w.includes(void 0)?t.createElement(a,{href:w,"aria-label":"collection-name"},t.createElement(L,null,x)):t.createElement(L,null,x),b.includes("collection-borderBottom")&&!b.includes("collection-borderBottomFull")?t.createElement("div",{className:"collection-name-m_border-bottom__1MnlV",style:{borderBottom:"4px solid ".concat(O)}}):""))};qt.propTypes={collectionNameBorderColor:i.string,collection:i.object,config:i.object,collectionNameTemplate:i.oneOf(["","borderLeft","borderBottom","crossLine","borderBottomFull"]),headerLevel:i.string,customCollectionName:i.string,navigate:i.bool},qt.defaultProps={collectionNameTemplate:"",headerLevel:"3"};var Vt=n((function(t){return{config:c(t,["qt","config"],{})}}))(qt);export{Vt as CollectionName,qt as CollectionNameBase};
@@ -0,0 +1 @@
1
+ import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import{Link as o}from"@quintype/components";import i from"lodash.get";import"react-timeago";import"date-fns-tz";var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function s(t){var e={exports:{}};return t(e,e.exports),e.exports}var c=s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),u=l(s((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=c)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var i=Object.keys(e),a=r||{},l=a.handleMissingStyleName,s=void 0===l?n.default.handleMissingStyleName:l,c=a.autoResolveMultipleImports,u=void 0===c?n.default.autoResolveMultipleImports:c;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var i=t.split("."),a=i[0],l=i[1],s=r||n.default.handleMissingStyleName;return l?e[a]?e[a][l]?e[a][l]:o("CSS module does not exist: "+l,s):o("CSS module import does not exist: "+a,s):o("Invalid style name: "+t,s)}(t,e,s);if(0===i.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(i.length>1){if(!u)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var i=r||n.default.handleMissingStyleName,a=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(a.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+a.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+a[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===a.length?o("Could not resolve the styleName '"+t+"'.",i):e[a[0]][t]}(t,e,s)}var r=e[i[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",s)})).filter((function(t){return t})).join(" "):""}}))),h=r();s((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return z()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=L(a,r);if(l){if(l===d)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=u(t,e,r);if("normal"===s.type){if(n=r.done?v:f,s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=v,r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",d={};function g(){}function y(){}function m(){}var w={};s(w,i,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(k([])));b&&b!==r&&n.call(b,i)&&(w=b);var E=m.prototype=g.prototype=Object.create(w);function x(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,l){var s=u(t[o],t,i);if("throw"!==s.type){var c=s.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,l)}),(function(t){r("throw",t,a,l)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,l)}))}l(s.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function L(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=u(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function k(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:z}}function z(){return{value:e,done:!0}}return y.prototype=m,s(E,"constructor",m),s(m,"constructor",y),y.displayName=s(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},x(j.prototype),s(j.prototype,a,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new j(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(E),s(E,l,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return l.type="throw",l.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var f=Array.isArray,p="object"==typeof a&&a&&a.Object===Object&&a,v="object"==typeof self&&self&&self.Object===Object&&self,d=p||v||Function("return this")(),g=d.Symbol,y=Object.prototype,m=y.hasOwnProperty,w=y.toString,_=g?g.toStringTag:void 0;var b=function(t){var e=m.call(t,_),r=t[_];try{t[_]=void 0;var n=!0}catch(t){}var o=w.call(t);return n&&(e?t[_]=r:delete t[_]),o},E=Object.prototype.toString;var x=function(t){return E.call(t)},j=g?g.toStringTag:void 0;var L=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":j&&j in Object(t)?b(t):x(t)};var O=function(t){return null!=t&&"object"==typeof t};var T=function(t){return"symbol"==typeof t||O(t)&&"[object Symbol]"==L(t)},S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k=/^\w*$/;var z=function(t,e){if(f(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!T(t))||(k.test(t)||!S.test(t)||null!=e&&t in Object(e))};var N=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var M,I=function(t){if(!N(t))return!1;var e=L(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},P=d["__core-js_shared__"],C=(M=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"";var R=function(t){return!!C&&C in t},F=Function.prototype.toString;var A=function(t){if(null!=t){try{return F.call(t)}catch(t){}try{return t+""}catch(t){}}return""},D=/^\[object .+?Constructor\]$/,$=Function.prototype,G=Object.prototype,H=$.toString,V=G.hasOwnProperty,B=RegExp("^"+H.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var W=function(t){return!(!N(t)||R(t))&&(I(t)?B:D).test(A(t))};var Y=function(t,e){return null==t?void 0:t[e]};var q=function(t,e){var r=Y(t,e);return W(r)?r:void 0},U=q(Object,"create");var J=function(){this.__data__=U?U(null):{},this.size=0};var K=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Q=Object.prototype.hasOwnProperty;var X=function(t){var e=this.__data__;if(U){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Q.call(e,t)?e[t]:void 0},Z=Object.prototype.hasOwnProperty;var tt=function(t){var e=this.__data__;return U?void 0!==e[t]:Z.call(e,t)};var et=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=U&&void 0===e?"__lodash_hash_undefined__":e,this};function rt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=J,rt.prototype.delete=K,rt.prototype.get=X,rt.prototype.has=tt,rt.prototype.set=et;var nt=rt;var ot=function(){this.__data__=[],this.size=0};var it=function(t,e){return t===e||t!=t&&e!=e};var at=function(t,e){for(var r=t.length;r--;)if(it(t[r][0],e))return r;return-1},lt=Array.prototype.splice;var st=function(t){var e=this.__data__,r=at(e,t);return!(r<0)&&(r==e.length-1?e.pop():lt.call(e,r,1),--this.size,!0)};var ct=function(t){var e=this.__data__,r=at(e,t);return r<0?void 0:e[r][1]};var ut=function(t){return at(this.__data__,t)>-1};var ht=function(t,e){var r=this.__data__,n=at(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ft(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=ot,ft.prototype.delete=st,ft.prototype.get=ct,ft.prototype.has=ut,ft.prototype.set=ht;var pt=ft,vt=q(d,"Map");var dt=function(){this.size=0,this.__data__={hash:new nt,map:new(vt||pt),string:new nt}};var gt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var yt=function(t,e){var r=t.__data__;return gt(e)?r["string"==typeof e?"string":"hash"]:r.map};var mt=function(t){var e=yt(this,t).delete(t);return this.size-=e?1:0,e};var wt=function(t){return yt(this,t).get(t)};var _t=function(t){return yt(this,t).has(t)};var bt=function(t,e){var r=yt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Et.prototype.clear=dt,Et.prototype.delete=mt,Et.prototype.get=wt,Et.prototype.has=_t,Et.prototype.set=bt;var xt=Et;function jt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(jt.Cache||xt),r}jt.Cache=xt;var Lt=jt;var Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tt=/\\(\\)?/g,St=function(t){var e=Lt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ot,(function(t,r,n,o){e.push(n?o.replace(Tt,"$1"):r||t)})),e}));var kt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},zt=g?g.prototype:void 0,Nt=zt?zt.toString:void 0;var Mt=function t(e){if("string"==typeof e)return e;if(f(e))return kt(e,t)+"";if(T(e))return Nt?Nt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var It=function(t){return null==t?"":Mt(t)};var Pt=function(t,e){return f(t)?t:z(t,e)?[t]:St(It(t))};var Ct=function(t){if("string"==typeof t||T(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Rt=function(t,e){for(var r=0,n=(e=Pt(e,t)).length;null!=t&&r<n;)t=t[Ct(e[r++])];return r&&r==n?t:void 0};var Ft=function(t,e,r){var n=null==t?void 0:Rt(t,e);return void 0===n?r:n},At=function(t){var e=function(t){return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16)}}(t);return.299*e.r+.587*e.g+.114*e.b},Dt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgba(255, 255, 255, 0)",e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):t};function $t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t["story-template"],r=void 0===e?"":e,n=t.metadata,o=void 0===n?{}:n;return"news-elsewhere"===r?Ft(o,["reference-url"],""):""}n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string});var Gt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"news-elsewhere"===Ft(t,["story-template"])?Ft(t,["metadata","reference-url"],""):t.url||e},Ht=function(e){var r=e.height,n=e.width,o=e.color,i=void 0===o?"#D8D8D8":o,a=e.positionTop;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 40 40",style:{position:"relative",top:a}},t.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},t.createElement("g",null,t.createElement("g",{transform:"translate(8 8)"},t.createElement("path",{d:"M0 0H24V24H0z"}),t.createElement("g",{fill:i,fillRule:"nonzero",transform:"translate(0 2)"},t.createElement("path",{d:"M21.043 19.553c0-.743-.601-1.344-1.344-1.344h-15.4a1.343 1.343 0 100 2.688h15.4c.743 0 1.344-.603 1.344-1.344zM1.598 8.673c.022 0 .042 0 .064-.003l2.131 7.713h16.411l2.132-7.713c.022 0 .041.003.063.003a1.599 1.599 0 10-1.52-1.108L17.025 9.82 12.882 2.95a1.599 1.599 0 10-1.765 0L6.976 9.82 3.121 7.565a1.599 1.599 0 10-1.523 1.107z"}))))))};Ht.propTypes={height:n.string,width:n.string,color:n.string,positionTop:n.string};var Vt=function(e){var r=e.height,n=e.width,o=e.color,i=void 0===o?"#D5D5D5":o,a=e.positionTop;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 40 40",style:{position:"relative",top:a}},t.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},t.createElement("g",null,t.createElement("g",{transform:"translate(8 8)"},t.createElement("path",{d:"M0 0H24V24H0z"}),t.createElement("path",{fill:i,fillRule:"nonzero",d:"M12.71 4.364A6.54 6.54 0 000 6.545a6.54 6.54 0 0012.71 2.182h4.745v4.364h4.363V8.727H24V4.364H12.71zM6.544 8.727a2.181 2.181 0 110-4.362 2.181 2.181 0 010 4.362z",transform:"translate(0 5)"})))))};Vt.propTypes={height:n.string,width:n.string,color:n.string,positionTop:n.string};var Bt=function(e){var r=e.height,n=e.width,o=e.color,i=void 0===o?"#D5D5D5":o,a=e.positionTop;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 40 40",style:{position:"relative",top:a}},t.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},t.createElement("g",null,t.createElement("g",{transform:"translate(8 8)"},t.createElement("path",{d:"M0 0H24V24H0z"}),t.createElement("g",{fill:i,fillRule:"nonzero",transform:"translate(3)"},t.createElement("path",{d:"M15.692 9h-.747V6c0-3.31-2.681-6-5.978-6C5.67 0 2.989 2.69 2.989 6v3h-.747A2.249 2.249 0 000 11.25v10.5A2.249 2.249 0 002.242 24h13.45a2.249 2.249 0 002.242-2.25v-10.5A2.249 2.249 0 0015.692 9zM4.982 6c0-2.206 1.787-4 3.985-4s3.985 1.794 3.985 4v3h-7.97V6z"}))))))};Bt.propTypes={height:n.string,width:n.string,color:n.string,positionTop:n.string};var Wt=function(e){var r=e.width,n=e.height,o=e.color,i=void 0===o?"#D5D5D5":o,a=e.positionTop,l=void 0===a?"":a;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:n,viewBox:"0 0 40 40",style:{position:"relative",top:l}},t.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},t.createElement("g",null,t.createElement("path",{fill:i,d:"M20 26L12.946577 29.7082039 14.2936609 21.854102 8.5873218 16.2917961 16.4732885 15.145898 20 8 23.5267115 15.145898 31.4126782 16.2917961 25.7063391 21.854102 27.053423 29.7082039z"}))))};Wt.propTypes={height:n.string,width:n.string,color:n.string,positionTop:n.string};var Yt=function(e){var r=e.width,n=e.height,o=e.color,i=e.iconType,a=e.positionTop;switch(i){case"crown":return t.createElement(Ht,{width:r,height:n,color:o,positionTop:a});case"lock":return t.createElement(Bt,{width:r,height:n,color:o,positionTop:a});case"key":return t.createElement(Vt,{width:r,height:n,color:o,positionTop:a});default:return t.createElement(Wt,{width:r,height:n,color:o,positionTop:a})}};function qt(){return t.createElement("svg",{className:"live-icon",xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24"},t.createElement("path",{fill:"#ff5858",d:"M12 18a6 6 0 110-12 6 6 0 010 12zm0 2.5a8.5 8.5 0 110-17 8.5 8.5 0 010 17zm0-1a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"}))}Yt.propTypes={width:n.string,height:n.string,color:n.string,iconType:n.string,positionTop:n.string};var Ut={"./headline.m.css":{wrapper:"headline-m_wrapper__3nUmh",headline:"headline-m_headline__3_NhV",dark:"headline-m_dark__en3hW",light:"headline-m_light__3lKJB"}},Jt=function(r){var n=r.story,a=r.headerLevel,l=r.premiumStoryIconConfig,s=void 0===l?{}:l,c=r.isLink,f=e(h)||{},p=s.iconColor,v=void 0===p?"#F7B500":p,d=s.iconStyle,g=void 0===d?"star":d,y=s.enablePremiumStoryIcon,m=void 0!==y&&y,w=s.showLiveIcon,_=void 0!==w&&w,b=i(n,["alternative","home","default","headline"]),E=m&&"subscription"===i(n,["access"]),x=b||n.headline,j="h"+a,L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"rgb(255,255,255)",e=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)?t:Dt(t);return At(e)<155?"light":"dark"}(f.theme),O=E?"wrapper":"",T="24px",S=_&&"live-blog"===n["story-template"]&&!i(n,["metadata","is-closed"],!1);return t.createElement("div",{"data-test-id":"headline",className:"arrow-component arr--headline "+u(O,Ut)},E&&t.createElement(Yt,{width:T,height:T,color:v,iconType:g,positionTop:function(){switch(parseInt(a)){case 1:return"-2px";case 2:return"2px";case 3:return"4px";case 4:return"5px";default:return"6px"}}()}),c?t.createElement(o,{href:Gt(n,"/".concat(n.slug)),externalLink:$t(n),"aria-label":"headline"},t.createElement(j,{className:u("headline ".concat(L),Ut)},S&&t.createElement(qt,null),x)):t.createElement(j,{className:u("headline ".concat(L),Ut)},S&&t.createElement(qt,null),x))};Jt.propTypes={story:n.object.isRequired,headerLevel:n.string,premiumStoryIconConfig:n.shape({iconColor:n.string,iconType:n.string,enablePremiumStoryIcon:n.bool}),isLink:n.bool},Jt.defaultProps={headerLevel:"6",isLink:!0};export{Jt as Headline};
@@ -0,0 +1 @@
1
+ import{Link as t,ResponsiveHeroImage as e}from"@quintype/components";import r from"lodash.get";import n from"prop-types";import o,{useContext as a,createContext as i}from"react";import{useSelector as l}from"react-redux";import"react-timeago";import"date-fns-tz";function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a=[],i=!0,l=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(t){l=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(t,e)||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.")}()}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function f(t){var e={exports:{}};return t(e,e.exports),e.exports}var p=f((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={attributeNames:{styleName:"className"},generateScopedName:"[path]___[name]__[local]___[hash:base64:5]",handleMissingStyleName:"throw"};e.default=r})),d=h(f((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,n=(r=p)&&r.__esModule?r:{default:r};var o=function(t,e){if("throw"===e)throw new Error(t);return"warn"===e&&console.warn(t),null};e.default=function(t,e,r){var a=Object.keys(e),i=r||{},l=i.handleMissingStyleName,c=void 0===l?n.default.handleMissingStyleName:l,u=i.autoResolveMultipleImports,s=void 0===u?n.default.autoResolveMultipleImports:u;return t?t.split(" ").filter((function(t){return t})).map((function(t){if(function(t){return-1!==t.indexOf(".")}(t))return function(t,e,r){var a=t.split("."),i=a[0],l=a[1],c=r||n.default.handleMissingStyleName;return l?e[i]?e[i][l]?e[i][l]:o("CSS module does not exist: "+l,c):o("CSS module import does not exist: "+i,c):o("Invalid style name: "+t,c)}(t,e,c);if(0===a.length)throw new Error("Cannot use styleName attribute for style name '"+t+"' without importing at least one stylesheet.");if(a.length>1){if(!s)throw new Error("Cannot use anonymous style name '"+t+"' with more than one stylesheet import without setting 'autoResolveMultipleImports' to true.");return function(t,e,r){var a=r||n.default.handleMissingStyleName,i=Object.keys(e).map((function(r){return e[r][t]&&r})).filter((function(t){return t}));if(i.length>1)throw new Error('Cannot resolve styleName "'+t+'" because it is present in multiple imports:\n\n\t'+i.join("\n\t")+'\n\nYou can resolve this by using a named import, e.g:\n\n\timport foo from "'+i[0]+'";\n\t<div styleName="foo.'+t+'" />\n\n');return 0===i.length?o("Could not resolve the styleName '"+t+"'.",a):e[i[0]][t]}(t,e,c)}var r=e[a[0]];return r[t]?r[t]:o("Could not resolve the styleName '"+t+"'.",c)})).filter((function(t){return t})).join(" "):""}})));f((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),i=new S(n||[]);return a._invoke=function(t,e,r){var n=h;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return C()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=x(i,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?d:f,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",m={};function v(){}function g(){}function y(){}var _={};c(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(N([])));w&&w!==r&&n.call(w,a)&&(_=w);var E=y.prototype=v.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,l){var c=s(t[o],t,a);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,l)}),(function(t){r("throw",t,i,l)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,l)}))}l(c.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function x(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:C}}function C(){return{value:e,done:!0}}return g.prototype=y,c(E,"constructor",y),c(y,"constructor",g),g.displayName=c(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},j(k.prototype),c(k.prototype,i,(function(){return this})),t.AsyncIterator=k,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new k(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return l.type="throw",l.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}));var m=Array.isArray,v="object"==typeof s&&s&&s.Object===Object&&s,g="object"==typeof self&&self&&self.Object===Object&&self,y=v||g||Function("return this")(),_=y.Symbol,b=Object.prototype,w=b.hasOwnProperty,E=b.toString,j=_?_.toStringTag:void 0;var k=function(t){var e=w.call(t,j),r=t[j];try{t[j]=void 0;var n=!0}catch(t){}var o=E.call(t);return n&&(e?t[j]=r:delete t[j]),o},x=Object.prototype.toString;var L=function(t){return x.call(t)},O=_?_.toStringTag:void 0;var S=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":O&&O in Object(t)?k(t):L(t)};var N=function(t){return null!=t&&"object"==typeof t};var C=function(t){return"symbol"==typeof t||N(t)&&"[object Symbol]"==S(t)},F=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/;var T=function(t,e){if(m(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!C(t))||(z.test(t)||!F.test(t)||null!=e&&t in Object(e))};var P=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var I,M=function(t){if(!P(t))return!1;var e=S(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},R=y["__core-js_shared__"],A=(I=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var G=function(t){return!!A&&A in t},W=Function.prototype.toString;var $=function(t){if(null!=t){try{return W.call(t)}catch(t){}try{return t+""}catch(t){}}return""},H=/^\[object .+?Constructor\]$/,B=Function.prototype,q=Object.prototype,U=B.toString,Y=q.hasOwnProperty,J=RegExp("^"+U.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var K=function(t){return!(!P(t)||G(t))&&(M(t)?J:H).test($(t))};var Z=function(t,e){return null==t?void 0:t[e]};var D=function(t,e){var r=Z(t,e);return K(r)?r:void 0},V=D(Object,"create");var Q=function(){this.__data__=V?V(null):{},this.size=0};var X=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},tt=Object.prototype.hasOwnProperty;var et=function(t){var e=this.__data__;if(V){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return tt.call(e,t)?e[t]:void 0},rt=Object.prototype.hasOwnProperty;var nt=function(t){var e=this.__data__;return V?void 0!==e[t]:rt.call(e,t)};var ot=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=V&&void 0===e?"__lodash_hash_undefined__":e,this};function at(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}at.prototype.clear=Q,at.prototype.delete=X,at.prototype.get=et,at.prototype.has=nt,at.prototype.set=ot;var it=at;var lt=function(){this.__data__=[],this.size=0};var ct=function(t,e){return t===e||t!=t&&e!=e};var ut=function(t,e){for(var r=t.length;r--;)if(ct(t[r][0],e))return r;return-1},st=Array.prototype.splice;var ht=function(t){var e=this.__data__,r=ut(e,t);return!(r<0)&&(r==e.length-1?e.pop():st.call(e,r,1),--this.size,!0)};var ft=function(t){var e=this.__data__,r=ut(e,t);return r<0?void 0:e[r][1]};var pt=function(t){return ut(this.__data__,t)>-1};var dt=function(t,e){var r=this.__data__,n=ut(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}mt.prototype.clear=lt,mt.prototype.delete=ht,mt.prototype.get=ft,mt.prototype.has=pt,mt.prototype.set=dt;var vt=mt,gt=D(y,"Map");var yt=function(){this.size=0,this.__data__={hash:new it,map:new(gt||vt),string:new it}};var _t=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var bt=function(t,e){var r=t.__data__;return _t(e)?r["string"==typeof e?"string":"hash"]:r.map};var wt=function(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e};var Et=function(t){return bt(this,t).get(t)};var jt=function(t){return bt(this,t).has(t)};var kt=function(t,e){var r=bt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function xt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}xt.prototype.clear=yt,xt.prototype.delete=wt,xt.prototype.get=Et,xt.prototype.has=jt,xt.prototype.set=kt;var Lt=xt;function Ot(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Ot.Cache||Lt),r}Ot.Cache=Lt;var St=Ot;var Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ct=/\\(\\)?/g,Ft=function(t){var e=St(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Nt,(function(t,r,n,o){e.push(n?o.replace(Ct,"$1"):r||t)})),e}));var zt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Tt=_?_.prototype:void 0,Pt=Tt?Tt.toString:void 0;var It=function t(e){if("string"==typeof e)return e;if(m(e))return zt(e,t)+"";if(C(e))return Pt?Pt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Mt=function(t){return null==t?"":It(t)};var Rt=function(t,e){return m(t)?t:T(t,e)?[t]:Ft(Mt(t))};var At=function(t){if("string"==typeof t||C(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Gt=function(t,e){for(var r=0,n=(e=Rt(e,t)).length;null!=t&&r<n;)t=t[At(e[r++])];return r&&r==n?t:void 0};var Wt=function(t,e,r){var n=null==t?void 0:Gt(t,e);return void 0===n?r:n},$t={mobile:767,tablet:1024};function Ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t["story-template"],r=void 0===e?"":e,n=t.metadata,o=void 0===n?{}:n;return"news-elsewhere"===r?Wt(o,["reference-url"],""):""}n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string});var Bt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"news-elsewhere"===Wt(t,["story-template"])?Wt(t,["metadata","reference-url"],""):t.url||e};var qt=i(),Ut=function(t){var e=t.width,r=void 0===e?40:e,n=t.height,a=void 0===n?30:n,i=t.iconColor,l=void 0===i?"#99B0CB":i;return o.createElement("svg",{width:r,height:a,viewBox:"0 0 102 76",version:"1.1"},o.createElement("g",{id:"demo-home-copy",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",transform:"translate(-377.000000, -314.000000)"},o.createElement("g",{id:"Group-13",transform:"translate(377.000000, 314.000000)"},o.createElement("path",{d:"M43.2,49.7 L62.2,19.2 L87.2,59.4 L17,59.4 L32.8,39.4 L43.2,49.7 Z M29.9,28.6 C25.8683213,28.6 22.6,25.3316787 22.6,21.3 C22.6,17.2683213 25.8683213,14 29.9,14 C33.9316787,14 37.2,17.2683213 37.2,21.3 C37.2,25.3316787 33.9316787,28.6 29.9,28.6 Z",id:"Combined-Shape",fill:l,fillRule:"nonzero"}),o.createElement("rect",{id:"Rectangle-19",stroke:l,strokeWidth:"3",x:"1.5",y:"1.5",width:"99",height:"73",rx:"3"}))))};Ut.propTypes={width:n.object,height:n.object,iconColor:n.object};var Yt=function(){return o.createElement("div",{className:"arr--fallback-image fallback-m_image__1GYCJ fallback-m_image-position__3KddP"},o.createElement("figure",{className:"arr--fallback-svg fallback-m_fallback-svg__tK9fL"},o.createElement(Ut,null)))},Jt=function(e){var r=e.slug;return r?o.createElement(t,{href:r,"aria-label":"image-fallback"},Yt()):Yt()};Jt.propTypes={slug:n.string};var Kt=function(){return o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"28"},o.createElement("g",{fill:"none",fillRule:"evenodd"},o.createElement("rect",{width:"36",height:"28",fill:"#3D6FCF",rx:"4"}),o.createElement("path",{stroke:"#FFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M22 14.667v4c0 .736-.597 1.333-1.333 1.333h-7.334A1.333 1.333 0 0112 18.667v-7.334c0-.736.597-1.333 1.333-1.333h4M20 8h4v4m-7.333 3.333L24 8"})))},Zt=function(e){var r=e.hyperLink,n=void 0===r?"":r;return n?o.createElement(t,{href:n,"aria-label":"hyperlink-button",className:"arr--hyperlink-button hyperlink-m_hyperlink-button__1CqWx",target:"_blank",rel:"noopener noreferrer"},o.createElement(Kt,null)):null};Zt.propTypes={hyperLink:n.string};var Dt={"./hero-image.m.css":{"hero-image":"hero-image-m_hero-image__3lraV","right-padding":"hero-image-m_right-padding__1LkCe","left-padding":"hero-image-m_left-padding__pYRAj","right-padding-mob":"hero-image-m_right-padding-mob__3-uOU",placeholder:"hero-image-m_placeholder__1omCm","hero-image-mob":"hero-image-m_hero-image-mob__13JJp","with-padding":"hero-image-m_with-padding__324G_",image:"hero-image-m_image__1mz0U"}},Vt=function(n){var i=n.story,c=n.FullBleed,s=n.aspectRatio,h=n.defaultWidth,f=n.widths,p=n.isHorizontal,m=n.isHorizontalMobile,v=n.isHorizontalWithImageLast,g=n.defaultFallback,y=n.isStoryPageImage,_=n.config,b=(a(qt)||{}).fallbackImageUrl,w=void 0===b?"":b,E=_.StoryTemplateIcon,j=void 0===E?function(){return null}:E,k=l((function(t){return r(t,["qt","config","showPlaceholder"])}))?"placeholder":"",x=c?"":"with-padding",L="hero-image";p?L="right-padding":v&&(L="left-padding");var O,S,N=m?"right-padding-mob":"",C=function(t){var e=u(t,2),r=e[0],n=e[1];return r>0&&n>0?n/r*100:0},F=u(s,2),z=F[0],T=F[1],P=void 0===T?z:T,I=!!(O=Wt($t,"mobile"))&&Wt(global,"document.documentElement.clientWidth")<=O,M=I?z:P,R=C(I?z:P),A=r(i,["hero-image-s3-key"])||r(i,["alternative","home","default","hero-image","hero-image-s3-key"]),G=r(i,["hero-image-hyperlink"],""),W=r(i,["hero-image-caption"],""),$=W?null!==(S=W)&&""!==S&&(S=S.toString()).replace(/(<([^>]+)>)/gi,""):r(i,["headline"],""),H=function(){return A?o.createElement(o.Fragment,null,o.createElement("figure",{style:{paddingTop:R+"%"},className:"arr--responsive-hero-image "+d("image ".concat(k),Dt)},o.createElement(j,{storyTemplate:i["story-template"]}),o.createElement(e,{story:i,aspectRatio:M,defaultWidth:h,widths:f,imgParams:{auto:["format","compress"],fit:"max"},alt:$})),y&&G&&o.createElement(Zt,{hyperLink:G})):w&&!y?o.createElement("figure",{style:{paddingTop:R+"%"},className:"arr--responsive-hero-image "+d("image ".concat(k),Dt)},o.createElement("img",{className:"qt-image","data-src":"".concat(w),alt:"image-fallback"})):o.createElement(o.Fragment,null,g?o.createElement("div",{"data-test-id":"arr--fallback-hero-image",style:{paddingTop:R+"%"},className:"arr--fallback-hero-image "+d("image ".concat(k),Dt)},o.createElement(j,{storyTemplate:i["story-template"]}),o.createElement(Jt,null)):null)};return i&&(y?o.createElement("div",{"data-test-id":"arr--hero-image",className:"arr--hero-image "+d("".concat(L," ").concat(x," ").concat(N),Dt)},H()):o.createElement(t,{"data-test-id":"arr--hero-image",href:Bt(i,"/".concat(i.slug)),externalLink:Ht(i),"aria-label":"fallback-hero-image",className:"arr--hero-image "+d("".concat(L," ").concat(x," ").concat(N),Dt)},H()))};Vt.propTypes={story:n.object.isRequired,FullBleed:n.bool,defaultWidth:n.number,widths:n.array,aspectRatio:n.array,isHorizontal:n.bool,isHorizontalMobile:n.bool,defaultFallback:n.bool,isHorizontalWithImageLast:n.bool,isStoryPageImage:n.bool,config:n.object},Vt.defaultProps={FullBleed:!0,aspectRatio:[[1,1],[16,9]],defaultWidth:480,widths:[250,480,640],isHorizontal:!1,isHorizontalMobile:!1,defaultFallback:!0,isStoryPageImage:!1,isHorizontalWithImageLast:!1,config:{}};export{Vt as HeroImage};