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

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 (81) hide show
  1. package/AlternateCollectionFilter/styles.arrow.css +1 -0
  2. package/AsideCollection/styles.arrow.css +1 -0
  3. package/AstrologyCollection/styles.arrow.css +1 -0
  4. package/AuthorIntroductionCard/styles.arrow.css +1 -0
  5. package/AuthorsList/styles.arrow.css +1 -0
  6. package/CollectionFilter/styles.arrow.css +1 -0
  7. package/ElevenStories/styles.arrow.css +1 -0
  8. package/FourColFiveStories/styles.arrow.css +1 -0
  9. package/FourColGrid/styles.arrow.css +1 -0
  10. package/FourColPortraitStories/styles.arrow.css +1 -0
  11. package/FourColSixteenStories/styles.arrow.css +1 -0
  12. package/FourColTwelveStories/styles.arrow.css +1 -0
  13. package/FourStorySlider/styles.arrow.css +1 -0
  14. package/FourStorySliderPortrait/styles.arrow.css +1 -0
  15. package/FourTabbedBigStorySlider/styles.arrow.css +1 -0
  16. package/FullScreenSlider/styles.arrow.css +1 -0
  17. package/HalfScreenSlider/styles.arrow.css +1 -0
  18. package/KeyEvents/styles.arrow.css +1 -0
  19. package/ListComponent/styles.arrow.css +1 -0
  20. package/ListicleStoryTemplate/styles.arrow.css +1 -0
  21. package/Listicles/styles.arrow.css +1 -0
  22. package/LiveBlogStoryTemplate/styles.arrow.css +1 -0
  23. package/MagazineEditions/styles.arrow.css +1 -0
  24. package/MagazineHeaderCard/styles.arrow.css +1 -0
  25. package/MagazineWidget/styles.arrow.css +1 -0
  26. package/OneColStoryList/styles.arrow.css +1 -0
  27. package/OpinionCollection/styles.arrow.css +1 -0
  28. package/PageIntroductionCard/styles.arrow.css +1 -0
  29. package/PhotoStoryTemplate/styles.arrow.css +1 -0
  30. package/PublishDetails/styles.arrow.css +1 -0
  31. package/README.md +202 -0
  32. package/SixColSixStories/styles.arrow.css +1 -0
  33. package/SocialShareTemplate/styles.arrow.css +1 -0
  34. package/StoryCard/styles.arrow.css +1 -0
  35. package/StoryCollection/styles.arrow.css +1 -0
  36. package/StoryElementCard/styles.arrow.css +1 -0
  37. package/StorycardContent/styles.arrow.css +1 -0
  38. package/TagIntroductionCard/styles.arrow.css +1 -0
  39. package/TextStoryTemplate/styles.arrow.css +1 -0
  40. package/ThreeColFlexStories/styles.arrow.css +1 -0
  41. package/ThreeColFourteenStories/styles.arrow.css +1 -0
  42. package/ThreeColGrid/styles.arrow.css +1 -0
  43. package/ThreeColSevenStory/styles.arrow.css +1 -0
  44. package/ThreeColSixStories/styles.arrow.css +1 -0
  45. package/ThreeColTwelveStories/styles.arrow.css +1 -0
  46. package/TwoColFourStories/styles.arrow.css +1 -0
  47. package/TwoColFourStoryHighlight/styles.arrow.css +1 -0
  48. package/TwoColSevenStories/styles.arrow.css +1 -0
  49. package/TwoColSixStories/styles.arrow.css +1 -0
  50. package/TwoColTenStoriesSidebar/styles.arrow.css +1 -0
  51. package/TwoColThreeStories/styles.arrow.css +1 -0
  52. package/VideoStoryTemplate/styles.arrow.css +1 -0
  53. package/app.scss +274 -0
  54. package/cjs/index.js +1 -0
  55. package/esm/index.js +1 -0
  56. package/package.json +1 -1
  57. package/AlsoRead/index.js +0 -1
  58. package/Attachment/index.js +0 -1
  59. package/Author/index.js +0 -1
  60. package/AuthorWithTime/index.js +0 -1
  61. package/BigFact/index.js +0 -1
  62. package/BlockQuote/index.js +0 -1
  63. package/Blurb/index.js +0 -1
  64. package/CollectionName/index.js +0 -1
  65. package/Headline/index.js +0 -1
  66. package/HeroImage/index.js +0 -1
  67. package/Image/index.js +0 -1
  68. package/ImageGallery/index.js +0 -1
  69. package/ImageSlideshow/index.js +0 -1
  70. package/LoadmoreButton/index.js +0 -1
  71. package/QuestionAnswer/index.js +0 -1
  72. package/Quote/index.js +0 -1
  73. package/Reference/index.js +0 -1
  74. package/ScrollSnap/index.js +0 -1
  75. package/SectionTag/index.js +0 -1
  76. package/StoryElement/index.js +0 -1
  77. package/Subheadline/index.js +0 -1
  78. package/Summary/index.js +0 -1
  79. package/Text/index.js +0 -1
  80. package/TimeStamp/index.js +0 -1
  81. package/Video/index.js +0 -1
