@ampproject/amp-facebook
Advanced tools
Comparing version 1.2107302322.0 to 1.2107302322.1
@@ -1,3 +0,3 @@ | ||
var Or=Object.create,ne=Object.defineProperty,_r=Object.getOwnPropertyDescriptor,Pr=Object.getOwnPropertyNames,Fr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty,De=function(e){return ne(e,"__esModule",{value:!0})},Nr=function(e,r){for(var t in De(e),r)ne(e,t,{get:r[t],enumerable:!0})},Ir=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Pr(r),a=0,i=o.length;a<i;a++)n=o[a],!Rr.call(e,n)&&"default"!==n&&ne(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=_r(r,n))||t.enumerable});return e},oe=function(e){return Ir(De(ne(null!=e?Or(Fr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Nr(exports,{Facebook:function(){return Er}});var $=oe(require("preact")),Te=oe(require("preact")),p=oe(require("preact/hooks"));function g(e,r,t){return $.createElement.apply(void 0,arguments)}function Me(e){return $.createContext(e,void 0)}function z(e){return p.useState(e)}function j(e){return p.useRef(e)}function ie(e,r){p.useEffect(e,r)}function U(e,r){p.useLayoutEffect(e,r)}function Ce(e){return p.useContext(e)}function ve(e,r){return p.useMemo(e,r)}function ae(e,r){return p.useCallback(e,r)}function K(e,r,t){return p.useImperativeHandle(e,r,t)}var de=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},ge=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function Le(){var e=0;return function(){return String(++e)}}var je=Object.prototype,Xt=je.hasOwnProperty,qt=je.toString;function Y(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function w(e){return e||{}}function Ue(e){return e.replace("-","_")}function ke(e,r,t){return"number"!=typeof t&&(t=0),!(t+r.length>e.length)&&-1!==e.indexOf(r,t)}var X,ue=oe(require("preact/compat"));function F(e){return ue.forwardRef(e)}function se(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},wr=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Be=(se(X={},x.AUTO,0),se(X,x.LAZY,1),se(X,x.EAGER,2),se(X,x.UNLOAD,3),X);function He(e,r){var t=Be[e]||0,n=Be[r]||0,o=Math.max(t,n);return wr[o]}var Z={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},Dr=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ve(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function D(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ve(Object(t),!0).forEach((function(r){Tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ve(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Tr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Mr(e,r){if(null==e)return{};var t,n,o=Cr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Cr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Lr=[null,"paint","layout","content","size","size paint","size layout","strict"],jr={position:"relative",width:"100%",height:"100%"};function Ur(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,p=e.layout,y=void 0!==p&&p,d=e.paint,b=void 0!==d&&d,O=e.size,m=void 0!==O&&O,v=e.style,h=e.wrapperClassName,w=e.wrapperStyle,j=(m?4:0)+(y?2:0)+(b?1:0);return g(n,D(D({},Mr(e,Dr)),{},{ref:r,className:"".concat(a||""," ").concat(h||"").trim()||null,style:D(D(D({},v),w),{},{contain:Lr[j]})}),g(c,D(D({},u),{},{ref:s,className:l,style:D(D({},m&&jr),{},{overflow:b?"hidden":"visible"},f)}),o))}var ye=F(Ur),kr=["as","children","className","style","wrapperClassName","wrapperStyle"];function Ge(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ce(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ge(Object(t),!0).forEach((function(r){Br(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ge(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Br(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Hr(e,r){if(null==e)return{};var t,n,o=Vr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Vr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Gr(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return g(n,ce(ce({},Hr(e,kr)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:ce(ce({},i),l)}),o)}var We,Wr=F(Gr);function he(e){var r=j(null);return r.current=e,r}function $r(){return We||(We=Me({renderable:!0,playable:!0,loading:x.AUTO}))}function xe(){return Ce($r())}function $e(e){return He(e,xe().loading)}var zr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ze(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function le(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ze(Object(t),!0).forEach((function(r){Xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ze(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qr(e,r){if(null==e)return{};var t,n,o=Jr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Jr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Kr=function(){return!1},Yr="about:blank",Zr=function(e){return e&&e!=Yr&&!e.includes("#")};function Qr(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?Kr:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,y=e.loading,d=e.onReadyState,b=e.sandbox,O=e.src,m=qr(e,zr),v=xe().playable,h=$e(y),w=h!==x.UNLOAD,P=j(!1),_=he(d),S=ae((function(e){if(e!==P.current){P.current=e;var r=_.current;null==r||r(e?Z.COMPLETE:Z.LOADING)}}),[_]),A=j(null);return K(r,(function(){return{get readyState(){return P.current?Z.COMPLETE:Z.LOADING},get node(){return A.current}}}),[]),U((function(){w||S(!1)}),[w,S]),ie((function(){var e=A.current;if(!v&&e){var r=e.src;if(Zr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[v]),U((function(){var e=A.current;if(e&&w){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!u(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[u,s,w,p]),g(ye,le(le({},m),{},{layout:!0,size:!0,paint:!0}),w&&p&&g("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:h,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:A,sandbox:b,scrolling:"no",src:O,style:le(le({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var be=F(Qr);function fe(){return!0}function Q(e){var r;if(fe())return!1;var t=e||self;return!!(null!==(r=t.AMP_CONFIG)&&void 0!==r&&r.test||t.__AMP_TEST||t.__karma__)}function ee(){return!0}be.displayName="IframeEmbed";var y=self.AMP_CONFIG||{},rt=("string"==typeof y.thirdPartyFrameRegex?new RegExp(y.thirdPartyFrameRegex):y.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Xe=("string"==typeof y.cdnProxyRegex?new RegExp(y.cdnProxyRegex):y.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function qe(e){if(!self.document||!self.document.head||self.location&&Xe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var H={thirdParty:y.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:y.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:rt,cdn:y.cdnUrl||qe("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Xe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:y.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:y.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:y.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:y.geoApiUrl||qe("amp-geo-api")},re=Array.isArray;function Ee(e){return JSON.parse(e)}function te(e,r){try{return Ee(e)}catch(e){return null==r||r(e),null}}function q(){return"2107302322000"}var Se={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Ae=self.__AMP_LOG,ir=null;function J(){if(Ae.dev)return Ae.dev;if(!ir)throw new Error("failed to call initLogConstructor");return Ae.dev=new ir(self,(function(e){return e>=3?Se.FINE:e>=2?Se.INFO:Se.OFF}))}function pe(e,r,t,n,o,a,i,c,l,u,s){return ee()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),J().assert(e,r,t,n,o,a,i,c,l,u,s))}function pt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ur(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mt(e,r,t){return r&&ur(e.prototype,r),t&&ur(e,t),e}var Oe,cr,sr=function(){function e(r){pt(this,e),this.capacity_=r,this.size_=0,this.access_=0,this.cache_=Y()}return mt(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var r=this.cache_[e];if(r)return r.access=++this.access_,r.payload}},{key:"put",value:function(e,r){this.has(e)||this.size_++,this.cache_[e]={payload:r,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,r=this.cache_,t=this.access_+1;for(var n in r){var o=r[n].access;o<t&&(t=o,e=n)}void 0!==e&&(delete r[e],this.size_--)}}}]),e}(),$a=new Set(["c","v","a","ad"]);function _e(e,r){return Oe||(Oe=self.document.createElement("a"),cr=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new sr(100))),vt(Oe,e,r?null:cr)}function vt(e,r,t){if(t&&t.has(r))return t.get(r);e.href=r,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=Q()&&Object.freeze?Object.freeze(o):o;return t&&t.put(r,a),a}function lr(e){return"".concat(H.thirdParty,"/").concat(q(),"/vendor/").concat(e).concat(".js")}function fr(e,r){var t=r||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||dt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(H.thirdPartyFrameHost,"/").concat(q(),"/")+"".concat(t,".html")}function dt(e){return"d-"+pr(e)}function pr(e){var r;if(e.crypto&&e.crypto.getRandomValues){var t=new Uint32Array(2);e.crypto.getRandomValues(t),r=String(t[0])+t[1]}else r=String(e.Math.random()).substr(2)+"0";return r}function mr(e){for(var r=0,t=e;t&&t!=t.parent;t=t.parent)r++;return String(r)+"-"+pr(e)}var gt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function vr(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function yt(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?vr(Object(t),!0).forEach((function(r){ht(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ht(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xt(e,r){return At(e)||St(e,r)||Et(e,r)||bt()}function bt(){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 Et(e,r){if(e){if("string"==typeof e)return dr(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dr(e,r)}}function dr(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function St(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=t.return&&t.return()}finally{if(c)throw o}}return a}}function At(e){if(Array.isArray(e))return e}function Ot(e,r){if(null==e)return{};var t,n,o=_t(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function _t(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Pe={},gr={EMBED_SIZE:"embed-size"},Fe="sync-xhr 'none'",Pt=de().join(" ")+" "+ge().join(" ");function Ft(e,r){var t=e.allow,n=void 0===t?Fe:t,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?Pt:s,p=e.src,y=e.type,d=e.title,b=void 0===d?y:d,O=Ot(e,gt);if(!ke(n,Fe))throw new Error("'allow' prop must contain \"".concat(Fe,'". Found "').concat(n,'".'));var m=j(null),v=j(null),h=ve((function(){return Pe[y]||(Pe[y]=Le()),Pe[y]()}),[y]),P=xt(z({name:c,src:p}),2),_=P[0],S=_.name,x=_.src,A=P[1];return U((function(){var e,r,t=null===(e=m.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView,n=null!=p?p:t?fr(t):"about:blank";if(c)A({name:c,src:n});else if(t){var i=Object.assign(w({location:{href:t.location.href},sentinel:mr(t)}),a),l=Object.assign(w({title:b,type:y,_context:i}),u);A({name:JSON.stringify(w({host:_e(n).hostname,bootstrap:null!=o?o:lr(y),type:y,count:h,attributes:l})),src:n})}}),[o,a,h,c,u,p,b,y]),ie((function(){var e,r=null===(e=v.current)||void 0===e?void 0:e.node;r&&r.parentNode.insertBefore(r,r.nextSibling)}),[S]),K(r,(function(){return{get readyState(){var e;return null===(e=v.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=v.current)||void 0===e?void 0:e.node}}}),[]),g(be,yt({allow:n,contentRef:m,messageHandler:l,name:S,ref:v,ready:!!S,sandbox:i?void 0:f,src:x,title:b},O))}var Re=F(Ft);Re.displayName="ProxyIframeEmbed";var Rt="amp-";function yr(e){if(!Nt(e))return null;var r=e.indexOf("{");return pe(-1!=r),te(e.substr(r),(function(r){return J().error("MESSAGING","Failed to parse message: "+e,r)}))}function Nt(e){return"string"==typeof e&&0==e.indexOf(Rt)&&-1!=e.indexOf("{")}var It=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function hr(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function me(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?hr(Object(t),!0).forEach((function(r){wt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function wt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xr(e,r){return Ct(e)||Mt(e,r)||Tt(e,r)||Dt()}function Dt(){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 Tt(e,r){if(e){if("string"==typeof e)return br(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return br(e,r)}}function br(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Mt(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=t.return&&t.return()}finally{if(c)throw o}}return a}}function Ct(e){if(Array.isArray(e))return e}function Lt(e,r){if(null==e)return{};var t,n,o=jt(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function jt(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Ut="facebook",kt="100%",Bt=function(){return!0},Ht="Facebook comments";function Vt(e,r){var t=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,y=e.onReady,d=e.orderBy,b=e.refLabel,O=e.requestResize,m=e.share,v=e.showFacepile,h=e.showText,w=e.size,j=e.smallHeader,P=e.style,_=e.tabs,S=e.title,x=void 0===S?Ht:S,A=Lt(e,It),E=xr(z(null),2),D=E[0],R=E[1],N=ae((function(e){var r,t=null!==(r=te(e.data))&&void 0!==r?r:yr(e.data);if("ready"==t.action&&(null==y||y()),t.type==gr.EMBED_SIZE){var n=t.height;O?(O(n),R(kt)):R(n)}}),[O,y]),F=xr(z(f),2),C=F[0],I=F[1];return U((function(){var e,t;if(f)I(f);else{var n=null==r||null===(e=r.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;!n||I(Ue(n.navigator.language))}}),[f,r]),g(Re,me(me({options:{action:t,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,kd_site:u,layout:s,locale:C,numPosts:p,orderBy:d,ref:b,share:m,showFacepile:v,showText:h,size:w,smallHeader:j,tabs:_},ref:r,title:x},A),{},{excludeSandbox:!0,matchesMessagingOrigin:Bt,messageHandler:N,type:Ut,style:D?me(me({},P),{},{height:D}):P}))}var Er=F(Vt);Er.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.js.map | ||
; | ||
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,r){for(var t in __markAsModule(e),r)__defProp(e,t,{get:r[t],enumerable:!0})},__reExport=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=__getOwnPropNames(r),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=__getOwnPropDesc(r,n))||t.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};__export(exports,{Facebook:function(){return Facebook}});var preact=__toModule(require("preact")),preactDOM=__toModule(require("preact")),hooks=__toModule(require("preact/hooks"));function createElement2(e,r,t){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,r){hooks.useEffect(e,r)}function useLayoutEffect2(e,r){hooks.useLayoutEffect(e,r)}function useContext2(e){return hooks.useContext(e)}function useMemo2(e,r){return hooks.useMemo(e,r)}function useCallback2(e,r){return hooks.useCallback(e,r)}function useImperativeHandle2(e,r,t){return hooks.useImperativeHandle(e,r,t)}var getRequiredSandboxFlags=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},getOptionalSandboxFlags=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function sequentialIdGenerator(){var e=0;return function(){return String(++e)}}var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function map(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function dict(e){return e||{}}function dashToUnderline(e){return e.replace("-","_")}function includes(e,r,t){return"number"!=typeof t&&(t=0),!(t+r.length>e.length)&&-1!==e.indexOf(r,t)}var _MAP,compat=__toModule(require("preact/compat"));function forwardRef2(e){return compat.forwardRef(e)}function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,r){var t=MAP[e]||0,n=MAP[r]||0,o=Math.max(t,n);return ORDER[o]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){_defineProperty2(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty2(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _objectWithoutProperties(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,s=e.contentProps,u=e.contentRef,f=e.contentStyle,p=e.layout,d=void 0!==p&&p,y=e.paint,b=void 0!==y&&y,_=e.size,m=void 0!==_&&_,h=e.style,g=e.wrapperClassName,O=e.wrapperStyle,v=(m?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:r,className:"".concat(a||""," ").concat(g||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},h),O),{},{contain:CONTAIN[v]})}),createElement2(c,_objectSpread(_objectSpread({},s),{},{ref:u,className:l,style:_objectSpread(_objectSpread({},m&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},f)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","className","style","wrapperClassName","wrapperStyle"];function ownKeys2(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys2(Object(t),!0).forEach((function(r){_defineProperty3(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys2(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty3(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _objectWithoutProperties2(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose2(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose2(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}function WrapperWithRef(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),o)}var context,Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var r=useRef2(null);return r.current=e,r}function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ownKeys3(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread3(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys3(Object(t),!0).forEach((function(r){_defineProperty4(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys3(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty4(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _objectWithoutProperties3(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose3(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose3(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,s=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,u=e.messageHandler,f=e.ready,p=void 0===f||f,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,m=_objectWithoutProperties3(e,_excluded3),h=useAmpContext().playable,g=useLoading(d),O=g!==Loading.UNLOAD,v=useRef2(!1),P=useValueRef(y),j=useCallback2((function(e){if(e!==v.current){v.current=e;var r=P.current;null==r||r(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[P]),A=useRef2(null);return useImperativeHandle2(r,(function(){return{get readyState(){return v.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return A.current}}}),[]),useLayoutEffect2((function(){O||j(!1)}),[O,j]),useEffect2((function(){var e=A.current;if(!h&&e){var r=e.src;canResetSrc(r)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),useLayoutEffect2((function(){var e=A.current;if(e&&O){var r=function(e){var r=A.current;r&&e.source==r.contentWindow&&s(e.origin)&&u(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[s,u,O,p]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},m),{},{layout:!0,size:!0,paint:!0}),O&&p&&createElement2("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:i,onLoad:function(){return j(!0)},part:"iframe",ref:A,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);function isProd(){return!0}function isTest(e){var r;if(isProd())return!1;var t=e||self;return!!(null!==(r=t.AMP_CONFIG)&&void 0!==r&&r.test||t.__AMP_TEST||t.__karma__)}function isMinified(){return!0}function version(){return"2108122216000"}IframeEmbed.displayName="IframeEmbed";var isArray=Array.isArray;function remove(e,r){for(var t=[],n=0,o=0;o<e.length;o++){var a=e[o];r(a,o,e)?t.push(a):(n<o&&(e[n]=a),n++)}return n<e.length&&(e.length=n),t}function isElement(e){return 1==(null==e?void 0:e.nodeType)}function elementStringOrPassThru(e){return isElement(e)?(e=e).tagName.toLowerCase()+(e.id?"#".concat(e.id):""):e}function assert(e,r){var t,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed";if(r)return r;e&&-1==o.indexOf(e)&&(o+=e);for(var a=3,i=o.split("%s"),c=i.shift(),l=[c];i.length;){var s=arguments[a++],u=i.shift();c+=elementStringOrPassThru(s)+u,l.push(s,u.trim())}var f=new Error(c);throw f.messageArray=remove(l,(function(e){return""!==e})),null===(t=(n=self).__AMP_REPORT_ERROR)||void 0===t||t.call(n,f),f}function devAssertDceCheck(){self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__")}function devAssert(e,r,t,n,o,a,i,c,l,s,u){return isMinified()?e:(devAssertDceCheck(),assert("",e,r,t,n,o,a,i,c,l,s,u))}function parseJson(e){return JSON.parse(e)}function tryParseJson(e,r){try{return parseJson(e)}catch(e){return null==r||r(e),null}}var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")};function _createForOfIteratorHelper(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(c)throw a}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function duplicateErrorIfNecessary(e){var r=Object.getOwnPropertyDescriptor(e,"message");if(null!=r&&r.writable)return e;var t=e.message,n=e.stack,o=new Error(t);for(var a in e)o[a]=e[a];return o.stack=n,o}function createError(e){var r,t=null,n="",o=_createForOfIteratorHelper(arguments);try{for(o.s();!(r=o.n()).done;){var a=r.value;a instanceof Error&&!t?t=duplicateErrorIfNecessary(a):(n&&(n+=" "),n+=a)}}catch(e){o.e(e)}finally{o.f()}return t?n&&(t.message=n+": "+t.message):t=new Error(n),t}function maybeReportError(e){var r,t;null===(r=(t=self).__AMP_REPORT_ERROR)||void 0===r||r.call(t,e)}function rethrowAsync(e){var r=createError.apply(null,arguments);setTimeout((function(){throw maybeReportError(r),r}))}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}var cachedAnchorEl,urlCache,LruCache=function(){function e(r){_classCallCheck(this,e),this.capacity_=r,this.size_=0,this.access_=0,this.cache_=map()}return _createClass(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var r=this.cache_[e];if(r)return r.access=++this.access_,r.payload}},{key:"put",value:function(e,r){this.has(e)||this.size_++,this.cache_[e]={payload:r,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,r=this.cache_,t=this.access_+1;for(var n in r){var o=r[n].access;o<t&&(t=o,e=n)}void 0!==e&&(delete r[e],this.size_--)}}}]),e}(),SERVING_TYPE_PREFIX=new Set(["c","v","a","ad"]);function parseUrlDeprecated(e,r){return cachedAnchorEl||(cachedAnchorEl=self.document.createElement("a"),urlCache=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new LruCache(100))),parseUrlWithA(cachedAnchorEl,e,r?null:urlCache)}function parseUrlWithA(e,r,t){if(t&&t.has(r))return t.get(r);e.href=r,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=isTest()&&Object.freeze?Object.freeze(o):o;return t&&t.put(r,a),a}function getBootstrapUrl(e){return"".concat(urls.thirdParty,"/").concat(version(),"/vendor/").concat(e).concat(".js")}function getDefaultBootstrapBaseUrl(e,r){var t=r||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||getSubDomain(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(urls.thirdPartyFrameHost,"/").concat(version(),"/")+"".concat(t,".html")}function getSubDomain(e){return"d-"+getRandom(e)}function getRandom(e){var r;if(e.crypto&&e.crypto.getRandomValues){var t=new Uint32Array(2);e.crypto.getRandomValues(t),r=String(t[0])+t[1]}else r=String(e.Math.random()).substr(2)+"0";return r}function generateSentinel(e){for(var r=0,t=e;t&&t!=t.parent;t=t.parent)r++;return String(r)+"-"+getRandom(e)}var _excluded4=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ownKeys4(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread4(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys4(Object(t),!0).forEach((function(r){_defineProperty5(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys4(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty5(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray2(e,r)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray2(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray2(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray2(e,r):void 0}}function _arrayLikeToArray2(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==t.return||t.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _objectWithoutProperties4(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose4(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose4(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var countGenerators={},MessageType={EMBED_SIZE:"embed-size"},BLOCK_SYNC_XHR="sync-xhr 'none'",DEFAULT_SANDBOX=getRequiredSandboxFlags().join(" ")+" "+getOptionalSandboxFlags().join(" ");function ProxyIframeEmbedWithRef(e,r){var t=e.allow,n=void 0===t?BLOCK_SYNC_XHR:t,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,s=e.options,u=e.sandbox,f=void 0===u?DEFAULT_SANDBOX:u,p=e.src,d=e.type,y=e.title,b=void 0===y?d:y,_=_objectWithoutProperties4(e,_excluded4);if(!includes(n,BLOCK_SYNC_XHR))throw new Error("'allow' prop must contain \"".concat(BLOCK_SYNC_XHR,'". Found "').concat(n,'".'));var m=useRef2(null),h=useRef2(null),g=useMemo2((function(){return countGenerators[d]||(countGenerators[d]=sequentialIdGenerator()),countGenerators[d]()}),[d]),O=_slicedToArray(useState2({name:c,src:p}),2),v=O[0],P=v.name,j=v.src,A=O[1];return useLayoutEffect2((function(){var e,r,t=null===(e=m.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView,n=null!=p?p:t?getDefaultBootstrapBaseUrl(t):"about:blank";if(c)A({name:c,src:n});else if(t){var i=Object.assign(dict({"location":{"href":t.location.href},"sentinel":generateSentinel(t)}),a),l=Object.assign(dict({"title":b,"type":d,"_context":i}),s);A({name:JSON.stringify(dict({"host":parseUrlDeprecated(n).hostname,"bootstrap":null!=o?o:getBootstrapUrl(d),"type":d,"count":g,"attributes":l})),src:n})}}),[o,a,g,c,s,p,b,d]),useEffect2((function(){var e,r=null===(e=h.current)||void 0===e?void 0:e.node;r&&r.parentNode.insertBefore(r,r.nextSibling)}),[P]),useImperativeHandle2(r,(function(){return{get readyState(){var e;return null===(e=h.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=h.current)||void 0===e?void 0:e.node}}}),[]),createElement2(IframeEmbed,_objectSpread4({allow:n,contentRef:m,messageHandler:l,name:P,ref:h,ready:!!P,sandbox:i?void 0:f,src:j,title:b},_))}var ProxyIframeEmbed=forwardRef2(ProxyIframeEmbedWithRef);ProxyIframeEmbed.displayName="ProxyIframeEmbed";var AMP_MESSAGE_PREFIX="amp-";function deserializeMessage(e){if(!isAmpMessage(e))return null;var r=e.indexOf("{");return devAssert(-1!=r),tryParseJson(e.substr(r),(function(r){rethrowAsync(new Error("MESSAGING: Failed to parse message: ".concat(e,"\n").concat(r.message)))}))}function isAmpMessage(e){return"string"==typeof e&&0==e.indexOf(AMP_MESSAGE_PREFIX)&&-1!=e.indexOf("{")}var _excluded5=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function ownKeys5(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread5(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys5(Object(t),!0).forEach((function(r){_defineProperty6(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys5(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty6(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _slicedToArray2(e,r){return _arrayWithHoles2(e)||_iterableToArrayLimit2(e,r)||_unsupportedIterableToArray3(e,r)||_nonIterableRest2()}function _nonIterableRest2(){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 _unsupportedIterableToArray3(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray3(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray3(e,r):void 0}}function _arrayLikeToArray3(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit2(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==t.return||t.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles2(e){if(Array.isArray(e))return e}function _objectWithoutProperties5(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose5(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose5(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var TYPE="facebook",FULL_HEIGHT="100%",MATCHES_MESSAGING_ORIGIN=function(){return!0},DEFAULT_TITLE="Facebook comments";function FacebookWithRef(e,r){var t=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,s=e.kdSite,u=e.layout,f=e.locale,p=e.numPosts,d=e.onReady,y=e.orderBy,b=e.refLabel,_=e.requestResize,m=e.share,h=e.showFacepile,g=e.showText,O=e.size,v=e.smallHeader,P=e.style,j=e.tabs,A=e.title,w=void 0===A?DEFAULT_TITLE:A,S=_objectWithoutProperties5(e,_excluded5),E=_slicedToArray2(useState2(null),2),R=E[0],x=E[1],T=useCallback2((function(e){var r,t=null!==(r=tryParseJson(e.data))&&void 0!==r?r:deserializeMessage(e.data);if("ready"==t.action&&(null==d||d()),t.type==MessageType.EMBED_SIZE){var n=t.height;_?(_(n),x(FULL_HEIGHT)):x(n)}}),[_,d]),L=_slicedToArray2(useState2(f),2),I=L[0],C=L[1];return useLayoutEffect2((function(){var e,t;if(f)C(f);else{var n=null==r||null===(e=r.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;n&&C(dashToUnderline(n.navigator.language))}}),[f,r]),createElement2(ProxyIframeEmbed,_objectSpread5(_objectSpread5({options:{action:t,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,"kd_site":s,layout:u,locale:I,numPosts:p,orderBy:y,ref:b,share:m,showFacepile:h,showText:g,size:O,smallHeader:v,tabs:j},ref:r,title:w},S),{},{excludeSandbox:!0,matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:T,type:TYPE,style:R?_objectSpread5(_objectSpread5({},P),{},{height:R}):P}))}var Facebook=forwardRef2(FacebookWithRef);Facebook.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
@@ -447,2 +447,99 @@ var __create = Object.create; | ||
// src/core/mode/version.js | ||
function version() { | ||
return "2108122216000"; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
function remove(array, shouldRemove) { | ||
var removed = []; | ||
var index = 0; | ||
for (var i = 0; i < array.length; i++) { | ||
var item = array[i]; | ||
if (shouldRemove(item, i, array)) { | ||
removed.push(item); | ||
} else { | ||
if (index < i) { | ||
array[index] = item; | ||
} | ||
index++; | ||
} | ||
} | ||
if (index < array.length) { | ||
array.length = index; | ||
} | ||
return removed; | ||
} | ||
// src/core/types/index.js | ||
function isElement(value) { | ||
return (value == null ? void 0 : value.nodeType) == 1; | ||
} | ||
// src/core/error/message-helpers.js | ||
function elementStringOrPassThru(val) { | ||
if (isElement(val)) { | ||
val = val; | ||
return val.tagName.toLowerCase() + (val.id ? "#" + val.id : ""); | ||
} | ||
return val; | ||
} | ||
// src/core/assert/base.js | ||
function assert(sentinel, shouldBeTruthy, opt_message, var_args) { | ||
if (opt_message === void 0) { | ||
opt_message = "Assertion failed"; | ||
} | ||
if (shouldBeTruthy) { | ||
return shouldBeTruthy; | ||
} | ||
if (sentinel && opt_message.indexOf(sentinel) == -1) { | ||
opt_message += sentinel; | ||
} | ||
var i = 3; | ||
var splitMessage = opt_message.split("%s"); | ||
var message = splitMessage.shift(); | ||
var messageArray = [message]; | ||
while (splitMessage.length) { | ||
var subValue = arguments[i++]; | ||
var nextConstant = splitMessage.shift(); | ||
message += elementStringOrPassThru(subValue) + nextConstant; | ||
messageArray.push(subValue, nextConstant.trim()); | ||
} | ||
var error = new Error(message); | ||
error.messageArray = remove(messageArray, function(x) { | ||
return x !== ""; | ||
}); | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
throw error; | ||
} | ||
// src/core/assert/dev.js | ||
function devAssertDceCheck() { | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
} | ||
function devAssert(shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTruthy; | ||
} | ||
devAssertDceCheck(); | ||
return assert("", shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -476,18 +573,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -518,7 +599,89 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; | ||
} | ||
function getHashParams(opt_win) { | ||
var _ref = opt_win || self, location = _ref.location; | ||
return parseQueryString(location["originalHash"] || location.hash); | ||
} | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107302322000"; | ||
// src/core/error/index.js | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) | ||
return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) | ||
o = it; | ||
var i = 0; | ||
return function() { | ||
if (i >= o.length) | ||
return { done: true }; | ||
return { done: false, value: o[i++] }; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) | ||
return; | ||
if (typeof o === "string") | ||
return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) | ||
n = o.constructor.name; | ||
if (n === "Map" || n === "Set") | ||
return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) | ||
return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) | ||
len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
function duplicateErrorIfNecessary(error) { | ||
var messageProperty = Object.getOwnPropertyDescriptor(error, "message"); | ||
if (messageProperty != null && messageProperty.writable) { | ||
return error; | ||
} | ||
var message = error.message, stack = error.stack; | ||
var e = new Error(message); | ||
for (var prop in error) { | ||
e[prop] = error[prop]; | ||
} | ||
e.stack = stack; | ||
return e; | ||
} | ||
function createError(var_args) { | ||
var error = null; | ||
var message = ""; | ||
for (var _iterator = _createForOfIteratorHelperLoose(arguments), _step; !(_step = _iterator()).done; ) { | ||
var arg = _step.value; | ||
if (arg instanceof Error && !error) { | ||
error = duplicateErrorIfNecessary(arg); | ||
} else { | ||
if (message) { | ||
message += " "; | ||
} | ||
message += arg; | ||
} | ||
} | ||
if (!error) { | ||
error = new Error(message); | ||
} else if (message) { | ||
error.message = message + ": " + error.message; | ||
} | ||
return error; | ||
} | ||
function maybeReportError(error) { | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
} | ||
function rethrowAsync(var_args) { | ||
var error = createError.apply(null, arguments); | ||
setTimeout(function() { | ||
maybeReportError(error); | ||
throw error; | ||
}); | ||
} | ||
@@ -535,11 +698,9 @@ // src/mode.js | ||
function getMode_(win) { | ||
var hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
var hashParams = getHashParams(win); | ||
return { | ||
localDev: isLocalDev(win), | ||
development: isModeDevelopment(win), | ||
development: isModeDevelopment(win, hashParams), | ||
esm: false, | ||
geoOverride: hashQuery["amp-geo"], | ||
geoOverride: hashParams["amp-geo"], | ||
test: isTest(win), | ||
log: hashQuery["log"], | ||
version: internalRuntimeVersion(), | ||
rtvVersion: getRtvVersion(win) | ||
@@ -551,19 +712,13 @@ }; | ||
var _win$AMP_CONFIG; | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || "01" + internalRuntimeVersion(); | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || "01" + version(); | ||
} | ||
return rtvVersion; | ||
} | ||
function isModeDevelopment(win) { | ||
var hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
return !!(["1", "actions", "amp", "amp4ads", "amp4email"].includes(hashQuery["development"]) || win.AMP_DEV_MODE); | ||
function isModeDevelopment(win, opt_hashParams) { | ||
var devModes = ["1", "actions", "amp", "amp4ads", "amp4email"]; | ||
var devParam = opt_hashParams || getHashParams(win); | ||
return devModes.includes(devParam["development"]) || !!win.AMP_DEV_MODE; | ||
} | ||
// src/log.js | ||
var LogLevel = { | ||
OFF: 0, | ||
ERROR: 1, | ||
WARN: 2, | ||
INFO: 3, | ||
FINE: 4 | ||
}; | ||
self.__AMP_LOG = self.__AMP_LOG || { | ||
@@ -575,29 +730,2 @@ user: null, | ||
var logs = self.__AMP_LOG; | ||
var logConstructor = null; | ||
function dev() { | ||
if (logs.dev) { | ||
return logs.dev; | ||
} | ||
if (!logConstructor) { | ||
throw new Error("failed to call initLogConstructor"); | ||
} | ||
return logs.dev = new logConstructor(self, function(logNum) { | ||
if (logNum >= 3) { | ||
return LogLevel.FINE; | ||
} | ||
if (logNum >= 2) { | ||
return LogLevel.INFO; | ||
} | ||
return LogLevel.OFF; | ||
}); | ||
} | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTrueish; | ||
} | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
return dev().assert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
@@ -757,3 +885,3 @@ // src/core/data-structures/lru-cache.js | ||
} | ||
return urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + extension; | ||
return urls.thirdParty + "/" + version() + "/vendor/" + type + extension; | ||
} | ||
@@ -766,6 +894,6 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN = parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN || getSubDomain(parentWindow); | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + ("." + urls.thirdPartyFrameHost + "/" + internalRuntimeVersion() + "/") + (srcFileBasename + ".html"); | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + ("." + urls.thirdPartyFrameHost + "/" + version() + "/") + (srcFileBasename + ".html"); | ||
} | ||
function getDevelopmentBootstrapBaseUrl(parentWindow, srcFileBasename) { | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? internalRuntimeVersion() + "/" + srcFileBasename : "current/" + srcFileBasename + ".max") + ".html"; | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? version() + "/" + srcFileBasename : "current/" + srcFileBasename + ".max") + ".html"; | ||
} | ||
@@ -933,5 +1061,5 @@ function getAdsLocalhost(win) { | ||
var startPos = message.indexOf("{"); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), function(e) { | ||
return dev().error("MESSAGING", "Failed to parse message: " + message, e); | ||
rethrowAsync(new Error("MESSAGING: Failed to parse message: " + message + "\n" + e.message)); | ||
}); | ||
@@ -938,0 +1066,0 @@ } |
@@ -463,2 +463,93 @@ // src/preact/index.js | ||
// src/core/mode/version.js | ||
function version() { | ||
return "2108122216000"; | ||
} | ||
// src/core/types/array.js | ||
function remove(array, shouldRemove) { | ||
const removed = []; | ||
let index = 0; | ||
for (let i = 0; i < array.length; i++) { | ||
const item = array[i]; | ||
if (shouldRemove(item, i, array)) { | ||
removed.push(item); | ||
} else { | ||
if (index < i) { | ||
array[index] = item; | ||
} | ||
index++; | ||
} | ||
} | ||
if (index < array.length) { | ||
array.length = index; | ||
} | ||
return removed; | ||
} | ||
// src/core/types/index.js | ||
function isElement(value) { | ||
return (value == null ? void 0 : value.nodeType) == 1; | ||
} | ||
// src/core/error/message-helpers.js | ||
function elementStringOrPassThru(val) { | ||
if (isElement(val)) { | ||
val = val; | ||
return val.tagName.toLowerCase() + (val.id ? `#${val.id}` : ""); | ||
} | ||
return val; | ||
} | ||
// src/core/assert/base.js | ||
function assert(sentinel, shouldBeTruthy, opt_message = "Assertion failed", var_args) { | ||
if (shouldBeTruthy) { | ||
return shouldBeTruthy; | ||
} | ||
if (sentinel && opt_message.indexOf(sentinel) == -1) { | ||
opt_message += sentinel; | ||
} | ||
let i = 3; | ||
const splitMessage = opt_message.split("%s"); | ||
let message = splitMessage.shift(); | ||
const messageArray = [message]; | ||
while (splitMessage.length) { | ||
const subValue = arguments[i++]; | ||
const nextConstant = splitMessage.shift(); | ||
message += elementStringOrPassThru(subValue) + nextConstant; | ||
messageArray.push(subValue, nextConstant.trim()); | ||
} | ||
const error = new Error(message); | ||
error.messageArray = remove(messageArray, (x) => x !== ""); | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
throw error; | ||
} | ||
// src/core/assert/dev.js | ||
function devAssertDceCheck() { | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
} | ||
function devAssert(shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTruthy; | ||
} | ||
devAssertDceCheck(); | ||
return assert("", shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -492,15 +583,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -528,7 +606,56 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; | ||
} | ||
function getHashParams(opt_win) { | ||
const { | ||
location | ||
} = opt_win || self; | ||
return parseQueryString(location["originalHash"] || location.hash); | ||
} | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107302322000"; | ||
// src/core/error/index.js | ||
function duplicateErrorIfNecessary(error) { | ||
const messageProperty = Object.getOwnPropertyDescriptor(error, "message"); | ||
if (messageProperty != null && messageProperty.writable) { | ||
return error; | ||
} | ||
const { | ||
message, | ||
stack | ||
} = error; | ||
const e = new Error(message); | ||
for (const prop in error) { | ||
e[prop] = error[prop]; | ||
} | ||
e.stack = stack; | ||
return e; | ||
} | ||
function createError(var_args) { | ||
let error = null; | ||
let message = ""; | ||
for (const arg of arguments) { | ||
if (arg instanceof Error && !error) { | ||
error = duplicateErrorIfNecessary(arg); | ||
} else { | ||
if (message) { | ||
message += " "; | ||
} | ||
message += arg; | ||
} | ||
} | ||
if (!error) { | ||
error = new Error(message); | ||
} else if (message) { | ||
error.message = message + ": " + error.message; | ||
} | ||
return error; | ||
} | ||
function maybeReportError(error) { | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
} | ||
function rethrowAsync(var_args) { | ||
const error = createError.apply(null, arguments); | ||
setTimeout(() => { | ||
maybeReportError(error); | ||
throw error; | ||
}); | ||
} | ||
@@ -545,11 +672,9 @@ // src/mode.js | ||
function getMode_(win) { | ||
const hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
const hashParams = getHashParams(win); | ||
return { | ||
localDev: isLocalDev(win), | ||
development: isModeDevelopment(win), | ||
development: isModeDevelopment(win, hashParams), | ||
esm: true, | ||
geoOverride: hashQuery["amp-geo"], | ||
geoOverride: hashParams["amp-geo"], | ||
test: isTest(win), | ||
log: hashQuery["log"], | ||
version: internalRuntimeVersion(), | ||
rtvVersion: getRtvVersion(win) | ||
@@ -561,19 +686,13 @@ }; | ||
var _win$AMP_CONFIG; | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || `01${internalRuntimeVersion()}`; | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || `01${version()}`; | ||
} | ||
return rtvVersion; | ||
} | ||
function isModeDevelopment(win) { | ||
const hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
return !!(["1", "actions", "amp", "amp4ads", "amp4email"].includes(hashQuery["development"]) || win.AMP_DEV_MODE); | ||
function isModeDevelopment(win, opt_hashParams) { | ||
const devModes = ["1", "actions", "amp", "amp4ads", "amp4email"]; | ||
const devParam = opt_hashParams || getHashParams(win); | ||
return devModes.includes(devParam["development"]) || !!win.AMP_DEV_MODE; | ||
} | ||
// src/log.js | ||
var LogLevel = { | ||
OFF: 0, | ||
ERROR: 1, | ||
WARN: 2, | ||
INFO: 3, | ||
FINE: 4 | ||
}; | ||
self.__AMP_LOG = self.__AMP_LOG || { | ||
@@ -585,29 +704,2 @@ user: null, | ||
var logs = self.__AMP_LOG; | ||
var logConstructor = null; | ||
function dev() { | ||
if (logs.dev) { | ||
return logs.dev; | ||
} | ||
if (!logConstructor) { | ||
throw new Error("failed to call initLogConstructor"); | ||
} | ||
return logs.dev = new logConstructor(self, (logNum) => { | ||
if (logNum >= 3) { | ||
return LogLevel.FINE; | ||
} | ||
if (logNum >= 2) { | ||
return LogLevel.INFO; | ||
} | ||
return LogLevel.OFF; | ||
}); | ||
} | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTrueish; | ||
} | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
return dev().assert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
@@ -684,3 +776,3 @@ // src/url.js | ||
} | ||
return `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}${extension}`; | ||
return `${urls.thirdParty}/${version()}/vendor/${type}${extension}`; | ||
} | ||
@@ -693,6 +785,6 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN = parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN || getSubDomain(parentWindow); | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + `.${urls.thirdPartyFrameHost}/${internalRuntimeVersion()}/${srcFileBasename}.html`; | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + `.${urls.thirdPartyFrameHost}/${version()}/${srcFileBasename}.html`; | ||
} | ||
function getDevelopmentBootstrapBaseUrl(parentWindow, srcFileBasename) { | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? `${internalRuntimeVersion()}/${srcFileBasename}` : `current/${srcFileBasename}.max`) + ".html"; | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? `${version()}/${srcFileBasename}` : `current/${srcFileBasename}.max`) + ".html"; | ||
} | ||
@@ -873,4 +965,7 @@ function getAdsLocalhost(win) { | ||
const startPos = message.indexOf("{"); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), (e) => dev().error("MESSAGING", "Failed to parse message: " + message, e)); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), (e) => { | ||
rethrowAsync(new Error(`MESSAGING: Failed to parse message: ${message} | ||
${e.message}`)); | ||
}); | ||
} | ||
@@ -877,0 +972,0 @@ function isAmpMessage(message) { |
@@ -1,3 +0,3 @@ | ||
import{cloneElement as vr,createContext as nt,createElement as rt,createRef as Or}from"preact";import{hydrate as br,render as _r}from"preact";import{useCallback as lt,useContext as at,useEffect as st,useImperativeHandle as pt,useLayoutEffect as ct,useMemo as ut,useRef as it,useState as ot}from"preact/hooks";function d(e,t,r){return rt.apply(void 0,arguments)}function ve(e){return nt(e,void 0)}function $(e){return ot(e)}function F(e){return it(e)}function X(e,t){st(e,t)}function T(e,t){ct(e,t)}function _e(e){return at(e)}function re(e,t){return ut(e,t)}function q(e,t){return lt(e,t)}function H(e,t,r){return pt(e,t,r)}var ne=()=>["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],oe=()=>["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"];function be(){let e=0;return()=>String(++e)}var{hasOwnProperty:Pr,toString:Nr}=Object.prototype;function N(e){return e||{}}function Oe(e){return e.replace("-","_")}function Se(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}import{Children as Dr,createPortal as Tr,forwardRef as ft}from"preact/compat";function A(e){return ft(e)}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},mt=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Ae={[x.AUTO]:0,[x.LAZY]:1,[x.EAGER]:2,[x.UNLOAD]:3};function Pe(e,t){let r=Ae[e]||0,n=Ae[t]||0,o=Math.max(r,n);return mt[o]}var k={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},dt=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){gt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ht(e,t){if(null==e)return{};var r,n,o=xt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function xt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Et=[null,"paint","layout","content","size","size paint","size layout","strict"],yt={position:"relative",width:"100%",height:"100%"};function vt(e,t){let{as:r="div",children:n,className:o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:u,layout:s=!1,paint:f=!1,size:p=!1,style:y,wrapperClassName:O,wrapperStyle:b}=e,m=(p?4:0)+(s?2:0)+(f?1:0);return d(r,R(R({},ht(e,dt)),{},{ref:t,className:`${o||""} ${O||""}`.trim()||null,style:R(R(R({},y),b),{},{contain:Et[m]})}),d(a,R(R({},i),{},{ref:c,className:l,style:R(R({},p&&yt),{},{overflow:f?"hidden":"visible"},u)}),n))}var ie=A(vt),_t=["as","children","className","style","wrapperClassName","wrapperStyle"];function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function bt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ot(e,t){if(null==e)return{};var r,n,o=St(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function St(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function At(e,t){let{as:r="div",children:n,className:o,style:a,wrapperClassName:l,wrapperStyle:i}=e;return d(r,J(J({},Ot(e,_t)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:J(J({},a),i)}),n)}var Ie,Pt=A(At);function se(e){let t=F(null);return t.current=e,t}function Nt(){return Ie||(Ie=ve({renderable:!0,playable:!0,loading:x.AUTO}))}function ce(){return _e(Nt())}function Me(e){let{loading:t}=ce();return Pe(e,t)}var Rt=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){It(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function It(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mt(e,t){if(null==e)return{};var r,n,o=Ft(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Ft(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Tt=()=>!1,Dt="about:blank",wt=e=>e&&e!=Dt&&!e.includes("#");function Ct(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=Tt,messageHandler:u,ready:s=!0,loading:f,onReadyState:p,sandbox:y,src:O}=e,b=Mt(e,Rt),{playable:m}=ce(),g=Me(f),v=g!==x.UNLOAD,h=F(!1),w=se(p),P=q((e=>{if(e!==h.current){h.current=e;let t=w.current;null==t||t(e?k.COMPLETE:k.LOADING)}}),[w]),j=F(null);return H(t,(()=>({get readyState(){return h.current?k.COMPLETE:k.LOADING},get node(){return j.current}})),[]),T((()=>{v||P(!1)}),[v,P]),X((()=>{let e=j.current;if(!m&&e){let{src:t}=e;wt(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[m]),T((()=>{let e=j.current;if(!e||!v)return;let t=e=>{let t=j.current;!t||e.source!=t.contentWindow||!c(e.origin)||u(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,u,v,s]),d(ie,K(K({},b),{},{layout:!0,size:!0,paint:!0}),v&&s&&d("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:l,onLoad:()=>P(!0),part:"iframe",ref:j,sandbox:y,scrolling:"no",src:O,style:K(K({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var ae=A(Ct);function Y(){return!0}function G(e){var t;if(Y())return!1;let r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function W(){return!0}ae.displayName="IframeEmbed";var g=self.AMP_CONFIG||{},jt=("string"==typeof g.thirdPartyFrameRegex?new RegExp(g.thirdPartyFrameRegex):g.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Te=("string"==typeof g.cdnProxyRegex?new RegExp(g.cdnProxyRegex):g.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function De(e){if(!self.document||!self.document.head||self.location&&Te.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var C={thirdParty:g.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:g.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:jt,cdn:g.cdnUrl||De("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Te,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:g.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:g.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:g.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:g.geoApiUrl||De("amp-geo-api")};function le(e){return JSON.parse(e)}function z(e,t){try{return le(e)}catch(e){return null==t||t(e),null}}function B(){return"2107302322000"}var pe={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var fe=self.__AMP_LOG,Ge=null;function Q(){if(fe.dev)return fe.dev;if(!Ge)throw new Error("failed to call initLogConstructor");return fe.dev=new Ge(self,(e=>e>=3?pe.FINE:e>=2?pe.INFO:pe.OFF))}function ee(e,t,r,n,o,a,l,i,c,u,s){return W()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),Q().assert(e,t,r,n,o,a,l,i,c,u,s))}var me,qt,Is=new Set(["c","v","a","ad"]);function de(e,t){return me||(me=self.document.createElement("a"),qt=null),Jt(me,e,null)}function Jt(e,t,r){return e.href="",new URL(t,e.href)}function ze(e){return`${C.thirdParty}/${B()}/vendor/${e}.mjs`}function Xe(e,t){let r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||Kt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${C.thirdPartyFrameHost}/${B()}/${r}.html`}function Kt(e){return"d-"+qe(e)}function qe(e){let t;if(e.crypto&&e.crypto.getRandomValues){let r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function Je(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+qe(e)}var Yt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function Ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(r),!0).forEach((function(t){Qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function er(e,t){if(null==e)return{};var r,n,o=tr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function tr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var ge={},Ye={EMBED_SIZE:"embed-size"},he="sync-xhr 'none'",rr=ne().join(" ")+" "+oe().join(" ");function nr(e,t){let{allow:r=he,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:u=rr,src:s,type:f,title:p=f}=e,y=er(e,Yt);if(!Se(r,he))throw new Error(`'allow' prop must contain "${he}". Found "${r}".`);let O=F(null),b=F(null),m=re((()=>(ge[f]||(ge[f]=be()),ge[f]())),[f]),{0:{name:g,src:v},1:h}=$({name:l,src:s});return T((()=>{var e,t;let r=null===(e=O.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=s?s:r?Xe(r):"about:blank";if(l)return void h({name:l,src:a});if(!r)return;let i=Object.assign(N({location:{href:r.location.href},sentinel:Je(r)}),o),u=Object.assign(N({title:p,type:f,_context:i}),c);h({name:JSON.stringify(N({host:de(a).hostname,bootstrap:null!=n?n:ze(f),type:f,count:m,attributes:u})),src:a})}),[n,o,m,l,c,s,p,f]),X((()=>{var e;let t=null===(e=b.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[g]),H(t,(()=>({get readyState(){var e;return null===(e=b.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=b.current)||void 0===e?void 0:e.node}})),[]),d(ae,Zt({allow:r,contentRef:O,messageHandler:i,name:g,ref:b,ready:!!g,sandbox:a?void 0:u,src:v,title:p},y))}var xe=A(nr);xe.displayName="ProxyIframeEmbed";var or="amp-";function Ze(e){if(!ir(e))return null;let t=e.indexOf("{");return ee(-1!=t),z(e.substr(t),(t=>Q().error("MESSAGING","Failed to parse message: "+e,t)))}function ir(e){return"string"==typeof e&&0==e.indexOf(or)&&-1!=e.indexOf("{")}var sr=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){cr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ar(e,t){if(null==e)return{};var r,n,o=ur(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function ur(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var lr="facebook",pr="100%",fr=()=>!0,mr="Facebook comments";function dr(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:u,layout:s,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:b,requestResize:m,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,style:j,tabs:x,title:S=mr}=e,A=ar(e,sr),{0:E,1:R}=$(null),N=q((e=>{var t;let r=null!==(t=z(e.data))&&void 0!==t?t:Ze(e.data);if("ready"==r.action&&(null==y||y()),r.type==Ye.EMBED_SIZE){let e=r.height;m?(m(e),R(pr)):R(e)}}),[m,y]),{0:_,1:D}=$(f);return T((()=>{var e,r;if(f)return void D(f);let n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||D(Oe(n.navigator.language))}),[f,t]),d(xe,te(te({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kd_site:u,layout:s,locale:_,numPosts:p,orderBy:O,ref:b,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,tabs:x},ref:t,title:S},A),{},{excludeSandbox:!0,matchesMessagingOrigin:fr,messageHandler:N,type:lr,style:E?te(te({},j),{},{height:E}):j}))}var gr=A(dr);gr.displayName="Facebook";export{gr as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.module.js.map | ||
; | ||
import{cloneElement as e,createContext as t,createElement as r,createRef as n}from"preact";import{hydrate as o,render as a}from"preact";import{useCallback as l,useContext as i,useEffect as c,useImperativeHandle as s,useLayoutEffect as u,useMemo as f,useRef as p,useState as y}from"preact/hooks";function b(e,t,n){return r.apply(void 0,arguments)}function d(e){return y(e)}function O(e){return p(e)}function m(e,t){c(e,t)}function g(e,t){u(e,t)}function w(e,t){return l(e,t)}function v(e,t,r){return s(e,t,r)}var{hasOwnProperty:h,toString:j}=Object.prototype;function P(e){return e||{}}import{Children as S,createPortal as x,forwardRef as E}from"preact/compat";function _(e){return E(e)}var D=["auto","lazy","eager","unload"],R={auto:0,lazy:1,eager:2,unload:3},A=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var M,T=[null,"paint","layout","content","size","size paint","size layout","strict"],C={"position":"relative","width":"100%","height":"100%"},z=_((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:s,layout:u=!1,paint:f=!1,size:p=!1,"style":y,wrapperClassName:d,wrapperStyle:O}=e;const m=(p?4:0)+(u?2:0)+(f?1:0);return b(r,k(k({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,A)),{},{ref:t,className:`${o||""} ${d||""}`.trim()||null,style:k(k(k({},y),O),{},{contain:T[m]})}),b(a,k(k({},i),{},{ref:c,className:l,style:k(k({},p&&C),{},{"overflow":f?"hidden":"visible"},s)}),n))})),U=["as","children","className","style","wrapperClassName","wrapperStyle"];function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B(){const e=M||(M=t({renderable:!0,playable:!0,loading:"auto"},void 0));return i(e)}_((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:l,wrapperStyle:i}=e;return b(r,I(I({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,U)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:I(I({},a),i)}),n)}));var H=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var J=()=>!1,W=_((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=J,messageHandler:s,ready:u=!0,loading:f,onReadyState:p,sandbox:y,src:d}=e,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,H);const{playable:j}=B(),P=function(e){const{loading:t}=B();return function(e,t){const r=R[e]||0,n=R[t]||0,o=Math.max(r,n);return D[o]}(e,t)}(f),S="unload"!==P,x=O(!1),E=function(e){const t=O(null);return t.current=e,t}(p),_=w((e=>{if(e!==x.current){x.current=e;const t=E.current;null==t||t(e?"complete":"loading")}}),[E]),A=O(null);return v(t,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return A.current}})),[]),g((()=>{S||_(!1)}),[S,_]),m((()=>{const e=A.current;if(!j&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),g((()=>{const e=A.current;if(!e||!S)return;const t=e=>{const t=A.current;t&&e.source==t.contentWindow&&c(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,s,S,u]),b(z,V(V({},h),{},{layout:!0,size:!0,paint:!0}),S&&u&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:P,name:l,onLoad:()=>_(!0),part:"iframe",ref:A,sandbox:y,scrolling:"no",src:d,style:V(V({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));function Z(e,t){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null==t||t(e),null}}W.displayName="IframeEmbed";var K=self.AMP_CONFIG||{},Q=("string"==typeof K.thirdPartyFrameRegex?new RegExp(K.thirdPartyFrameRegex):K.thirdPartyFrameRegex,("string"==typeof K.cdnProxyRegex?new RegExp(K.cdnProxyRegex):K.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function X(e){if(!self.document||!self.document.head)return null;if(self.location&&Q.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Y,ee=K.thirdPartyUrl||"https://3p.ampproject.net",te=K.thirdPartyFrameHost||"ampproject.net";function re(e){const t=Object.getOwnPropertyDescriptor(e,"message");if(null!=t&&t.writable)return e;const{message:r,stack:n}=e,o=new Error(r);for(const t in e)o[t]=e[t];return o.stack=n,o}function ne(e){let t=null,r="";for(const e of arguments)e instanceof Error&&!t?t=re(e):(r&&(r+=" "),r+=e);return t?r&&(t.message=r+": "+t.message):t=new Error(r),t}function oe(e){var t,r;null===(t=(r=self).__AMP_REPORT_ERROR)||void 0===t||t.call(r,e)}function ae(e){return`${ee}/2108122216000/vendor/${e}.mjs`}function le(e){let t;if(e.crypto&&e.crypto.getRandomValues){const r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function ie(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+le(e)}K.cdnUrl||X("runtime-host"),K.errorReportingUrl,K.betaErrorReportingUrl,K.localDev,K.geoApiUrl||X("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var ce=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fe={},pe="sync-xhr 'none'",ye=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"].join(" ")+" "+["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"].join(" "),be=_((function(e,t){let{allow:r=pe,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:s=ye,src:u,type:p,title:y=p}=e,w=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ce);if(h=r,"number"!=typeof S&&(S=0),S+(j=pe).length>h.length||-1===h.indexOf(j,S))throw new Error(`'allow' prop must contain "${pe}". Found "${r}".`);var h,j,S;const x=O(null),E=O(null),_=f((()=>(fe[p]||(fe[p]=function(){let e=0;return()=>String(++e)}()),fe[p]())),[p]),{0:{name:D,src:R},1:A}=d({name:l,src:u});return g((()=>{var e,t;const r=null===(e=x.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=u?u:r?((i=r).__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||"d-"+le(i),"https://"+i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${te}/2108122216000/frame.html`):"about:blank";var i;if(l)return void A({name:l,src:a});if(!r)return;const s=Object.assign(P({"location":{"href":r.location.href},"sentinel":ie(r)}),o),f=Object.assign(P({"title":y,"type":p,"_context":s}),c);var b;A({name:JSON.stringify(P({"host":(b=a,Y||(Y=self.document.createElement("a")),function(e,t,r){return e.href="",new URL(t,e.href)}(Y,b)).hostname,"bootstrap":null!=n?n:ae(p),"type":p,"count":_,"attributes":f})),src:a})}),[n,o,_,l,c,u,y,p]),m((()=>{var e;const t=null===(e=E.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[D]),v(t,(()=>({get readyState(){var e;return null===(e=E.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=E.current)||void 0===e?void 0:e.node}})),[]),b(W,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?se(Object(r),!0).forEach((function(t){ue(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allow:r,contentRef:x,messageHandler:i,name:D,ref:E,ready:!!D,sandbox:a?void 0:s,src:R,title:y},w))}));be.displayName="ProxyIframeEmbed";var de=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var we=()=>!0,ve="Facebook comments",he=_((function(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:s,layout:u,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:m,requestResize:v,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,style:E,tabs:_,title:D=ve}=e,R=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,de);const{0:A,1:N}=d(null),k=w((e=>{var t;const r=null!==(t=Z(e.data))&&void 0!==t?t:function(e){if(!function(e){return"string"==typeof e&&0==e.indexOf("amp-")&&-1!=e.indexOf("{")}(e))return null;const t=e.indexOf("{");return Z(e.substr(t),(t=>{!function(e){const t=ne.apply(null,arguments);setTimeout((()=>{throw oe(t),t}))}(new Error(`MESSAGING: Failed to parse message: ${e}\n${t.message}`))}))}(e.data);if("ready"==r.action&&(null==y||y()),"embed-size"==r.type){const e=r.height;v?(v(e),N("100%")):N(e)}}),[v,y]),{0:F,1:M}=d(f);return g((()=>{var e,r;if(f)return void M(f);const n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&M(n.navigator.language.replace("-","_"))}),[f,t]),b(be,me(me({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,"kd_site":s,layout:u,locale:F,numPosts:p,orderBy:O,ref:m,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,tabs:_},ref:t,title:D},R),{},{excludeSandbox:!0,matchesMessagingOrigin:we,messageHandler:k,type:"facebook",style:A?me(me({},E),{},{height:A}):E}))}));he.displayName="Facebook";export{he as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
@@ -1,3 +0,3 @@ | ||
var Or=Object.create,ne=Object.defineProperty,_r=Object.getOwnPropertyDescriptor,Pr=Object.getOwnPropertyNames,Fr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty,De=function(e){return ne(e,"__esModule",{value:!0})},Nr=function(e,r){for(var t in De(e),r)ne(e,t,{get:r[t],enumerable:!0})},Ir=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Pr(r),a=0,i=o.length;a<i;a++)n=o[a],!Rr.call(e,n)&&"default"!==n&&ne(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=_r(r,n))||t.enumerable});return e},oe=function(e){return Ir(De(ne(null!=e?Or(Fr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Nr(exports,{Facebook:function(){return Er}});var $=oe(require("react")),Te=oe(require("react-dom")),p=oe(require("react"));function g(e,r,t){return $.createElement.apply(void 0,arguments)}function Me(e){return $.createContext(e,void 0)}function z(e){return p.useState(e)}function j(e){return p.useRef(e)}function ie(e,r){p.useEffect(e,r)}function U(e,r){p.useLayoutEffect(e,r)}function Ce(e){return p.useContext(e)}function ve(e,r){return p.useMemo(e,r)}function ae(e,r){return p.useCallback(e,r)}function K(e,r,t){return p.useImperativeHandle(e,r,t)}var de=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},ge=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function Le(){var e=0;return function(){return String(++e)}}var je=Object.prototype,Xt=je.hasOwnProperty,qt=je.toString;function Y(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function w(e){return e||{}}function Ue(e){return e.replace("-","_")}function ke(e,r,t){return"number"!=typeof t&&(t=0),!(t+r.length>e.length)&&-1!==e.indexOf(r,t)}var X,ue=oe(require("react"));function F(e){return ue.forwardRef(e)}function se(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},wr=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Be=(se(X={},x.AUTO,0),se(X,x.LAZY,1),se(X,x.EAGER,2),se(X,x.UNLOAD,3),X);function He(e,r){var t=Be[e]||0,n=Be[r]||0,o=Math.max(t,n);return wr[o]}var Z={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},Dr=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ve(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function D(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ve(Object(t),!0).forEach((function(r){Tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ve(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Tr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Mr(e,r){if(null==e)return{};var t,n,o=Cr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Cr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Lr=[null,"paint","layout","content","size","size paint","size layout","strict"],jr={position:"relative",width:"100%",height:"100%"};function Ur(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,p=e.layout,y=void 0!==p&&p,d=e.paint,b=void 0!==d&&d,O=e.size,m=void 0!==O&&O,v=e.style,h=e.wrapperClassName,w=e.wrapperStyle,j=(m?4:0)+(y?2:0)+(b?1:0);return g(n,D(D({},Mr(e,Dr)),{},{ref:r,className:"".concat(a||""," ").concat(h||"").trim()||null,style:D(D(D({},v),w),{},{contain:Lr[j]})}),g(c,D(D({},u),{},{ref:s,className:l,style:D(D({},m&&jr),{},{overflow:b?"hidden":"visible"},f)}),o))}var ye=F(Ur),kr=["as","children","className","style","wrapperClassName","wrapperStyle"];function Ge(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function ce(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ge(Object(t),!0).forEach((function(r){Br(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ge(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Br(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Hr(e,r){if(null==e)return{};var t,n,o=Vr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Vr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Gr(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return g(n,ce(ce({},Hr(e,kr)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:ce(ce({},i),l)}),o)}var We,Wr=F(Gr);function he(e){var r=j(null);return r.current=e,r}function $r(){return We||(We=Me({renderable:!0,playable:!0,loading:x.AUTO}))}function xe(){return Ce($r())}function $e(e){return He(e,xe().loading)}var zr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ze(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function le(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ze(Object(t),!0).forEach((function(r){Xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ze(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qr(e,r){if(null==e)return{};var t,n,o=Jr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function Jr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Kr=function(){return!1},Yr="about:blank",Zr=function(e){return e&&e!=Yr&&!e.includes("#")};function Qr(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?Kr:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,y=e.loading,d=e.onReadyState,b=e.sandbox,O=e.src,m=qr(e,zr),v=xe().playable,h=$e(y),w=h!==x.UNLOAD,P=j(!1),_=he(d),S=ae((function(e){if(e!==P.current){P.current=e;var r=_.current;null==r||r(e?Z.COMPLETE:Z.LOADING)}}),[_]),A=j(null);return K(r,(function(){return{get readyState(){return P.current?Z.COMPLETE:Z.LOADING},get node(){return A.current}}}),[]),U((function(){w||S(!1)}),[w,S]),ie((function(){var e=A.current;if(!v&&e){var r=e.src;if(Zr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[v]),U((function(){var e=A.current;if(e&&w){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!u(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[u,s,w,p]),g(ye,le(le({},m),{},{layout:!0,size:!0,paint:!0}),w&&p&&g("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:h,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:A,sandbox:b,scrolling:"no",src:O,style:le(le({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var be=F(Qr);function fe(){return!0}function Q(e){var r;if(fe())return!1;var t=e||self;return!!(null!==(r=t.AMP_CONFIG)&&void 0!==r&&r.test||t.__AMP_TEST||t.__karma__)}function ee(){return!0}be.displayName="IframeEmbed";var y=self.AMP_CONFIG||{},rt=("string"==typeof y.thirdPartyFrameRegex?new RegExp(y.thirdPartyFrameRegex):y.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Xe=("string"==typeof y.cdnProxyRegex?new RegExp(y.cdnProxyRegex):y.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function qe(e){if(!self.document||!self.document.head||self.location&&Xe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var H={thirdParty:y.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:y.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:rt,cdn:y.cdnUrl||qe("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Xe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:y.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:y.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:y.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:y.geoApiUrl||qe("amp-geo-api")},re=Array.isArray;function Ee(e){return JSON.parse(e)}function te(e,r){try{return Ee(e)}catch(e){return null==r||r(e),null}}function q(){return"2107302322000"}var Se={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Ae=self.__AMP_LOG,ir=null;function J(){if(Ae.dev)return Ae.dev;if(!ir)throw new Error("failed to call initLogConstructor");return Ae.dev=new ir(self,(function(e){return e>=3?Se.FINE:e>=2?Se.INFO:Se.OFF}))}function pe(e,r,t,n,o,a,i,c,l,u,s){return ee()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),J().assert(e,r,t,n,o,a,i,c,l,u,s))}function pt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ur(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mt(e,r,t){return r&&ur(e.prototype,r),t&&ur(e,t),e}var Oe,cr,sr=function(){function e(r){pt(this,e),this.capacity_=r,this.size_=0,this.access_=0,this.cache_=Y()}return mt(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var r=this.cache_[e];if(r)return r.access=++this.access_,r.payload}},{key:"put",value:function(e,r){this.has(e)||this.size_++,this.cache_[e]={payload:r,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,r=this.cache_,t=this.access_+1;for(var n in r){var o=r[n].access;o<t&&(t=o,e=n)}void 0!==e&&(delete r[e],this.size_--)}}}]),e}(),$a=new Set(["c","v","a","ad"]);function _e(e,r){return Oe||(Oe=self.document.createElement("a"),cr=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new sr(100))),vt(Oe,e,r?null:cr)}function vt(e,r,t){if(t&&t.has(r))return t.get(r);e.href=r,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=Q()&&Object.freeze?Object.freeze(o):o;return t&&t.put(r,a),a}function lr(e){return"".concat(H.thirdParty,"/").concat(q(),"/vendor/").concat(e).concat(".js")}function fr(e,r){var t=r||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||dt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(H.thirdPartyFrameHost,"/").concat(q(),"/")+"".concat(t,".html")}function dt(e){return"d-"+pr(e)}function pr(e){var r;if(e.crypto&&e.crypto.getRandomValues){var t=new Uint32Array(2);e.crypto.getRandomValues(t),r=String(t[0])+t[1]}else r=String(e.Math.random()).substr(2)+"0";return r}function mr(e){for(var r=0,t=e;t&&t!=t.parent;t=t.parent)r++;return String(r)+"-"+pr(e)}var gt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function vr(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function yt(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?vr(Object(t),!0).forEach((function(r){ht(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ht(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xt(e,r){return At(e)||St(e,r)||Et(e,r)||bt()}function bt(){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 Et(e,r){if(e){if("string"==typeof e)return dr(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dr(e,r)}}function dr(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function St(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=t.return&&t.return()}finally{if(c)throw o}}return a}}function At(e){if(Array.isArray(e))return e}function Ot(e,r){if(null==e)return{};var t,n,o=_t(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function _t(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Pe={},gr={EMBED_SIZE:"embed-size"},Fe="sync-xhr 'none'",Pt=de().join(" ")+" "+ge().join(" ");function Ft(e,r){var t=e.allow,n=void 0===t?Fe:t,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?Pt:s,p=e.src,y=e.type,d=e.title,b=void 0===d?y:d,O=Ot(e,gt);if(!ke(n,Fe))throw new Error("'allow' prop must contain \"".concat(Fe,'". Found "').concat(n,'".'));var m=j(null),v=j(null),h=ve((function(){return Pe[y]||(Pe[y]=Le()),Pe[y]()}),[y]),P=xt(z({name:c,src:p}),2),_=P[0],S=_.name,x=_.src,A=P[1];return U((function(){var e,r,t=null===(e=m.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView,n=null!=p?p:t?fr(t):"about:blank";if(c)A({name:c,src:n});else if(t){var i=Object.assign(w({location:{href:t.location.href},sentinel:mr(t)}),a),l=Object.assign(w({title:b,type:y,_context:i}),u);A({name:JSON.stringify(w({host:_e(n).hostname,bootstrap:null!=o?o:lr(y),type:y,count:h,attributes:l})),src:n})}}),[o,a,h,c,u,p,b,y]),ie((function(){var e,r=null===(e=v.current)||void 0===e?void 0:e.node;r&&r.parentNode.insertBefore(r,r.nextSibling)}),[S]),K(r,(function(){return{get readyState(){var e;return null===(e=v.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=v.current)||void 0===e?void 0:e.node}}}),[]),g(be,yt({allow:n,contentRef:m,messageHandler:l,name:S,ref:v,ready:!!S,sandbox:i?void 0:f,src:x,title:b},O))}var Re=F(Ft);Re.displayName="ProxyIframeEmbed";var Rt="amp-";function yr(e){if(!Nt(e))return null;var r=e.indexOf("{");return pe(-1!=r),te(e.substr(r),(function(r){return J().error("MESSAGING","Failed to parse message: "+e,r)}))}function Nt(e){return"string"==typeof e&&0==e.indexOf(Rt)&&-1!=e.indexOf("{")}var It=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function hr(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function me(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?hr(Object(t),!0).forEach((function(r){wt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function wt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xr(e,r){return Ct(e)||Mt(e,r)||Tt(e,r)||Dt()}function Dt(){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 Tt(e,r){if(e){if("string"==typeof e)return br(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return br(e,r)}}function br(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Mt(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=t.return&&t.return()}finally{if(c)throw o}}return a}}function Ct(e){if(Array.isArray(e))return e}function Lt(e,r){if(null==e)return{};var t,n,o=jt(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function jt(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Ut="facebook",kt="100%",Bt=function(){return!0},Ht="Facebook comments";function Vt(e,r){var t=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,y=e.onReady,d=e.orderBy,b=e.refLabel,O=e.requestResize,m=e.share,v=e.showFacepile,h=e.showText,w=e.size,j=e.smallHeader,P=e.style,_=e.tabs,S=e.title,x=void 0===S?Ht:S,A=Lt(e,It),E=xr(z(null),2),D=E[0],R=E[1],N=ae((function(e){var r,t=null!==(r=te(e.data))&&void 0!==r?r:yr(e.data);if("ready"==t.action&&(null==y||y()),t.type==gr.EMBED_SIZE){var n=t.height;O?(O(n),R(kt)):R(n)}}),[O,y]),F=xr(z(f),2),C=F[0],I=F[1];return U((function(){var e,t;if(f)I(f);else{var n=null==r||null===(e=r.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;!n||I(Ue(n.navigator.language))}}),[f,r]),g(Re,me(me({options:{action:t,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,kd_site:u,layout:s,locale:C,numPosts:p,orderBy:d,ref:b,share:m,showFacepile:v,showText:h,size:w,smallHeader:j,tabs:_},ref:r,title:x},A),{},{excludeSandbox:!0,matchesMessagingOrigin:Bt,messageHandler:N,type:Ut,style:D?me(me({},P),{},{height:D}):P}))}var Er=F(Vt);Er.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.js.map | ||
; | ||
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,r){for(var t in __markAsModule(e),r)__defProp(e,t,{get:r[t],enumerable:!0})},__reExport=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=__getOwnPropNames(r),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=__getOwnPropDesc(r,n))||t.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};__export(exports,{Facebook:function(){return Facebook}});var preact=__toModule(require("react")),preactDOM=__toModule(require("react-dom")),hooks=__toModule(require("react"));function createElement2(e,r,t){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,r){hooks.useEffect(e,r)}function useLayoutEffect2(e,r){hooks.useLayoutEffect(e,r)}function useContext2(e){return hooks.useContext(e)}function useMemo2(e,r){return hooks.useMemo(e,r)}function useCallback2(e,r){return hooks.useCallback(e,r)}function useImperativeHandle2(e,r,t){return hooks.useImperativeHandle(e,r,t)}var getRequiredSandboxFlags=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},getOptionalSandboxFlags=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function sequentialIdGenerator(){var e=0;return function(){return String(++e)}}var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function map(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function dict(e){return e||{}}function dashToUnderline(e){return e.replace("-","_")}function includes(e,r,t){return"number"!=typeof t&&(t=0),!(t+r.length>e.length)&&-1!==e.indexOf(r,t)}var _MAP,compat=__toModule(require("react"));function forwardRef2(e){return compat.forwardRef(e)}function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,r){var t=MAP[e]||0,n=MAP[r]||0,o=Math.max(t,n);return ORDER[o]}var ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},_excluded=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){_defineProperty2(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty2(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _objectWithoutProperties(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,s=e.contentProps,u=e.contentRef,f=e.contentStyle,p=e.layout,d=void 0!==p&&p,y=e.paint,b=void 0!==y&&y,_=e.size,m=void 0!==_&&_,h=e.style,g=e.wrapperClassName,O=e.wrapperStyle,v=(m?4:0)+(d?2:0)+(b?1:0);return createElement2(n,_objectSpread(_objectSpread({},_objectWithoutProperties(e,_excluded)),{},{ref:r,className:"".concat(a||""," ").concat(g||"").trim()||null,style:_objectSpread(_objectSpread(_objectSpread({},h),O),{},{contain:CONTAIN[v]})}),createElement2(c,_objectSpread(_objectSpread({},s),{},{ref:u,className:l,style:_objectSpread(_objectSpread({},m&&SIZE_CONTENT_STYLE),{},{"overflow":b?"hidden":"visible"},f)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","className","style","wrapperClassName","wrapperStyle"];function ownKeys2(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys2(Object(t),!0).forEach((function(r){_defineProperty3(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys2(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty3(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _objectWithoutProperties2(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose2(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose2(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}function WrapperWithRef(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutProperties2(e,_excluded2)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),o)}var context,Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var r=useRef2(null);return r.current=e,r}function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function ownKeys3(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread3(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys3(Object(t),!0).forEach((function(r){_defineProperty4(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys3(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty4(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _objectWithoutProperties3(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose3(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose3(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,s=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,u=e.messageHandler,f=e.ready,p=void 0===f||f,d=e.loading,y=e.onReadyState,b=e.sandbox,_=e.src,m=_objectWithoutProperties3(e,_excluded3),h=useAmpContext().playable,g=useLoading(d),O=g!==Loading.UNLOAD,v=useRef2(!1),P=useValueRef(y),j=useCallback2((function(e){if(e!==v.current){v.current=e;var r=P.current;null==r||r(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[P]),A=useRef2(null);return useImperativeHandle2(r,(function(){return{get readyState(){return v.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return A.current}}}),[]),useLayoutEffect2((function(){O||j(!1)}),[O,j]),useEffect2((function(){var e=A.current;if(!h&&e){var r=e.src;canResetSrc(r)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),useLayoutEffect2((function(){var e=A.current;if(e&&O){var r=function(e){var r=A.current;r&&e.source==r.contentWindow&&s(e.origin)&&u(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[s,u,O,p]),createElement2(ContainWrapper,_objectSpread3(_objectSpread3({},m),{},{layout:!0,size:!0,paint:!0}),O&&p&&createElement2("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:i,onLoad:function(){return j(!0)},part:"iframe",ref:A,sandbox:b,scrolling:"no",src:_,style:_objectSpread3(_objectSpread3({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);function isProd(){return!0}function isTest(e){var r;if(isProd())return!1;var t=e||self;return!!(null!==(r=t.AMP_CONFIG)&&void 0!==r&&r.test||t.__AMP_TEST||t.__karma__)}function isMinified(){return!0}function version(){return"2108122216000"}IframeEmbed.displayName="IframeEmbed";var isArray=Array.isArray;function remove(e,r){for(var t=[],n=0,o=0;o<e.length;o++){var a=e[o];r(a,o,e)?t.push(a):(n<o&&(e[n]=a),n++)}return n<e.length&&(e.length=n),t}function isElement(e){return 1==(null==e?void 0:e.nodeType)}function elementStringOrPassThru(e){return isElement(e)?(e=e).tagName.toLowerCase()+(e.id?"#".concat(e.id):""):e}function assert(e,r){var t,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed";if(r)return r;e&&-1==o.indexOf(e)&&(o+=e);for(var a=3,i=o.split("%s"),c=i.shift(),l=[c];i.length;){var s=arguments[a++],u=i.shift();c+=elementStringOrPassThru(s)+u,l.push(s,u.trim())}var f=new Error(c);throw f.messageArray=remove(l,(function(e){return""!==e})),null===(t=(n=self).__AMP_REPORT_ERROR)||void 0===t||t.call(n,f),f}function devAssertDceCheck(){self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__")}function devAssert(e,r,t,n,o,a,i,c,l,s,u){return isMinified()?e:(devAssertDceCheck(),assert("",e,r,t,n,o,a,i,c,l,s,u))}function parseJson(e){return JSON.parse(e)}function tryParseJson(e,r){try{return parseJson(e)}catch(e){return null==r||r(e),null}}var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")};function _createForOfIteratorHelper(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(c)throw a}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function duplicateErrorIfNecessary(e){var r=Object.getOwnPropertyDescriptor(e,"message");if(null!=r&&r.writable)return e;var t=e.message,n=e.stack,o=new Error(t);for(var a in e)o[a]=e[a];return o.stack=n,o}function createError(e){var r,t=null,n="",o=_createForOfIteratorHelper(arguments);try{for(o.s();!(r=o.n()).done;){var a=r.value;a instanceof Error&&!t?t=duplicateErrorIfNecessary(a):(n&&(n+=" "),n+=a)}}catch(e){o.e(e)}finally{o.f()}return t?n&&(t.message=n+": "+t.message):t=new Error(n),t}function maybeReportError(e){var r,t;null===(r=(t=self).__AMP_REPORT_ERROR)||void 0===r||r.call(t,e)}function rethrowAsync(e){var r=createError.apply(null,arguments);setTimeout((function(){throw maybeReportError(r),r}))}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}var cachedAnchorEl,urlCache,LruCache=function(){function e(r){_classCallCheck(this,e),this.capacity_=r,this.size_=0,this.access_=0,this.cache_=map()}return _createClass(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var r=this.cache_[e];if(r)return r.access=++this.access_,r.payload}},{key:"put",value:function(e,r){this.has(e)||this.size_++,this.cache_[e]={payload:r,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,r=this.cache_,t=this.access_+1;for(var n in r){var o=r[n].access;o<t&&(t=o,e=n)}void 0!==e&&(delete r[e],this.size_--)}}}]),e}(),SERVING_TYPE_PREFIX=new Set(["c","v","a","ad"]);function parseUrlDeprecated(e,r){return cachedAnchorEl||(cachedAnchorEl=self.document.createElement("a"),urlCache=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new LruCache(100))),parseUrlWithA(cachedAnchorEl,e,r?null:urlCache)}function parseUrlWithA(e,r,t){if(t&&t.has(r))return t.get(r);e.href=r,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=isTest()&&Object.freeze?Object.freeze(o):o;return t&&t.put(r,a),a}function getBootstrapUrl(e){return"".concat(urls.thirdParty,"/").concat(version(),"/vendor/").concat(e).concat(".js")}function getDefaultBootstrapBaseUrl(e,r){var t=r||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||getSubDomain(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(urls.thirdPartyFrameHost,"/").concat(version(),"/")+"".concat(t,".html")}function getSubDomain(e){return"d-"+getRandom(e)}function getRandom(e){var r;if(e.crypto&&e.crypto.getRandomValues){var t=new Uint32Array(2);e.crypto.getRandomValues(t),r=String(t[0])+t[1]}else r=String(e.Math.random()).substr(2)+"0";return r}function generateSentinel(e){for(var r=0,t=e;t&&t!=t.parent;t=t.parent)r++;return String(r)+"-"+getRandom(e)}var _excluded4=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function ownKeys4(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread4(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys4(Object(t),!0).forEach((function(r){_defineProperty5(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys4(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty5(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray2(e,r)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray2(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray2(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray2(e,r):void 0}}function _arrayLikeToArray2(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==t.return||t.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _objectWithoutProperties4(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose4(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose4(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var countGenerators={},MessageType={EMBED_SIZE:"embed-size"},BLOCK_SYNC_XHR="sync-xhr 'none'",DEFAULT_SANDBOX=getRequiredSandboxFlags().join(" ")+" "+getOptionalSandboxFlags().join(" ");function ProxyIframeEmbedWithRef(e,r){var t=e.allow,n=void 0===t?BLOCK_SYNC_XHR:t,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,s=e.options,u=e.sandbox,f=void 0===u?DEFAULT_SANDBOX:u,p=e.src,d=e.type,y=e.title,b=void 0===y?d:y,_=_objectWithoutProperties4(e,_excluded4);if(!includes(n,BLOCK_SYNC_XHR))throw new Error("'allow' prop must contain \"".concat(BLOCK_SYNC_XHR,'". Found "').concat(n,'".'));var m=useRef2(null),h=useRef2(null),g=useMemo2((function(){return countGenerators[d]||(countGenerators[d]=sequentialIdGenerator()),countGenerators[d]()}),[d]),O=_slicedToArray(useState2({name:c,src:p}),2),v=O[0],P=v.name,j=v.src,A=O[1];return useLayoutEffect2((function(){var e,r,t=null===(e=m.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView,n=null!=p?p:t?getDefaultBootstrapBaseUrl(t):"about:blank";if(c)A({name:c,src:n});else if(t){var i=Object.assign(dict({"location":{"href":t.location.href},"sentinel":generateSentinel(t)}),a),l=Object.assign(dict({"title":b,"type":d,"_context":i}),s);A({name:JSON.stringify(dict({"host":parseUrlDeprecated(n).hostname,"bootstrap":null!=o?o:getBootstrapUrl(d),"type":d,"count":g,"attributes":l})),src:n})}}),[o,a,g,c,s,p,b,d]),useEffect2((function(){var e,r=null===(e=h.current)||void 0===e?void 0:e.node;r&&r.parentNode.insertBefore(r,r.nextSibling)}),[P]),useImperativeHandle2(r,(function(){return{get readyState(){var e;return null===(e=h.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=h.current)||void 0===e?void 0:e.node}}}),[]),createElement2(IframeEmbed,_objectSpread4({allow:n,contentRef:m,messageHandler:l,name:P,ref:h,ready:!!P,sandbox:i?void 0:f,src:j,title:b},_))}var ProxyIframeEmbed=forwardRef2(ProxyIframeEmbedWithRef);ProxyIframeEmbed.displayName="ProxyIframeEmbed";var AMP_MESSAGE_PREFIX="amp-";function deserializeMessage(e){if(!isAmpMessage(e))return null;var r=e.indexOf("{");return devAssert(-1!=r),tryParseJson(e.substr(r),(function(r){rethrowAsync(new Error("MESSAGING: Failed to parse message: ".concat(e,"\n").concat(r.message)))}))}function isAmpMessage(e){return"string"==typeof e&&0==e.indexOf(AMP_MESSAGE_PREFIX)&&-1!=e.indexOf("{")}var _excluded5=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function ownKeys5(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function _objectSpread5(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys5(Object(t),!0).forEach((function(r){_defineProperty6(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys5(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function _defineProperty6(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _slicedToArray2(e,r){return _arrayWithHoles2(e)||_iterableToArrayLimit2(e,r)||_unsupportedIterableToArray3(e,r)||_nonIterableRest2()}function _nonIterableRest2(){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 _unsupportedIterableToArray3(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray3(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray3(e,r):void 0}}function _arrayLikeToArray3(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit2(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==t.return||t.return()}finally{if(c)throw o}}return a}}function _arrayWithHoles2(e){if(Array.isArray(e))return e}function _objectWithoutProperties5(e,r){if(null==e)return{};var t,n,o=_objectWithoutPropertiesLoose5(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _objectWithoutPropertiesLoose5(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}var TYPE="facebook",FULL_HEIGHT="100%",MATCHES_MESSAGING_ORIGIN=function(){return!0},DEFAULT_TITLE="Facebook comments";function FacebookWithRef(e,r){var t=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,s=e.kdSite,u=e.layout,f=e.locale,p=e.numPosts,d=e.onReady,y=e.orderBy,b=e.refLabel,_=e.requestResize,m=e.share,h=e.showFacepile,g=e.showText,O=e.size,v=e.smallHeader,P=e.style,j=e.tabs,A=e.title,w=void 0===A?DEFAULT_TITLE:A,S=_objectWithoutProperties5(e,_excluded5),E=_slicedToArray2(useState2(null),2),R=E[0],x=E[1],T=useCallback2((function(e){var r,t=null!==(r=tryParseJson(e.data))&&void 0!==r?r:deserializeMessage(e.data);if("ready"==t.action&&(null==d||d()),t.type==MessageType.EMBED_SIZE){var n=t.height;_?(_(n),x(FULL_HEIGHT)):x(n)}}),[_,d]),L=_slicedToArray2(useState2(f),2),I=L[0],C=L[1];return useLayoutEffect2((function(){var e,t;if(f)C(f);else{var n=null==r||null===(e=r.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;n&&C(dashToUnderline(n.navigator.language))}}),[f,r]),createElement2(ProxyIframeEmbed,_objectSpread5(_objectSpread5({options:{action:t,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,"kd_site":s,layout:u,locale:I,numPosts:p,orderBy:y,ref:b,share:m,showFacepile:h,showText:g,size:O,smallHeader:v,tabs:j},ref:r,title:w},S),{},{excludeSandbox:!0,matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:T,type:TYPE,style:R?_objectSpread5(_objectSpread5({},P),{},{height:R}):P}))}var Facebook=forwardRef2(FacebookWithRef);Facebook.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
@@ -447,2 +447,99 @@ var __create = Object.create; | ||
// src/core/mode/version.js | ||
function version() { | ||
return "2108122216000"; | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
function remove(array, shouldRemove) { | ||
var removed = []; | ||
var index = 0; | ||
for (var i = 0; i < array.length; i++) { | ||
var item = array[i]; | ||
if (shouldRemove(item, i, array)) { | ||
removed.push(item); | ||
} else { | ||
if (index < i) { | ||
array[index] = item; | ||
} | ||
index++; | ||
} | ||
} | ||
if (index < array.length) { | ||
array.length = index; | ||
} | ||
return removed; | ||
} | ||
// src/core/types/index.js | ||
function isElement(value) { | ||
return (value == null ? void 0 : value.nodeType) == 1; | ||
} | ||
// src/core/error/message-helpers.js | ||
function elementStringOrPassThru(val) { | ||
if (isElement(val)) { | ||
val = val; | ||
return val.tagName.toLowerCase() + (val.id ? "#" + val.id : ""); | ||
} | ||
return val; | ||
} | ||
// src/core/assert/base.js | ||
function assert(sentinel, shouldBeTruthy, opt_message, var_args) { | ||
if (opt_message === void 0) { | ||
opt_message = "Assertion failed"; | ||
} | ||
if (shouldBeTruthy) { | ||
return shouldBeTruthy; | ||
} | ||
if (sentinel && opt_message.indexOf(sentinel) == -1) { | ||
opt_message += sentinel; | ||
} | ||
var i = 3; | ||
var splitMessage = opt_message.split("%s"); | ||
var message = splitMessage.shift(); | ||
var messageArray = [message]; | ||
while (splitMessage.length) { | ||
var subValue = arguments[i++]; | ||
var nextConstant = splitMessage.shift(); | ||
message += elementStringOrPassThru(subValue) + nextConstant; | ||
messageArray.push(subValue, nextConstant.trim()); | ||
} | ||
var error = new Error(message); | ||
error.messageArray = remove(messageArray, function(x) { | ||
return x !== ""; | ||
}); | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
throw error; | ||
} | ||
// src/core/assert/dev.js | ||
function devAssertDceCheck() { | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
} | ||
function devAssert(shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTruthy; | ||
} | ||
devAssertDceCheck(); | ||
return assert("", shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -476,18 +573,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -518,7 +599,89 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; | ||
} | ||
function getHashParams(opt_win) { | ||
var _ref = opt_win || self, location = _ref.location; | ||
return parseQueryString(location["originalHash"] || location.hash); | ||
} | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107302322000"; | ||
// src/core/error/index.js | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) | ||
return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) | ||
o = it; | ||
var i = 0; | ||
return function() { | ||
if (i >= o.length) | ||
return { done: true }; | ||
return { done: false, value: o[i++] }; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) | ||
return; | ||
if (typeof o === "string") | ||
return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) | ||
n = o.constructor.name; | ||
if (n === "Map" || n === "Set") | ||
return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) | ||
return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) | ||
len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
function duplicateErrorIfNecessary(error) { | ||
var messageProperty = Object.getOwnPropertyDescriptor(error, "message"); | ||
if (messageProperty != null && messageProperty.writable) { | ||
return error; | ||
} | ||
var message = error.message, stack = error.stack; | ||
var e = new Error(message); | ||
for (var prop in error) { | ||
e[prop] = error[prop]; | ||
} | ||
e.stack = stack; | ||
return e; | ||
} | ||
function createError(var_args) { | ||
var error = null; | ||
var message = ""; | ||
for (var _iterator = _createForOfIteratorHelperLoose(arguments), _step; !(_step = _iterator()).done; ) { | ||
var arg = _step.value; | ||
if (arg instanceof Error && !error) { | ||
error = duplicateErrorIfNecessary(arg); | ||
} else { | ||
if (message) { | ||
message += " "; | ||
} | ||
message += arg; | ||
} | ||
} | ||
if (!error) { | ||
error = new Error(message); | ||
} else if (message) { | ||
error.message = message + ": " + error.message; | ||
} | ||
return error; | ||
} | ||
function maybeReportError(error) { | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
} | ||
function rethrowAsync(var_args) { | ||
var error = createError.apply(null, arguments); | ||
setTimeout(function() { | ||
maybeReportError(error); | ||
throw error; | ||
}); | ||
} | ||
@@ -535,11 +698,9 @@ // src/mode.js | ||
function getMode_(win) { | ||
var hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
var hashParams = getHashParams(win); | ||
return { | ||
localDev: isLocalDev(win), | ||
development: isModeDevelopment(win), | ||
development: isModeDevelopment(win, hashParams), | ||
esm: false, | ||
geoOverride: hashQuery["amp-geo"], | ||
geoOverride: hashParams["amp-geo"], | ||
test: isTest(win), | ||
log: hashQuery["log"], | ||
version: internalRuntimeVersion(), | ||
rtvVersion: getRtvVersion(win) | ||
@@ -551,19 +712,13 @@ }; | ||
var _win$AMP_CONFIG; | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || "01" + internalRuntimeVersion(); | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || "01" + version(); | ||
} | ||
return rtvVersion; | ||
} | ||
function isModeDevelopment(win) { | ||
var hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
return !!(["1", "actions", "amp", "amp4ads", "amp4email"].includes(hashQuery["development"]) || win.AMP_DEV_MODE); | ||
function isModeDevelopment(win, opt_hashParams) { | ||
var devModes = ["1", "actions", "amp", "amp4ads", "amp4email"]; | ||
var devParam = opt_hashParams || getHashParams(win); | ||
return devModes.includes(devParam["development"]) || !!win.AMP_DEV_MODE; | ||
} | ||
// src/log.js | ||
var LogLevel = { | ||
OFF: 0, | ||
ERROR: 1, | ||
WARN: 2, | ||
INFO: 3, | ||
FINE: 4 | ||
}; | ||
self.__AMP_LOG = self.__AMP_LOG || { | ||
@@ -575,29 +730,2 @@ user: null, | ||
var logs = self.__AMP_LOG; | ||
var logConstructor = null; | ||
function dev() { | ||
if (logs.dev) { | ||
return logs.dev; | ||
} | ||
if (!logConstructor) { | ||
throw new Error("failed to call initLogConstructor"); | ||
} | ||
return logs.dev = new logConstructor(self, function(logNum) { | ||
if (logNum >= 3) { | ||
return LogLevel.FINE; | ||
} | ||
if (logNum >= 2) { | ||
return LogLevel.INFO; | ||
} | ||
return LogLevel.OFF; | ||
}); | ||
} | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTrueish; | ||
} | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
return dev().assert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
@@ -757,3 +885,3 @@ // src/core/data-structures/lru-cache.js | ||
} | ||
return urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + extension; | ||
return urls.thirdParty + "/" + version() + "/vendor/" + type + extension; | ||
} | ||
@@ -766,6 +894,6 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN = parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN || getSubDomain(parentWindow); | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + ("." + urls.thirdPartyFrameHost + "/" + internalRuntimeVersion() + "/") + (srcFileBasename + ".html"); | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + ("." + urls.thirdPartyFrameHost + "/" + version() + "/") + (srcFileBasename + ".html"); | ||
} | ||
function getDevelopmentBootstrapBaseUrl(parentWindow, srcFileBasename) { | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? internalRuntimeVersion() + "/" + srcFileBasename : "current/" + srcFileBasename + ".max") + ".html"; | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? version() + "/" + srcFileBasename : "current/" + srcFileBasename + ".max") + ".html"; | ||
} | ||
@@ -933,5 +1061,5 @@ function getAdsLocalhost(win) { | ||
var startPos = message.indexOf("{"); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), function(e) { | ||
return dev().error("MESSAGING", "Failed to parse message: " + message, e); | ||
rethrowAsync(new Error("MESSAGING: Failed to parse message: " + message + "\n" + e.message)); | ||
}); | ||
@@ -938,0 +1066,0 @@ } |
@@ -463,2 +463,93 @@ // src/preact/index.js | ||
// src/core/mode/version.js | ||
function version() { | ||
return "2108122216000"; | ||
} | ||
// src/core/types/array.js | ||
function remove(array, shouldRemove) { | ||
const removed = []; | ||
let index = 0; | ||
for (let i = 0; i < array.length; i++) { | ||
const item = array[i]; | ||
if (shouldRemove(item, i, array)) { | ||
removed.push(item); | ||
} else { | ||
if (index < i) { | ||
array[index] = item; | ||
} | ||
index++; | ||
} | ||
} | ||
if (index < array.length) { | ||
array.length = index; | ||
} | ||
return removed; | ||
} | ||
// src/core/types/index.js | ||
function isElement(value) { | ||
return (value == null ? void 0 : value.nodeType) == 1; | ||
} | ||
// src/core/error/message-helpers.js | ||
function elementStringOrPassThru(val) { | ||
if (isElement(val)) { | ||
val = val; | ||
return val.tagName.toLowerCase() + (val.id ? `#${val.id}` : ""); | ||
} | ||
return val; | ||
} | ||
// src/core/assert/base.js | ||
function assert(sentinel, shouldBeTruthy, opt_message = "Assertion failed", var_args) { | ||
if (shouldBeTruthy) { | ||
return shouldBeTruthy; | ||
} | ||
if (sentinel && opt_message.indexOf(sentinel) == -1) { | ||
opt_message += sentinel; | ||
} | ||
let i = 3; | ||
const splitMessage = opt_message.split("%s"); | ||
let message = splitMessage.shift(); | ||
const messageArray = [message]; | ||
while (splitMessage.length) { | ||
const subValue = arguments[i++]; | ||
const nextConstant = splitMessage.shift(); | ||
message += elementStringOrPassThru(subValue) + nextConstant; | ||
messageArray.push(subValue, nextConstant.trim()); | ||
} | ||
const error = new Error(message); | ||
error.messageArray = remove(messageArray, (x) => x !== ""); | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
throw error; | ||
} | ||
// src/core/assert/dev.js | ||
function devAssertDceCheck() { | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
} | ||
function devAssert(shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTruthy; | ||
} | ||
devAssertDceCheck(); | ||
return assert("", shouldBeTruthy, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/config.js | ||
@@ -492,15 +583,2 @@ var env = self.AMP_CONFIG || {}; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/core/types/string/url.js | ||
@@ -528,7 +606,56 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; | ||
} | ||
function getHashParams(opt_win) { | ||
const { | ||
location | ||
} = opt_win || self; | ||
return parseQueryString(location["originalHash"] || location.hash); | ||
} | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107302322000"; | ||
// src/core/error/index.js | ||
function duplicateErrorIfNecessary(error) { | ||
const messageProperty = Object.getOwnPropertyDescriptor(error, "message"); | ||
if (messageProperty != null && messageProperty.writable) { | ||
return error; | ||
} | ||
const { | ||
message, | ||
stack | ||
} = error; | ||
const e = new Error(message); | ||
for (const prop in error) { | ||
e[prop] = error[prop]; | ||
} | ||
e.stack = stack; | ||
return e; | ||
} | ||
function createError(var_args) { | ||
let error = null; | ||
let message = ""; | ||
for (const arg of arguments) { | ||
if (arg instanceof Error && !error) { | ||
error = duplicateErrorIfNecessary(arg); | ||
} else { | ||
if (message) { | ||
message += " "; | ||
} | ||
message += arg; | ||
} | ||
} | ||
if (!error) { | ||
error = new Error(message); | ||
} else if (message) { | ||
error.message = message + ": " + error.message; | ||
} | ||
return error; | ||
} | ||
function maybeReportError(error) { | ||
self.__AMP_REPORT_ERROR == null ? void 0 : self.__AMP_REPORT_ERROR(error); | ||
} | ||
function rethrowAsync(var_args) { | ||
const error = createError.apply(null, arguments); | ||
setTimeout(() => { | ||
maybeReportError(error); | ||
throw error; | ||
}); | ||
} | ||
@@ -545,11 +672,9 @@ // src/mode.js | ||
function getMode_(win) { | ||
const hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
const hashParams = getHashParams(win); | ||
return { | ||
localDev: isLocalDev(win), | ||
development: isModeDevelopment(win), | ||
development: isModeDevelopment(win, hashParams), | ||
esm: true, | ||
geoOverride: hashQuery["amp-geo"], | ||
geoOverride: hashParams["amp-geo"], | ||
test: isTest(win), | ||
log: hashQuery["log"], | ||
version: internalRuntimeVersion(), | ||
rtvVersion: getRtvVersion(win) | ||
@@ -561,19 +686,13 @@ }; | ||
var _win$AMP_CONFIG; | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || `01${internalRuntimeVersion()}`; | ||
rtvVersion = ((_win$AMP_CONFIG = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG.v) || `01${version()}`; | ||
} | ||
return rtvVersion; | ||
} | ||
function isModeDevelopment(win) { | ||
const hashQuery = parseQueryString(win.location["originalHash"] || win.location.hash); | ||
return !!(["1", "actions", "amp", "amp4ads", "amp4email"].includes(hashQuery["development"]) || win.AMP_DEV_MODE); | ||
function isModeDevelopment(win, opt_hashParams) { | ||
const devModes = ["1", "actions", "amp", "amp4ads", "amp4email"]; | ||
const devParam = opt_hashParams || getHashParams(win); | ||
return devModes.includes(devParam["development"]) || !!win.AMP_DEV_MODE; | ||
} | ||
// src/log.js | ||
var LogLevel = { | ||
OFF: 0, | ||
ERROR: 1, | ||
WARN: 2, | ||
INFO: 3, | ||
FINE: 4 | ||
}; | ||
self.__AMP_LOG = self.__AMP_LOG || { | ||
@@ -585,29 +704,2 @@ user: null, | ||
var logs = self.__AMP_LOG; | ||
var logConstructor = null; | ||
function dev() { | ||
if (logs.dev) { | ||
return logs.dev; | ||
} | ||
if (!logConstructor) { | ||
throw new Error("failed to call initLogConstructor"); | ||
} | ||
return logs.dev = new logConstructor(self, (logNum) => { | ||
if (logNum >= 3) { | ||
return LogLevel.FINE; | ||
} | ||
if (logNum >= 2) { | ||
return LogLevel.INFO; | ||
} | ||
return LogLevel.OFF; | ||
}); | ||
} | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (isMinified()) { | ||
return shouldBeTrueish; | ||
} | ||
if (self.__AMP_ASSERTION_CHECK) { | ||
console.log("__devAssert_sentinel__"); | ||
} | ||
return dev().assert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9); | ||
} | ||
@@ -684,3 +776,3 @@ // src/url.js | ||
} | ||
return `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}${extension}`; | ||
return `${urls.thirdParty}/${version()}/vendor/${type}${extension}`; | ||
} | ||
@@ -693,6 +785,6 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN = parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN || getSubDomain(parentWindow); | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + `.${urls.thirdPartyFrameHost}/${internalRuntimeVersion()}/${srcFileBasename}.html`; | ||
return "https://" + parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + `.${urls.thirdPartyFrameHost}/${version()}/${srcFileBasename}.html`; | ||
} | ||
function getDevelopmentBootstrapBaseUrl(parentWindow, srcFileBasename) { | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? `${internalRuntimeVersion()}/${srcFileBasename}` : `current/${srcFileBasename}.max`) + ".html"; | ||
return overrideBootstrapBaseUrl || getAdsLocalhost(parentWindow) + "/dist.3p/" + (isMinified() ? `${version()}/${srcFileBasename}` : `current/${srcFileBasename}.max`) + ".html"; | ||
} | ||
@@ -873,4 +965,7 @@ function getAdsLocalhost(win) { | ||
const startPos = message.indexOf("{"); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), (e) => dev().error("MESSAGING", "Failed to parse message: " + message, e)); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), (e) => { | ||
rethrowAsync(new Error(`MESSAGING: Failed to parse message: ${message} | ||
${e.message}`)); | ||
}); | ||
} | ||
@@ -877,0 +972,0 @@ function isAmpMessage(message) { |
@@ -1,3 +0,3 @@ | ||
import{cloneElement as vr,createContext as nt,createElement as rt,createRef as Or}from"react";import{hydrate as br,render as _r}from"react-dom";import{useCallback as lt,useContext as at,useEffect as st,useImperativeHandle as pt,useLayoutEffect as ct,useMemo as ut,useRef as it,useState as ot}from"react";function d(e,t,r){return rt.apply(void 0,arguments)}function ve(e){return nt(e,void 0)}function $(e){return ot(e)}function F(e){return it(e)}function X(e,t){st(e,t)}function T(e,t){ct(e,t)}function _e(e){return at(e)}function re(e,t){return ut(e,t)}function q(e,t){return lt(e,t)}function H(e,t,r){return pt(e,t,r)}var ne=()=>["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],oe=()=>["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"];function be(){let e=0;return()=>String(++e)}var{hasOwnProperty:Pr,toString:Nr}=Object.prototype;function N(e){return e||{}}function Oe(e){return e.replace("-","_")}function Se(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}import{Children as Dr,createPortal as Tr,forwardRef as ft}from"react";function A(e){return ft(e)}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},mt=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Ae={[x.AUTO]:0,[x.LAZY]:1,[x.EAGER]:2,[x.UNLOAD]:3};function Pe(e,t){let r=Ae[e]||0,n=Ae[t]||0,o=Math.max(r,n);return mt[o]}var k={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},dt=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){gt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ht(e,t){if(null==e)return{};var r,n,o=xt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function xt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Et=[null,"paint","layout","content","size","size paint","size layout","strict"],yt={position:"relative",width:"100%",height:"100%"};function vt(e,t){let{as:r="div",children:n,className:o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:u,layout:s=!1,paint:f=!1,size:p=!1,style:y,wrapperClassName:O,wrapperStyle:b}=e,m=(p?4:0)+(s?2:0)+(f?1:0);return d(r,R(R({},ht(e,dt)),{},{ref:t,className:`${o||""} ${O||""}`.trim()||null,style:R(R(R({},y),b),{},{contain:Et[m]})}),d(a,R(R({},i),{},{ref:c,className:l,style:R(R({},p&&yt),{},{overflow:f?"hidden":"visible"},u)}),n))}var ie=A(vt),_t=["as","children","className","style","wrapperClassName","wrapperStyle"];function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function bt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ot(e,t){if(null==e)return{};var r,n,o=St(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function St(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function At(e,t){let{as:r="div",children:n,className:o,style:a,wrapperClassName:l,wrapperStyle:i}=e;return d(r,J(J({},Ot(e,_t)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:J(J({},a),i)}),n)}var Ie,Pt=A(At);function se(e){let t=F(null);return t.current=e,t}function Nt(){return Ie||(Ie=ve({renderable:!0,playable:!0,loading:x.AUTO}))}function ce(){return _e(Nt())}function Me(e){let{loading:t}=ce();return Pe(e,t)}var Rt=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){It(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function It(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mt(e,t){if(null==e)return{};var r,n,o=Ft(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Ft(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Tt=()=>!1,Dt="about:blank",wt=e=>e&&e!=Dt&&!e.includes("#");function Ct(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=Tt,messageHandler:u,ready:s=!0,loading:f,onReadyState:p,sandbox:y,src:O}=e,b=Mt(e,Rt),{playable:m}=ce(),g=Me(f),v=g!==x.UNLOAD,h=F(!1),w=se(p),P=q((e=>{if(e!==h.current){h.current=e;let t=w.current;null==t||t(e?k.COMPLETE:k.LOADING)}}),[w]),j=F(null);return H(t,(()=>({get readyState(){return h.current?k.COMPLETE:k.LOADING},get node(){return j.current}})),[]),T((()=>{v||P(!1)}),[v,P]),X((()=>{let e=j.current;if(!m&&e){let{src:t}=e;wt(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[m]),T((()=>{let e=j.current;if(!e||!v)return;let t=e=>{let t=j.current;!t||e.source!=t.contentWindow||!c(e.origin)||u(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,u,v,s]),d(ie,K(K({},b),{},{layout:!0,size:!0,paint:!0}),v&&s&&d("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:l,onLoad:()=>P(!0),part:"iframe",ref:j,sandbox:y,scrolling:"no",src:O,style:K(K({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var ae=A(Ct);function Y(){return!0}function G(e){var t;if(Y())return!1;let r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function W(){return!0}ae.displayName="IframeEmbed";var g=self.AMP_CONFIG||{},jt=("string"==typeof g.thirdPartyFrameRegex?new RegExp(g.thirdPartyFrameRegex):g.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Te=("string"==typeof g.cdnProxyRegex?new RegExp(g.cdnProxyRegex):g.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function De(e){if(!self.document||!self.document.head||self.location&&Te.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var C={thirdParty:g.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:g.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:jt,cdn:g.cdnUrl||De("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Te,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:g.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:g.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:g.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:g.geoApiUrl||De("amp-geo-api")};function le(e){return JSON.parse(e)}function z(e,t){try{return le(e)}catch(e){return null==t||t(e),null}}function B(){return"2107302322000"}var pe={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var fe=self.__AMP_LOG,Ge=null;function Q(){if(fe.dev)return fe.dev;if(!Ge)throw new Error("failed to call initLogConstructor");return fe.dev=new Ge(self,(e=>e>=3?pe.FINE:e>=2?pe.INFO:pe.OFF))}function ee(e,t,r,n,o,a,l,i,c,u,s){return W()?e:(self.__AMP_ASSERTION_CHECK&&console.log("__devAssert_sentinel__"),Q().assert(e,t,r,n,o,a,l,i,c,u,s))}var me,qt,Is=new Set(["c","v","a","ad"]);function de(e,t){return me||(me=self.document.createElement("a"),qt=null),Jt(me,e,null)}function Jt(e,t,r){return e.href="",new URL(t,e.href)}function ze(e){return`${C.thirdParty}/${B()}/vendor/${e}.mjs`}function Xe(e,t){let r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||Kt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${C.thirdPartyFrameHost}/${B()}/${r}.html`}function Kt(e){return"d-"+qe(e)}function qe(e){let t;if(e.crypto&&e.crypto.getRandomValues){let r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function Je(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+qe(e)}var Yt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function Ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(r),!0).forEach((function(t){Qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function er(e,t){if(null==e)return{};var r,n,o=tr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function tr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var ge={},Ye={EMBED_SIZE:"embed-size"},he="sync-xhr 'none'",rr=ne().join(" ")+" "+oe().join(" ");function nr(e,t){let{allow:r=he,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:u=rr,src:s,type:f,title:p=f}=e,y=er(e,Yt);if(!Se(r,he))throw new Error(`'allow' prop must contain "${he}". Found "${r}".`);let O=F(null),b=F(null),m=re((()=>(ge[f]||(ge[f]=be()),ge[f]())),[f]),{0:{name:g,src:v},1:h}=$({name:l,src:s});return T((()=>{var e,t;let r=null===(e=O.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=s?s:r?Xe(r):"about:blank";if(l)return void h({name:l,src:a});if(!r)return;let i=Object.assign(N({location:{href:r.location.href},sentinel:Je(r)}),o),u=Object.assign(N({title:p,type:f,_context:i}),c);h({name:JSON.stringify(N({host:de(a).hostname,bootstrap:null!=n?n:ze(f),type:f,count:m,attributes:u})),src:a})}),[n,o,m,l,c,s,p,f]),X((()=>{var e;let t=null===(e=b.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[g]),H(t,(()=>({get readyState(){var e;return null===(e=b.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=b.current)||void 0===e?void 0:e.node}})),[]),d(ae,Zt({allow:r,contentRef:O,messageHandler:i,name:g,ref:b,ready:!!g,sandbox:a?void 0:u,src:v,title:p},y))}var xe=A(nr);xe.displayName="ProxyIframeEmbed";var or="amp-";function Ze(e){if(!ir(e))return null;let t=e.indexOf("{");return ee(-1!=t),z(e.substr(t),(t=>Q().error("MESSAGING","Failed to parse message: "+e,t)))}function ir(e){return"string"==typeof e&&0==e.indexOf(or)&&-1!=e.indexOf("{")}var sr=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){cr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ar(e,t){if(null==e)return{};var r,n,o=ur(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function ur(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var lr="facebook",pr="100%",fr=()=>!0,mr="Facebook comments";function dr(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:u,layout:s,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:b,requestResize:m,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,style:j,tabs:x,title:S=mr}=e,A=ar(e,sr),{0:E,1:R}=$(null),N=q((e=>{var t;let r=null!==(t=z(e.data))&&void 0!==t?t:Ze(e.data);if("ready"==r.action&&(null==y||y()),r.type==Ye.EMBED_SIZE){let e=r.height;m?(m(e),R(pr)):R(e)}}),[m,y]),{0:_,1:D}=$(f);return T((()=>{var e,r;if(f)return void D(f);let n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||D(Oe(n.navigator.language))}),[f,t]),d(xe,te(te({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kd_site:u,layout:s,locale:_,numPosts:p,orderBy:O,ref:b,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,tabs:x},ref:t,title:S},A),{},{excludeSandbox:!0,matchesMessagingOrigin:fr,messageHandler:N,type:lr,style:E?te(te({},j),{},{height:E}):j}))}var gr=A(dr);gr.displayName="Facebook";export{gr as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.module.js.map | ||
; | ||
import{cloneElement as e,createContext as t,createElement as r,createRef as n}from"react";import{hydrate as o,render as a}from"react-dom";import{useCallback as l,useContext as i,useEffect as c,useImperativeHandle as s,useLayoutEffect as u,useMemo as f,useRef as p,useState as y}from"react";function b(e,t,n){return r.apply(void 0,arguments)}function d(e){return y(e)}function O(e){return p(e)}function m(e,t){c(e,t)}function g(e,t){u(e,t)}function w(e,t){return l(e,t)}function v(e,t,r){return s(e,t,r)}var{hasOwnProperty:h,toString:j}=Object.prototype;function P(e){return e||{}}import{Children as S,createPortal as x,forwardRef as E}from"react";function _(e){return E(e)}var D=["auto","lazy","eager","unload"],R={auto:0,lazy:1,eager:2,unload:3},A=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){F(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var M,T=[null,"paint","layout","content","size","size paint","size layout","strict"],C={"position":"relative","width":"100%","height":"100%"},z=_((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:s,layout:u=!1,paint:f=!1,size:p=!1,"style":y,wrapperClassName:d,wrapperStyle:O}=e;const m=(p?4:0)+(u?2:0)+(f?1:0);return b(r,k(k({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,A)),{},{ref:t,className:`${o||""} ${d||""}`.trim()||null,style:k(k(k({},y),O),{},{contain:T[m]})}),b(a,k(k({},i),{},{ref:c,className:l,style:k(k({},p&&C),{},{"overflow":f?"hidden":"visible"},s)}),n))})),U=["as","children","className","style","wrapperClassName","wrapperStyle"];function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B(){const e=M||(M=t({renderable:!0,playable:!0,loading:"auto"},void 0));return i(e)}_((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:l,wrapperStyle:i}=e;return b(r,I(I({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,U)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:I(I({},a),i)}),n)}));var H=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var J=()=>!1,W=_((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=J,messageHandler:s,ready:u=!0,loading:f,onReadyState:p,sandbox:y,src:d}=e,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,H);const{playable:j}=B(),P=function(e){const{loading:t}=B();return function(e,t){const r=R[e]||0,n=R[t]||0,o=Math.max(r,n);return D[o]}(e,t)}(f),S="unload"!==P,x=O(!1),E=function(e){const t=O(null);return t.current=e,t}(p),_=w((e=>{if(e!==x.current){x.current=e;const t=E.current;null==t||t(e?"complete":"loading")}}),[E]),A=O(null);return v(t,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return A.current}})),[]),g((()=>{S||_(!1)}),[S,_]),m((()=>{const e=A.current;if(!j&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[j]),g((()=>{const e=A.current;if(!e||!S)return;const t=e=>{const t=A.current;t&&e.source==t.contentWindow&&c(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,s,S,u]),b(z,V(V({},h),{},{layout:!0,size:!0,paint:!0}),S&&u&&b("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:P,name:l,onLoad:()=>_(!0),part:"iframe",ref:A,sandbox:y,scrolling:"no",src:d,style:V(V({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));function Z(e,t){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null==t||t(e),null}}W.displayName="IframeEmbed";var K=self.AMP_CONFIG||{},Q=("string"==typeof K.thirdPartyFrameRegex?new RegExp(K.thirdPartyFrameRegex):K.thirdPartyFrameRegex,("string"==typeof K.cdnProxyRegex?new RegExp(K.cdnProxyRegex):K.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function X(e){if(!self.document||!self.document.head)return null;if(self.location&&Q.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var Y,ee=K.thirdPartyUrl||"https://3p.ampproject.net",te=K.thirdPartyFrameHost||"ampproject.net";function re(e){const t=Object.getOwnPropertyDescriptor(e,"message");if(null!=t&&t.writable)return e;const{message:r,stack:n}=e,o=new Error(r);for(const t in e)o[t]=e[t];return o.stack=n,o}function ne(e){let t=null,r="";for(const e of arguments)e instanceof Error&&!t?t=re(e):(r&&(r+=" "),r+=e);return t?r&&(t.message=r+": "+t.message):t=new Error(r),t}function oe(e){var t,r;null===(t=(r=self).__AMP_REPORT_ERROR)||void 0===t||t.call(r,e)}function ae(e){return`${ee}/2108122216000/vendor/${e}.mjs`}function le(e){let t;if(e.crypto&&e.crypto.getRandomValues){const r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function ie(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+le(e)}K.cdnUrl||X("runtime-host"),K.errorReportingUrl,K.betaErrorReportingUrl,K.localDev,K.geoApiUrl||X("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var ce=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var fe={},pe="sync-xhr 'none'",ye=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"].join(" ")+" "+["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"].join(" "),be=_((function(e,t){let{allow:r=pe,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:s=ye,src:u,type:p,title:y=p}=e,w=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,ce);if(h=r,"number"!=typeof S&&(S=0),S+(j=pe).length>h.length||-1===h.indexOf(j,S))throw new Error(`'allow' prop must contain "${pe}". Found "${r}".`);var h,j,S;const x=O(null),E=O(null),_=f((()=>(fe[p]||(fe[p]=function(){let e=0;return()=>String(++e)}()),fe[p]())),[p]),{0:{name:D,src:R},1:A}=d({name:l,src:u});return g((()=>{var e,t;const r=null===(e=x.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=u?u:r?((i=r).__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||"d-"+le(i),"https://"+i.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${te}/2108122216000/frame.html`):"about:blank";var i;if(l)return void A({name:l,src:a});if(!r)return;const s=Object.assign(P({"location":{"href":r.location.href},"sentinel":ie(r)}),o),f=Object.assign(P({"title":y,"type":p,"_context":s}),c);var b;A({name:JSON.stringify(P({"host":(b=a,Y||(Y=self.document.createElement("a")),function(e,t,r){return e.href="",new URL(t,e.href)}(Y,b)).hostname,"bootstrap":null!=n?n:ae(p),"type":p,"count":_,"attributes":f})),src:a})}),[n,o,_,l,c,u,y,p]),m((()=>{var e;const t=null===(e=E.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[D]),v(t,(()=>({get readyState(){var e;return null===(e=E.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=E.current)||void 0===e?void 0:e.node}})),[]),b(W,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?se(Object(r),!0).forEach((function(t){ue(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allow:r,contentRef:x,messageHandler:i,name:D,ref:E,ready:!!D,sandbox:a?void 0:s,src:R,title:y},w))}));be.displayName="ProxyIframeEmbed";var de=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var we=()=>!0,ve="Facebook comments",he=_((function(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:s,layout:u,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:m,requestResize:v,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,style:E,tabs:_,title:D=ve}=e,R=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,de);const{0:A,1:N}=d(null),k=w((e=>{var t;const r=null!==(t=Z(e.data))&&void 0!==t?t:function(e){if(!function(e){return"string"==typeof e&&0==e.indexOf("amp-")&&-1!=e.indexOf("{")}(e))return null;const t=e.indexOf("{");return Z(e.substr(t),(t=>{!function(e){const t=ne.apply(null,arguments);setTimeout((()=>{throw oe(t),t}))}(new Error(`MESSAGING: Failed to parse message: ${e}\n${t.message}`))}))}(e.data);if("ready"==r.action&&(null==y||y()),"embed-size"==r.type){const e=r.height;v?(v(e),N("100%")):N(e)}}),[v,y]),{0:F,1:M}=d(f);return g((()=>{var e,r;if(f)return void M(f);const n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;n&&M(n.navigator.language.replace("-","_"))}),[f,t]),b(be,me(me({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,"kd_site":s,layout:u,locale:F,numPosts:p,orderBy:O,ref:m,share:h,showFacepile:j,showText:P,size:S,smallHeader:x,tabs:_},ref:t,title:D},R),{},{excludeSandbox:!0,matchesMessagingOrigin:we,messageHandler:k,type:"facebook",style:A?me(me({},E),{},{height:A}):E}))}));he.displayName="Facebook";export{he as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ |
{ | ||
"name": "@ampproject/amp-facebook", | ||
"version": "1.2107302322.0", | ||
"version": "1.2107302322.1", | ||
"description": "AMP HTML amp-facebook Component", | ||
@@ -5,0 +5,0 @@ "author": "The AMP HTML Authors", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1656116
4732