@@ -1 +0,0 @@
1
- import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import o from"lodash.get";import"react-timeago";import"date-fns-tz";var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(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})),c=a(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||{},u=a.handleMissingStyleName,s=void 0===u?n.default.handleMissingStyleName:u,c=a.autoResolveMultipleImports,l=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],u=i[1],s=r||n.default.handleMissingStyleName;return u?e[a]?e[a][u]?e[a][u]:o("CSS module does not exist: "+u,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(!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,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(" "):""}}))),l=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",u=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 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===v){if("throw"===o)throw i;return z()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(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===h)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(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 l(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 y(){}function g(){}function m(){}var _={};s(_,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==r&&n.call(w,i)&&(_=w);var j=m.prototype=y.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,u){var s=l(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,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(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 S(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,S(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 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 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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(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 g.prototype=m,s(j,"constructor",m),s(m,"constructor",g),g.displayName=s(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,s(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(x.prototype),s(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(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(j),s(j,u,"Generator"),s(j,i,(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=C,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 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),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:C(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 h="object"==typeof i&&i&&i.Object===Object&&i,f="object"==typeof self&&self&&self.Object===Object&&self,p=h||f||Function("return this")(),v=p.Symbol,d=Object.prototype,y=d.hasOwnProperty,g=d.toString,m=v?v.toStringTag:void 0;var _=function(t){var e=y.call(t,m),r=t[m];try{t[m]=void 0;var n=!0}catch(t){}var o=g.call(t);return n&&(e?t[m]=r:delete t[m]),o},b=Object.prototype.toString;var w=function(t){return b.call(t)},j=v?v.toStringTag:void 0;var O=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":j&&j in Object(t)?_(t):w(t)};var x=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var S,E=function(t){if(!x(t))return!1;var e=O(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},L=p["__core-js_shared__"],N=(S=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"";var C=function(t){return!!N&&N in t},z=Function.prototype.toString;var k=function(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""},F=/^\[object .+?Constructor\]$/,P=Function.prototype,I=Object.prototype,T=P.toString,M=I.hasOwnProperty,A=RegExp("^"+T.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var G=function(t){return!(!x(t)||C(t))&&(E(t)?A:F).test(k(t))};var R=function(t,e){return null==t?void 0:t[e]};var $=function(t,e){var r=R(t,e);return G(r)?r:void 0},Y=$(Object,"create");var U=function(){this.__data__=Y?Y(null):{},this.size=0};var q=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},W=Object.prototype.hasOwnProperty;var B=function(t){var e=this.__data__;if(Y){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return W.call(e,t)?e[t]:void 0},D=Object.prototype.hasOwnProperty;var H=function(t){var e=this.__data__;return Y?void 0!==e[t]:D.call(e,t)};var J=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Y&&void 0===e?"__lodash_hash_undefined__":e,this};function K(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])}}K.prototype.clear=U,K.prototype.delete=q,K.prototype.get=B,K.prototype.has=H,K.prototype.set=J;var Q=K;var V=function(){this.__data__=[],this.size=0};var X=function(t,e){return t===e||t!=t&&e!=e};var Z=function(t,e){for(var r=t.length;r--;)if(X(t[r][0],e))return r;return-1},tt=Array.prototype.splice;var et=function(t){var e=this.__data__,r=Z(e,t);return!(r<0)&&(r==e.length-1?e.pop():tt.call(e,r,1),--this.size,!0)};var rt=function(t){var e=this.__data__,r=Z(e,t);return r<0?void 0:e[r][1]};var nt=function(t){return Z(this.__data__,t)>-1};var ot=function(t,e){var r=this.__data__,n=Z(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function it(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])}}it.prototype.clear=V,it.prototype.delete=et,it.prototype.get=rt,it.prototype.has=nt,it.prototype.set=ot;var at=it,ut=$(p,"Map");var st=function(){this.size=0,this.__data__={hash:new Q,map:new(ut||at),string:new Q}};var ct=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 ct(e)?r["string"==typeof e?"string":"hash"]:r.map};var ht=function(t){var e=lt(this,t).delete(t);return this.size-=e?1:0,e};var ft=function(t){return lt(this,t).get(t)};var pt=function(t){return lt(this,t).has(t)};var vt=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 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=st,dt.prototype.delete=ht,dt.prototype.get=ft,dt.prototype.has=pt,dt.prototype.set=vt;var yt=dt;function gt(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(gt.Cache||yt),r}gt.Cache=yt;var mt=gt;var _t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bt=/\\(\\)?/g;(function(t){var e=mt(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(_t,(function(t,r,n,o){e.push(n?o.replace(bt,"$1"):r||t)})),e}));var wt=v?v.prototype:void 0;wt&&wt.toString;var jt=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},Ot=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 xt={"./subheadline.m.css":{subheadline:"subheadline-m_subheadline__3fd7z",dark:"subheadline-m_dark__28u00",light:"subheadline-m_light__2YUOe"}},St=function(r){var n=r.story,i=r.truncateChars,a=void 0===i?200:i,u=r.lineClamp,s=r.clazzName,h=void 0===s?"":s,f=r.forceShowAtom,p=r.showFullContent,v=e(l)||{};if(!(f||o(v,["showSubheadline"],!0)))return null;var 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:Ot(t);return jt(e)<155?"light":"dark"}(v.theme);return t.createElement("div",{style:{WebkitLineClamp:u},"data-test-id":"subheadline",className:("p-alt arr--sub-headline arrow-component ".concat(h)?"p-alt arr--sub-headline arrow-component ".concat(h)+" ":"")+c("subheadline ".concat(d),xt)},p||"number"==typeof u?n.subheadline:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,r=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?"":" ...";return"string"==typeof t&&t.length>e?t.substring(0,e)+r:t}(n.subheadline,a,!0))};St.propTypes={story:n.object.isRequired,lineClamp:n.number,truncateChars:n.number,clazzName:n.string,forceShowAtom:n.bool,showFullContent:n.bool},St.defaultProps={forceShowAtom:!1,showFullContent:!1};export{St as Subheadline};
package/Summary/index.js DELETED
@@ -1 +0,0 @@
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 a(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 i="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 u(t){var e={exports:{}};return t(e,e.exports),e.exports}var c=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=s(u((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 a=Object.keys(e),i=r||{},s=i.handleMissingStyleName,u=void 0===s?n.default.handleMissingStyleName:s,c=i.autoResolveMultipleImports,l=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],s=a[1],u=r||n.default.handleMissingStyleName;return s?e[i]?e[i][s]?e[i][s]:o("CSS module does not exist: "+s,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(" "):""}}))),h=["element","render"],f=function(e){return function(r){var n=r.element,i=r.render,s=a(r,h);return n?i&&"function"==typeof i?i(r):t.createElement(e,o({},s,{element:n})):null}};f.propTypes={StoryElement:n.element},u((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",s=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 c(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,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===d){if("throw"===o)throw a;return P()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=E(i,r);if(s){if(s===y)continue;return s}}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=l(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,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=c;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",y={};function v(){}function m(){}function g(){}var _={};u(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(k([])));w&&w!==r&&n.call(w,a)&&(_=w);var O=g.prototype=v.prototype=Object.create(_);function j(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,s){var u=l(t[o],t,a);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(h).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(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 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 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,y):a:(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 k(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:P}}function P(){return{value:e,done:!0}}return m.prototype=g,u(O,"constructor",g),u(g,"constructor",m),m.displayName=u(g,s,"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,s,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},j(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(c(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"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 s.type="throw",s.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],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){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(!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,y):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),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:k(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 p="object"==typeof i&&i&&i.Object===Object&&i,d="object"==typeof self&&self&&self.Object===Object&&self,y=p||d||Function("return this")(),v=y.Symbol,m=Object.prototype,g=m.hasOwnProperty,_=m.toString,b=v?v.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},O=Object.prototype.toString;var j=function(t){return O.call(t)},x=v?v.toStringTag:void 0;var E=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?w(t):j(t)};var S=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var L,N=function(t){if(!S(t))return!1;var e=E(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},k=y["__core-js_shared__"],P=(L=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var C=function(t){return!!P&&P in t},I=Function.prototype.toString;var T=function(t){if(null!=t){try{return I.call(t)}catch(t){}try{return t+""}catch(t){}}return""},M=/^\[object .+?Constructor\]$/,z=Function.prototype,F=Object.prototype,G=z.toString,R=F.hasOwnProperty,$=RegExp("^"+G.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var A=function(t){return!(!S(t)||C(t))&&(N(t)?$:M).test(T(t))};var H=function(t,e){return null==t?void 0:t[e]};var Y=function(t,e){var r=H(t,e);return A(r)?r:void 0},B=Y(Object,"create");var U=function(){this.__data__=B?B(null):{},this.size=0};var J=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},K=Object.prototype.hasOwnProperty;var V=function(t){var e=this.__data__;if(B){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return K.call(e,t)?e[t]:void 0},Z=Object.prototype.hasOwnProperty;var q=function(t){var e=this.__data__;return B?void 0!==e[t]:Z.call(e,t)};var D=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=B&&void 0===e?"__lodash_hash_undefined__":e,this};function Q(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])}}Q.prototype.clear=U,Q.prototype.delete=J,Q.prototype.get=V,Q.prototype.has=q,Q.prototype.set=D;var W=Q;var X=function(){this.__data__=[],this.size=0};var tt=function(t,e){return t===e||t!=t&&e!=e};var et=function(t,e){for(var r=t.length;r--;)if(tt(t[r][0],e))return r;return-1},rt=Array.prototype.splice;var nt=function(t){var e=this.__data__,r=et(e,t);return!(r<0)&&(r==e.length-1?e.pop():rt.call(e,r,1),--this.size,!0)};var ot=function(t){var e=this.__data__,r=et(e,t);return r<0?void 0:e[r][1]};var at=function(t){return et(this.__data__,t)>-1};var it=function(t,e){var r=this.__data__,n=et(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=X,st.prototype.delete=nt,st.prototype.get=ot,st.prototype.has=at,st.prototype.set=it;var ut=st,ct=Y(y,"Map");var lt=function(){this.size=0,this.__data__={hash:new W,map:new(ct||ut),string:new W}};var ht=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ft=function(t,e){var r=t.__data__;return ht(e)?r["string"==typeof e?"string":"hash"]:r.map};var pt=function(t){var e=ft(this,t).delete(t);return this.size-=e?1:0,e};var dt=function(t){return ft(this,t).get(t)};var yt=function(t){return ft(this,t).has(t)};var vt=function(t,e){var r=ft(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=lt,mt.prototype.delete=pt,mt.prototype.get=dt,mt.prototype.has=yt,mt.prototype.set=vt;var gt=mt;function _t(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(_t.Cache||gt),r}_t.Cache=gt;var bt=_t;var wt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ot=/\\(\\)?/g;(function(t){var e=bt(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(wt,(function(t,r,n,o){e.push(n?o.replace(Ot,"$1"):r||t)})),e}));var jt=v?v.prototype:void 0;jt&&jt.toString;var xt=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},Et=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},St=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:Et(t),n=xt(r)<155?"light":"dark";return n},Lt=n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),Nt=n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string}),kt=r(),Pt=["element","template","opts","css","story","config","render"],Ct={"./summary.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",headline:"summary-m_headline__30sie",summary:"summary-m_summary__3-CnO",content:"summary-m_content__37n8C","summary-header":"summary-m_summary-header__UKVHi","summary-border":"summary-m_summary-border__M9hrr",dark:"summary-m_dark__1ZuzR",light:"summary-m_light__2SYiC","heading-wrapper":"summary-m_heading-wrapper__23S51","content-border":"summary-m_content-border__3ilmJ"}},It=function(r){var n=r.element,i=r.template,s=void 0===i?"":i,u=r.opts,c=void 0===u?{}:u,h=r.css,f=void 0===h?{}:h;r.story,r.config,r.render;var p=a(r,Pt),d=e(kt)||{},y=St(d.theme),v=n.text;if(!v)return null;var m=f.headerBgColor,g=c.isExternalLink,_=void 0===g||g,b=c.headline,w=void 0===b?"Summary":b,O=c.hideHeadline,j=void 0!==O&&O,x=_&&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}(v)||v,E=["header","border"].includes(s)?"summary-".concat(s):"summary",S=j?"content-border":"",L="header"===s||"border"===s,N=L?"".concat(m):"",k=L?St(m):"",P="header"===s?"":y;return t.createElement("div",o({"data-test-id":"summary"},p,{className:"arrow-component arr--summary-element arr-custom-style "+l(E,Ct)+" "+(p&&p.className||"")}),!j&&t.createElement("div",{"data-test-id":"summary-headline",className:l("heading-wrapper ".concat(y),Ct)},t.createElement("div",{style:{backgroundColor:N},className:l("headline ".concat(k," ").concat(y),Ct)},w)),t.createElement("div",{dangerouslySetInnerHTML:{__html:x},className:l("content ".concat(S," ").concat(P," ").concat(y),Ct)}))};It.propTypes={element:n.shape({text:n.string}),template:n.string,opts:n.shape({isExternalLink:n.bool,headline:n.string,hideHeadline:n.bool}),story:Nt,config:Lt,render:n.func,css:n.shape({headerBgColor:n.string})};var Tt=f(It);export{Tt as Summary};
package/Text/index.js DELETED
@@ -1 +0,0 @@
1
- import t,{useContext as e,createContext as r}from"react";import n from"prop-types";import o from"lodash.get";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 s="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 c(t){var e={exports:{}};return t(e,e.exports),e.exports}var l=c((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=u(c((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 i=Object.keys(e),a=r||{},s=a.handleMissingStyleName,u=void 0===s?n.default.handleMissingStyleName:s,c=a.autoResolveMultipleImports,l=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],s=i[1],u=r||n.default.handleMissingStyleName;return s?e[a]?e[a][s]?e[a][s]:o("CSS module does not exist: "+s,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(" "):""}}))),h=["element","render"],p=function(e){return function(r){var n=r.element,o=r.render,s=a(r,h);return n?o&&"function"==typeof o?o(r):t.createElement(e,i({},s,{element:n})):null}};p.propTypes={StoryElement:n.element},c((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",s=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 c(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 P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===y)continue;return s}}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=c;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(k([])));w&&w!==r&&n.call(w,i)&&(_=w);var x=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 j(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(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 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:P}}function P(){return{value:e,done:!0}}return g.prototype=m,u(x,"constructor",m),u(m,"constructor",g),g.displayName=u(m,s,"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,s,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},O(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(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(x),u(x,s,"Generator"),u(x,i,(function(){return this})),u(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=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 s.type="throw",s.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],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){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(!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,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:k(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 s&&s&&s.Object===Object&&s,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 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},O=Object.prototype.toString;var j=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)?x(t):j(t)};var L=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var N,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},P=d["__core-js_shared__"],M=(N=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var T=function(t){return!!M&&M in t},C=Function.prototype.toString;var I=function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""},F=/^\[object .+?Constructor\]$/,z=Function.prototype,G=Object.prototype,R=z.toString,$=G.hasOwnProperty,A=RegExp("^"+R.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Y=function(t){return!(!L(t)||T(t))&&(k(t)?A:F).test(I(t))};var U=function(t,e){return null==t?void 0:t[e]};var H=function(t,e){var r=U(t,e);return Y(r)?r:void 0},Q=H(Object,"create");var q=function(){this.__data__=Q?Q(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 J=function(t){var e=this.__data__;if(Q){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return D.call(e,t)?e[t]:void 0},K=Object.prototype.hasOwnProperty;var V=function(t){var e=this.__data__;return Q?void 0!==e[t]:K.call(e,t)};var W=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Q&&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=q,X.prototype.delete=B,X.prototype.get=J,X.prototype.has=V,X.prototype.set=W;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 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 st=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=st;var ct=ut,lt=H(d,"Map");var ft=function(){this.size=0,this.__data__={hash:new Z,map:new(lt||ct),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 xt=/[^.[\]]+|\[(?:(-?\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(xt,(function(t,r,n,o){e.push(n?o.replace(Ot,"$1"):r||t)})),e}));var jt=g?g.prototype:void 0;jt&&jt.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},Lt=n.shape({"sketches-host":n.string,"cdn-name":n.string,"cdn-image":n.string}),Nt=n.shape({headline:n.string,"last-published-at":n.number,subheadline:n.string}),kt=r(),Pt=["element","opts","css","story","config"],Mt={"./text.m.css":{viewports:'"../../../../../assets/stylesheets/viewports.m.css"',mobile:"768px",promotionalMessage:"text-m_promotionalMessage__CUsPM",textElement:"text-m_textElement__e3QEt",dark:"text-m_dark__1TC18",light:"text-m_light__2cRe8"}},Tt=function(r){var n=r.element,s=void 0===n?{}:n,u=r.opts,c=void 0===u?{}:u,l=r.css,h=void 0===l?{}:l;r.story,r.config;var p=a(r,Pt),v=s.text;if(!v)return null;var y=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(kt)||{}).theme),d=h.textColor,g=c.isExternalLink,m=(void 0===g||g)&&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}(v)||v,_=o(s,["metadata","promotional-message"],!1),b=_?"promotionalMessage":"textElement";return t.createElement("div",i({style:_?{}:{color:d},"data-test-id":_?"promotional-message":"text",dangerouslySetInnerHTML:{__html:m},id:"text-element"},p,{className:"arrow-component arr--text-element "+f("".concat(b," ").concat(y),Mt)+" "+(p&&p.className||"")}))};Tt.propTypes={element:n.shape({text:n.string}),opts:n.shape({isExternalLink:n.bool}),css:n.shape({hyperlinkColor:n.string,textColor:n.string}),story:Nt,config:Lt};var Ct=p(Tt);export{Ct as Text};
@@ -1 +0,0 @@
1
- import t,{useContext as e,createContext as r}from"react";import n from"lodash.get";import{useSelector as o}from"react-redux";import i from"prop-types";import a from"react-timeago";import{utcToZonedTime as u,format as c}from"date-fns-tz";var l="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 f(t){var e={exports:{}};return t(e,e.exports),e.exports}var h=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})),p=s(f((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 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=r();f((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 m?e:m,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===d){if("throw"===o)throw i;return z()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=O(a,r);if(u){if(u===v)continue;return u}}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 c=s(t,e,r);if("normal"===c.type){if(n=r.done?d:h,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,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",d="completed",v={};function m(){}function y(){}function g(){}var _={};c(_,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==r&&n.call(x,i)&&(_=x);var w=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,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 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 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 T(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=g,c(w,"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(w),t},t.awrap=function(t){return{__await:t}},j(E.prototype),c(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(w),c(w,u,"Generator"),c(w,i,(function(){return this})),c(w,"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=T,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 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,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),S(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;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(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 v=Array.isArray,m="object"==typeof l&&l&&l.Object===Object&&l,y="object"==typeof self&&self&&self.Object===Object&&self,g=m||y||Function("return this")(),_=g.Symbol,b=Object.prototype,x=b.hasOwnProperty,w=b.toString,j=_?_.toStringTag:void 0;var E=function(t){var e=x.call(t,j),r=t[j];try{t[j]=void 0;var n=!0}catch(t){}var o=w.call(t);return n&&(e?t[j]=r:delete t[j]),o},O=Object.prototype.toString;var L=function(t){return O.call(t)},S=_?_.toStringTag:void 0;var N=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":S&&S in Object(t)?E(t):L(t)};var T=function(t){return null!=t&&"object"==typeof t};var z=function(t){return"symbol"==typeof t||T(t)&&"[object Symbol]"==N(t)},A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/;var M=function(t,e){if(v(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!z(t))||(I.test(t)||!A.test(t)||null!=e&&t in Object(e))};var k=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var C,P=function(t){if(!k(t))return!1;var e=N(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},F=g["__core-js_shared__"],R=(C=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"";var Z=function(t){return!!R&&R in t},G=Function.prototype.toString;var U=function(t){if(null!=t){try{return G.call(t)}catch(t){}try{return t+""}catch(t){}}return""},$=/^\[object .+?Constructor\]$/,D=Function.prototype,Y=Object.prototype,H=D.toString,J=Y.hasOwnProperty,X=RegExp("^"+H.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var q=function(t){return!(!k(t)||Z(t))&&(P(t)?X:$).test(U(t))};var B=function(t,e){return null==t?void 0:t[e]};var V=function(t,e){var r=B(t,e);return q(r)?r:void 0},K=V(Object,"create");var Q=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},tt=Object.prototype.hasOwnProperty;var et=function(t){var e=this.__data__;if(K){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 K?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]=K&&void 0===e?"__lodash_hash_undefined__":e,this};function it(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])}}it.prototype.clear=Q,it.prototype.delete=W,it.prototype.get=et,it.prototype.has=nt,it.prototype.set=ot;var at=it;var ut=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},st=Array.prototype.splice;var ft=function(t){var e=this.__data__,r=lt(e,t);return!(r<0)&&(r==e.length-1?e.pop():st.call(e,r,1),--this.size,!0)};var ht=function(t){var e=this.__data__,r=lt(e,t);return r<0?void 0:e[r][1]};var pt=function(t){return lt(this.__data__,t)>-1};var dt=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 vt(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])}}vt.prototype.clear=ut,vt.prototype.delete=ft,vt.prototype.get=ht,vt.prototype.has=pt,vt.prototype.set=dt;var mt=vt,yt=V(g,"Map");var gt=function(){this.size=0,this.__data__={hash:new at,map:new(yt||mt),string:new at}};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 xt=function(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e};var wt=function(t){return bt(this,t).get(t)};var jt=function(t){return bt(this,t).has(t)};var Et=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 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=gt,Ot.prototype.delete=xt,Ot.prototype.get=wt,Ot.prototype.has=jt,Ot.prototype.set=Et;var Lt=Ot;function St(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(St.Cache||Lt),r}St.Cache=Lt;var Nt=St;var Tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/\\(\\)?/g,At=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(Tt,(function(t,r,n,o){e.push(n?o.replace(zt,"$1"):r||t)})),e}));var It=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},Mt=_?_.prototype:void 0,kt=Mt?Mt.toString:void 0;var Ct=function t(e){if("string"==typeof e)return e;if(v(e))return It(e,t)+"";if(z(e))return kt?kt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Pt=function(t){return null==t?"":Ct(t)};var Ft=function(t,e){return v(t)?t:M(t,e)?[t]:At(Pt(t))};var Rt=function(t){if("string"==typeof t||z(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=Ft(e,t)).length;null!=t&&r<n;)t=t[Rt(e[r++])];return r&&r==n?t:void 0};var Gt=function(t,e,r){var n=null==t?void 0:Zt(t,e);return void 0===n?r:n};var Ut=function(t,e,r,n){var o=-1,i=null==t?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r};var $t=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"}),Dt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Ht=function(t){return(t=Pt(t))&&t.replace(Dt,$t).replace(Yt,"")},Jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Xt=function(t){return t.match(Jt)||[]},qt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Bt=function(t){return qt.test(t)},Vt="\\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",Kt="["+Vt+"]",Qt="\\d+",Wt="[\\u2700-\\u27bf]",te="[a-z\\xdf-\\xf6\\xf8-\\xff]",ee="[^\\ud800-\\udfff"+Vt+Qt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",re="(?:\\ud83c[\\udde6-\\uddff]){2}",ne="[\\ud800-\\udbff][\\udc00-\\udfff]",oe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ie="(?:"+te+"|"+ee+")",ae="(?:"+oe+"|"+ee+")",ue="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ce="[\\ufe0e\\ufe0f]?"+ue+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",re,ne].join("|")+")[\\ufe0e\\ufe0f]?"+ue+")*"),le="(?:"+[Wt,re,ne].join("|")+")"+ce,se=RegExp([oe+"?"+te+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Kt,oe,"$"].join("|")+")",ae+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Kt,oe+ie,"$"].join("|")+")",oe+"?"+ie+"+(?:['’](?:d|ll|m|re|s|t|ve))?",oe+"+(?:['’](?: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_])",Qt,le].join("|"),"g");var fe=function(t){return t.match(se)||[]};var he=function(t,e,r){return t=Pt(t),void 0===(e=r?void 0:e)?Bt(t)?fe(t):Xt(t):t.match(e)||[]},pe=RegExp("['’]","g");var de=function(t){return function(e){return Ut(he(Ht(e).replace(pe,"")),t,"")}},ve=de((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),me=de((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),ye=function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"en",a=o.showTime,u=void 0!==a&&a,c=o.isTimeFirst,l=void 0!==c&&c,s=o.isUpperCase,f=void 0!==s&&s,h=o.disableMeridiem,p=void 0!==h&&h,d=o.timeFormat,v=void 0===d?"12hours":d,m=o.localizedZeroToPad,y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],g=new Date(n),_=g.getDate().toString().padStart(2,0),b=y[g.getMonth()],x=b;f&&(x=ve(b));var w,j=g.getFullYear(),E=o.localizedMeridiem,O=o.localizedMonths,L=o.direction,S=void 0===L?"ltr":L,N=_e(n,v,m,i),T=N;O&&(x=Gt(O,[me(b)])||b);var z=Number(_).toLocaleString(i),A=j.toLocaleString(i).replace(/,/g,"");if(E){var I=N.includes("am"),M=E.am,k=void 0===M?"am":M,C=E.pm,P=void 0===C?"pm":C;T=(I?N.replace("am",k):N.replace("pm",P))||N}return"rtl"===S?(w=u?"".concat(T):"","".concat(z," ").concat(x,", ").concat(A," ").concat(w," ")):p?"".concat(x," ").concat(z,", ").concat(A):l?"".concat(T,", ").concat(z," ").concat(x," ").concat(A):(w=u?", ".concat(T):"","".concat(z," ").concat(x,", ").concat(A).concat(w))};function ge(t,e,r,n,o,i){var a,u=Gt(o,["localizedPublishTime",r])||r;return"hour"===e&&t>23||-1!==["day","week","month","year"].indexOf(e)?ye(t,e,r,n,o,i):t>1?(a=Gt(o,["localizedPublishTime","".concat(e,"s")])||"".concat(e,"s"),"".concat(t.toLocaleString(i)," ").concat(a," ").concat(u)):(a=Gt(o,["localizedPublishTime",e])||e,"".concat(t.toLocaleString(i)," ").concat(a," ").concat(u," "))}function _e(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),i=o.getHours(),a=o.getMinutes(),u=i>=12?"pm":"am";i=(i%=12)||12;var c="en"===n?"0":r;a=a<10?c+a.toLocaleString(n):a.toLocaleString(n);var l=i.toLocaleString(n)+":"+a+" "+u.toLocaleString(n);return"24hours"===e?o.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):l}var be=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},xe=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};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 we={"./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"}},je=function(r){var i=r.story,l=r.isBottom,s=r.config,f=void 0===s?{}:s,h=e(d)||{},v=n(f,["showTime"],n(h,["showTime"],!0)),m=i["last-published-at"]||i["first-published-at"],y=l?"bottom-fix":"",g=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:xe(t);return be(e)<155?"light":"dark"}(h.theme),_=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,v&&t.createElement("div",{"data-test-id":"publish-time",className:"time arr--publish-time "+p("time ".concat(g," ").concat(y),we)},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,i=arguments.length>4?arguments[4]:void 0,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(l&&"story"===i){var s=l&&u(e,l),f=s&&c(s,"yyyy-MM-dd'T'HH:mm:ssXXX",{timeZone:l}),h=ye("","","",e,n);return t.createElement("time",{dateTime:f},h)}return t.createElement(a,{date:e,formatter:function(t,e,i,a){return r(t,e,i,a,n,o)}})}(m,ge,f,_))))};je.propTypes={story:i.object,isBottom:i.bool,config:i.object,languageCode:i.string};export{je as TimeStamp};
package/Video/index.js DELETED
@@ -1 +0,0 @@
1
- import t from"react";import{StoryElement as r}from"@quintype/components";import e from"prop-types";import"react-timeago";import"date-fns-tz";function n(){return n=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},n.apply(this,arguments)}function o(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||(o[e]=t[e]);return o}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}var i=["element","render"],a=function(r){return function(e){var a=e.element,c=e.render,u=o(e,i);return a?c&&"function"==typeof c?c(e):t.createElement(r,n({},u,{element:a})):null}};a.propTypes={StoryElement:e.element};var c,u,s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};c=function(t){var r=function(t){var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,r,e){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 T()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=E(a,e);if(c){if(c===y)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var u=l(t,r,e);if("normal"===u.type){if(n=e.done?v:h,u.arg===y)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=v,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}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!==e&&n.call(w,i)&&(_=w);var O=m.prototype=d.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function x(t,r){function e(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")?r.resolve(f.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return e("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}}function E(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,E(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:T}}function T(){return{value:r,done:!0}}return g.prototype=m,u(O,"constructor",m),u(m,"constructor",g),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},j(x.prototype),u(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),u(O,c,"Generator"),u(O,i,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!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,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,r){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&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),y}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},c(u={exports:{}},u.exports);var l="object"==typeof s&&s&&s.Object===Object&&s,f="object"==typeof self&&self&&self.Object===Object&&self,h=l||f||Function("return this")(),p=h.Symbol,v=Object.prototype,y=v.hasOwnProperty,d=v.toString,g=p?p.toStringTag:void 0;var m=function(t){var r=y.call(t,g),e=t[g];try{t[g]=void 0;var n=!0}catch(t){}var o=d.call(t);return n&&(r?t[g]=e:delete t[g]),o},_=Object.prototype.toString;var b=function(t){return _.call(t)},w=p?p.toStringTag:void 0;var O=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?m(t):b(t)};var j=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)};var x,E=function(t){if(!j(t))return!1;var r=O(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},L=h["__core-js_shared__"],S=(x=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"";var k=function(t){return!!S&&S in t},P=Function.prototype.toString;var T=function(t){if(null!=t){try{return P.call(t)}catch(t){}try{return t+""}catch(t){}}return""},z=/^\[object .+?Constructor\]$/,F=Function.prototype,N=Object.prototype,I=F.toString,G=N.hasOwnProperty,C=RegExp("^"+I.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var $=function(t){return!(!j(t)||k(t))&&(E(t)?C:z).test(T(t))};var A=function(t,r){return null==t?void 0:t[r]};var R=function(t,r){var e=A(t,r);return $(e)?e:void 0},Y=R(Object,"create");var M=function(){this.__data__=Y?Y(null):{},this.size=0};var q=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},U=Object.prototype.hasOwnProperty;var W=function(t){var r=this.__data__;if(Y){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return U.call(r,t)?r[t]:void 0},B=Object.prototype.hasOwnProperty;var D=function(t){var r=this.__data__;return Y?void 0!==r[t]:B.call(r,t)};var H=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Y&&void 0===r?"__lodash_hash_undefined__":r,this};function J(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}J.prototype.clear=M,J.prototype.delete=q,J.prototype.get=W,J.prototype.has=D,J.prototype.set=H;var K=J;var Q=function(){this.__data__=[],this.size=0};var V=function(t,r){return t===r||t!=t&&r!=r};var X=function(t,r){for(var e=t.length;e--;)if(V(t[e][0],r))return e;return-1},Z=Array.prototype.splice;var tt=function(t){var r=this.__data__,e=X(r,t);return!(e<0)&&(e==r.length-1?r.pop():Z.call(r,e,1),--this.size,!0)};var rt=function(t){var r=this.__data__,e=X(r,t);return e<0?void 0:r[e][1]};var et=function(t){return X(this.__data__,t)>-1};var nt=function(t,r){var e=this.__data__,n=X(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function ot(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}ot.prototype.clear=Q,ot.prototype.delete=tt,ot.prototype.get=rt,ot.prototype.has=et,ot.prototype.set=nt;var it=ot,at=R(h,"Map");var ct=function(){this.size=0,this.__data__={hash:new K,map:new(at||it),string:new K}};var ut=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t};var st=function(t,r){var e=t.__data__;return ut(r)?e["string"==typeof r?"string":"hash"]:e.map};var lt=function(t){var r=st(this,t).delete(t);return this.size-=r?1:0,r};var ft=function(t){return st(this,t).get(t)};var ht=function(t){return st(this,t).has(t)};var pt=function(t,r){var e=st(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function vt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}vt.prototype.clear=ct,vt.prototype.delete=lt,vt.prototype.get=ft,vt.prototype.has=ht,vt.prototype.set=pt;var yt=vt;function dt(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,o=r?r.apply(this,n):n[0],i=e.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return e.cache=i.set(o,a)||i,a};return e.cache=new(dt.Cache||yt),e}dt.Cache=yt;var gt=dt;var mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_t=/\\(\\)?/g;(function(t){var r=gt(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache})((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(mt,(function(t,e,n,o){r.push(n?o.replace(_t,"$1"):e||t)})),r}));var bt=p?p.prototype:void 0;bt&&bt.toString;var wt=e.shape({"sketches-host":e.string,"cdn-name":e.string,"cdn-image":e.string}),Ot=e.shape({headline:e.string,"last-published-at":e.number,subheadline:e.string}),jt=["element","story","config","loadIframeOnClick"],xt=function(e){var i=e.element;e.story,e.config;var a=e.loadIframeOnClick,c=void 0!==a&&a,u=o(e,jt);return t.createElement("div",n({className:"video-m_container__MYuWI "+(u&&u.className||"")},u,{"data-test-id":"video"}),t.createElement(r,{element:i,loadIframeOnClick:c}))};xt.propTypes={element:e.object,story:Ot,config:wt,loadIframeOnClick:e.bool};var Et=a(xt);export{Et as Video};