@ampproject/amp-instagram
Advanced tools
Comparing version 1.2107200040.0 to 1.2107202252.0
@@ -1,3 +0,3 @@ | ||
var Ne=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in ne(e),r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Ne(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Ue(exports,{Instagram:function(){return Le}});var M,O=U(require("preact")),oe=U(require("preact")),u=U(require("preact/hooks"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function N(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}function V(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},He=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],ue=(V(M={},c.AUTO,0),V(M,c.LAZY,1),V(M,c.EAGER,2),V(M,c.UNLOAD,3),M);function fe(e,r){var t=ue[e]||0,n=ue[r]||0,o=Math.max(t,n);return He[o]}var T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},$=U(require("preact/compat"));function y(e){return $.forwardRef(e)}var ke=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function le(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 v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?le(Object(t),!0).forEach((function(r){Ve(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ve(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $e(e,r){if(null==e)return{};var t,n,o=ze(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 ze(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 Be=[null,"paint","layout","content","size","size paint","size layout","strict"],We={position:"relative",width:"100%",height:"100%"};function qe(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},$e(e,ke)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:Be[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&We),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y(qe),Je=["as","children","className","style","wrapperClassName","wrapperStyle"];function ce(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 z(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ce(Object(t),!0).forEach((function(r){Qe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Qe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ye(e,r){if(null==e)return{};var t,n,o=Ze(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 Ze(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 Ke(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,z(z({},Ye(e,Je)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:z(z({},c),l)}),o)}var pe,Xe=y(Ke);function Z(e){var r=N(null);return r.current=e,r}function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return fe(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(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 B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(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 nr(e,r){if(null==e)return{};var t,n,o=or(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 or(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 ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,s=void 0===u?ar:u,f=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=N(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=N(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!s(e.origin)||f(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[s,f,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,vt=ve.hasOwnProperty,gt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var kn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var hr=["captioned","requestResize","shortcode","title"];function Ce(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 xr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ce(Object(t),!0).forEach((function(r){Er(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Er(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Sr(e)||Ar(e,r)||Or(e,r)||br()}function br(){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 Or(e,r){if(e){if("string"==typeof e)return Ie(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 Ie(e,r)}}function Ie(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 Ar(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Sr(e){if(Array.isArray(e))return e}function _r(e,r){if(null==e)return{};var t,n,o=Rr(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 Rr(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 Pr=ee(),wr=function(e){return"https://www.instagram.com"===e};function Cr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=_r(e,hr),l=Me(G(Pr),2),u=l[0],s=l[1],f=Me(G(0),2),y=f[0],b=f[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),b(1)}}),[n]);return p(X,xr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:wr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Le=y(Cr);Le.displayName="Instagram"; | ||
var Ne=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in ne(e),r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Ne(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Ue(exports,{Instagram:function(){return Le}});var M,O=U(require("preact")),oe=U(require("preact")),u=U(require("preact/hooks"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function N(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}function V(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},He=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],ue=(V(M={},c.AUTO,0),V(M,c.LAZY,1),V(M,c.EAGER,2),V(M,c.UNLOAD,3),M);function fe(e,r){var t=ue[e]||0,n=ue[r]||0,o=Math.max(t,n);return He[o]}var T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},$=U(require("preact/compat"));function y(e){return $.forwardRef(e)}var ke=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function le(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 v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?le(Object(t),!0).forEach((function(r){Ve(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ve(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $e(e,r){if(null==e)return{};var t,n,o=ze(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 ze(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 Be=[null,"paint","layout","content","size","size paint","size layout","strict"],We={position:"relative",width:"100%",height:"100%"};function qe(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},$e(e,ke)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:Be[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&We),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y(qe),Je=["as","children","className","style","wrapperClassName","wrapperStyle"];function ce(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 z(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ce(Object(t),!0).forEach((function(r){Qe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Qe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ye(e,r){if(null==e)return{};var t,n,o=Ze(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 Ze(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 Ke(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,z(z({},Ye(e,Je)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:z(z({},c),l)}),o)}var pe,Xe=y(Ke);function Z(e){var r=N(null);return r.current=e,r}function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return fe(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(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 B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(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 nr(e,r){if(null==e)return{};var t,n,o=or(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 or(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 ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,s=void 0===u?ar:u,f=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=N(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=N(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!s(e.origin)||f(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[s,f,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,vt=ve.hasOwnProperty,gt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Vn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var hr=["captioned","requestResize","shortcode","title"];function Ce(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 xr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ce(Object(t),!0).forEach((function(r){Er(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Er(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Sr(e)||Ar(e,r)||Or(e,r)||br()}function br(){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 Or(e,r){if(e){if("string"==typeof e)return Ie(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 Ie(e,r)}}function Ie(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 Ar(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Sr(e){if(Array.isArray(e))return e}function _r(e,r){if(null==e)return{};var t,n,o=Rr(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 Rr(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 Pr=ee(),wr=function(e){return"https://www.instagram.com"===e};function Cr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=_r(e,hr),l=Me(G(Pr),2),u=l[0],s=l[1],f=Me(G(0),2),y=f[0],b=f[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),b(1)}}),[n]);return p(X,xr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:wr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Le=y(Cr);Le.displayName="Instagram"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.js.map |
@@ -1,3 +0,3 @@ | ||
import{Fragment as _t,cloneElement as yt,createContext as ye,createElement as xe,createRef as bt}from"preact";import{hydrate as Ot,render as Et}from"preact";import{useCallback as Se,useContext as ve,useEffect as _e,useImperativeHandle as Ae,useLayoutEffect as be,useMemo as vt,useRef as Oe,useState as Ee}from"preact/hooks";function c(e,t,r){return xe.apply(void 0,arguments)}function J(e){return ye(e,void 0)}function w(e){return Ee(e)}function S(e){return Oe(e)}function W(e,t){_e(e,t)}function C(e,t){be(e,t)}function Q(e){return ve(e)}function M(e,t){return Se(e,t)}function U(e,t,r){return Ae(e,t,r)}var u={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Re=[u.AUTO,u.LAZY,u.EAGER,u.UNLOAD],Y={[u.AUTO]:0,[u.LAZY]:1,[u.EAGER]:2,[u.UNLOAD]:3};function Z(e,t){let r=Y[e]||0,n=Y[t]||0,a=Math.max(r,n);return Re[a]}var A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};import{Children as Ct,createPortal as wt,forwardRef as Pe}from"preact/compat";function m(e){return Pe(e)}var we=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function K(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){Ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=Ne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ne(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Le=[null,"paint","layout","content","size","size paint","size layout","strict"],Ie={position:"relative",width:"100%",height:"100%"};function je(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:i,contentProps:s,contentRef:u,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:m,wrapperClassName:b,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return c(r,l(l({},Me(e,we)),{},{ref:t,className:`${a||""} ${b||""}`.trim()||null,style:l(l(l({},m),g),{},{contain:Le[d]})}),c(o,l(l({},s),{},{ref:u,className:i,style:l(l({},O&&Ie),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(je),De=["as","children","className","style","wrapperClassName","wrapperStyle"];function X(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){Te(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e,t){if(null==e)return{};var r,n,a=Ue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ue(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function ke(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:i}=e;return c(r,N(N({},Fe(e,De)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:N(N({},o),i)}),n)}var ee,$e=m(ke);function $(e){let t=S(null);return t.current=e,t}function Ve(){return ee||(ee=J({renderable:!0,playable:!0,loading:u.AUTO}))}function V(){return Q(Ve())}function te(e){let{loading:t}=V();return Z(e,t)}var Ge=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];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 L(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){He(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 He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ze(e,t){if(null==e)return{};var r,n,a=qe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function qe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Be=()=>!1,Je="about:blank",We=e=>e&&e!=Je&&!e.includes("#");function Qe(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=Be,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:m,src:b}=e,g=ze(e,Ge),{playable:d}=V(),w=te(y),h=w!==u.UNLOAD,j=S(!1),P=$(O),v=M((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),W((()=>{let e=E.current;if(!d&&e){let{src:t}=e;We(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),c(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&c("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:m,scrolling:"no",src:b,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var G=m(Qe);G.displayName="IframeEmbed";var{hasOwnProperty:cr,toString:lr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},rt=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,pe=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function me(e){if(!self.document||!self.document.head||self.location&&pe.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var nt={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:rt,cdn:a.cdnUrl||me("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:pe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||me("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Dn=self.__AMP_LOG;function de(e){return e.data}function ge(e){return JSON.parse(e)}var st=["captioned","requestResize","shortcode","title"];function he(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){at(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function at(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ut(e,t){if(null==e)return{};var r,n,a=ct(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ct(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var lt=H(),ft=e=>"https://www.instagram.com"===e;function pt(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=ut(e,st),{0:i,1:s}=w(lt),{0:u,1:p}=w(0),f=M((e=>{let t=ge(de(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),s(H({height:e})),p(1)}}),[n]);return c(G,it({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ft,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:i},l))}var mt=m(pt);mt.displayName="Instagram";export{mt as Instagram}; | ||
import{Fragment as _t,cloneElement as yt,createContext as ye,createElement as xe,createRef as bt}from"preact";import{hydrate as Ot,render as Et}from"preact";import{useCallback as Se,useContext as ve,useEffect as _e,useImperativeHandle as Ae,useLayoutEffect as be,useMemo as vt,useRef as Oe,useState as Ee}from"preact/hooks";function u(e,t,r){return xe.apply(void 0,arguments)}function J(e){return ye(e,void 0)}function w(e){return Ee(e)}function S(e){return Oe(e)}function W(e,t){_e(e,t)}function C(e,t){be(e,t)}function Q(e){return ve(e)}function M(e,t){return Se(e,t)}function U(e,t,r){return Ae(e,t,r)}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Re=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],Y={[c.AUTO]:0,[c.LAZY]:1,[c.EAGER]:2,[c.UNLOAD]:3};function Z(e,t){let r=Y[e]||0,n=Y[t]||0,a=Math.max(r,n);return Re[a]}var A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};import{Children as Ct,createPortal as wt,forwardRef as Pe}from"preact/compat";function m(e){return Pe(e)}var we=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function K(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){Ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=Ne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ne(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Le=[null,"paint","layout","content","size","size paint","size layout","strict"],Ie={position:"relative",width:"100%",height:"100%"};function je(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:c,contentProps:i,contentRef:s,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:m,wrapperClassName:b,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return u(r,l(l({},Me(e,we)),{},{ref:t,className:`${a||""} ${b||""}`.trim()||null,style:l(l(l({},m),g),{},{contain:Le[d]})}),u(o,l(l({},i),{},{ref:s,className:c,style:l(l({},O&&Ie),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(je),De=["as","children","className","style","wrapperClassName","wrapperStyle"];function X(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){Te(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e,t){if(null==e)return{};var r,n,a=Ue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ue(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function ke(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:c}=e;return u(r,N(N({},Fe(e,De)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:N(N({},o),c)}),n)}var ee,$e=m(ke);function $(e){let t=S(null);return t.current=e,t}function Ve(){return ee||(ee=J({renderable:!0,playable:!0,loading:c.AUTO}))}function V(){return Q(Ve())}function te(e){let{loading:t}=V();return Z(e,t)}var Ge=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];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 L(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){He(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 He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ze(e,t){if(null==e)return{};var r,n,a=qe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function qe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Be=()=>!1,Je="about:blank",We=e=>e&&e!=Je&&!e.includes("#");function Qe(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=Be,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:m,src:b}=e,g=ze(e,Ge),{playable:d}=V(),w=te(y),h=w!==c.UNLOAD,j=S(!1),P=$(O),v=M((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),W((()=>{let e=E.current;if(!d&&e){let{src:t}=e;We(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),u(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&u("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:m,scrolling:"no",src:b,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var G=m(Qe);G.displayName="IframeEmbed";var{hasOwnProperty:ur,toString:lr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},rt=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,pe=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function me(e){if(!self.document||!self.document.head||self.location&&pe.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var nt={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:rt,cdn:a.cdnUrl||me("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:pe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||me("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Tn=self.__AMP_LOG;function de(e){return e.data}function ge(e){return JSON.parse(e)}var st=["captioned","requestResize","shortcode","title"];function he(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){at(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function at(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ct(e,t){if(null==e)return{};var r,n,a=ut(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ut(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var lt=H(),ft=e=>"https://www.instagram.com"===e;function pt(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=ct(e,st),{0:c,1:i}=w(lt),{0:s,1:p}=w(0),f=M((e=>{let t=ge(de(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),i(H({height:e})),p(1)}}),[n]);return u(G,it({allowTransparency:!0,iframeStyle:{opacity:s},matchesMessagingOrigin:ft,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:c},l))}var mt=m(pt);mt.displayName="Instagram";export{mt as Instagram}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.module.js.map |
@@ -1,3 +0,3 @@ | ||
var Ne=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in ne(e),r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Ne(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Ue(exports,{Instagram:function(){return Le}});var M,O=U(require("react")),oe=U(require("react-dom")),u=U(require("react"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function N(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}function V(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},He=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],ue=(V(M={},c.AUTO,0),V(M,c.LAZY,1),V(M,c.EAGER,2),V(M,c.UNLOAD,3),M);function fe(e,r){var t=ue[e]||0,n=ue[r]||0,o=Math.max(t,n);return He[o]}var T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},$=U(require("react"));function y(e){return $.forwardRef(e)}var ke=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function le(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 v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?le(Object(t),!0).forEach((function(r){Ve(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ve(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $e(e,r){if(null==e)return{};var t,n,o=ze(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 ze(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 Be=[null,"paint","layout","content","size","size paint","size layout","strict"],We={position:"relative",width:"100%",height:"100%"};function qe(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,f=e.contentRef,s=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},$e(e,ke)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:Be[P]})}),p(i,v(v({},u),{},{ref:f,className:l,style:v(v({},m&&We),{},{overflow:d?"hidden":"visible"},s)}),o))}var Y=y(qe),Je=["as","children","className","style","wrapperClassName","wrapperStyle"];function ce(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 z(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ce(Object(t),!0).forEach((function(r){Qe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Qe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ye(e,r){if(null==e)return{};var t,n,o=Ze(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 Ze(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 Ke(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,z(z({},Ye(e,Je)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:z(z({},c),l)}),o)}var pe,Xe=y(Ke);function Z(e){var r=N(null);return r.current=e,r}function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return fe(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(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 B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(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 nr(e,r){if(null==e)return{};var t,n,o=or(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 or(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 ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,f=void 0===u?ar:u,s=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=N(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=N(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!f(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[f,s,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,vt=ve.hasOwnProperty,gt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var kn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var hr=["captioned","requestResize","shortcode","title"];function Ce(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 xr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ce(Object(t),!0).forEach((function(r){Er(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Er(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Sr(e)||Ar(e,r)||Or(e,r)||br()}function br(){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 Or(e,r){if(e){if("string"==typeof e)return Ie(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 Ie(e,r)}}function Ie(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 Ar(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Sr(e){if(Array.isArray(e))return e}function _r(e,r){if(null==e)return{};var t,n,o=Rr(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 Rr(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 Pr=ee(),wr=function(e){return"https://www.instagram.com"===e};function Cr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=_r(e,hr),l=Me(G(Pr),2),u=l[0],f=l[1],s=Me(G(0),2),y=s[0],b=s[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),f(ee({height:t})),b(1)}}),[n]);return p(X,xr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:wr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Le=y(Cr);Le.displayName="Instagram"; | ||
var Ne=Object.create,D=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,je=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},Ue=function(e,r){for(var t in ne(e),r)D(e,t,{get:r[t],enumerable:!0})},Ge=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=je(r),a=0,c=o.length;a<c;a++)n=o[a],!De.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Te(r,n))||t.enumerable});return e},U=function(e){return Ge(ne(D(null!=e?Ne(Fe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Ue(exports,{Instagram:function(){return Le}});var M,O=U(require("react")),oe=U(require("react-dom")),u=U(require("react"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function N(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}function V(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},He=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],ue=(V(M={},c.AUTO,0),V(M,c.LAZY,1),V(M,c.EAGER,2),V(M,c.UNLOAD,3),M);function fe(e,r){var t=ue[e]||0,n=ue[r]||0,o=Math.max(t,n);return He[o]}var T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},$=U(require("react"));function y(e){return $.forwardRef(e)}var ke=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function le(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 v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?le(Object(t),!0).forEach((function(r){Ve(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ve(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $e(e,r){if(null==e)return{};var t,n,o=ze(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 ze(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 Be=[null,"paint","layout","content","size","size paint","size layout","strict"],We={position:"relative",width:"100%",height:"100%"};function qe(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,f=e.contentRef,s=e.contentStyle,y=e.layout,b=void 0!==y&&y,O=e.paint,d=void 0!==O&&O,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(b?2:0)+(d?1:0);return p(n,v(v({},$e(e,ke)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:Be[P]})}),p(i,v(v({},u),{},{ref:f,className:l,style:v(v({},m&&We),{},{overflow:d?"hidden":"visible"},s)}),o))}var Y=y(qe),Je=["as","children","className","style","wrapperClassName","wrapperStyle"];function ce(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 z(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ce(Object(t),!0).forEach((function(r){Qe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Qe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ye(e,r){if(null==e)return{};var t,n,o=Ze(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 Ze(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 Ke(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,z(z({},Ye(e,Je)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:z(z({},c),l)}),o)}var pe,Xe=y(Ke);function Z(e){var r=N(null);return r.current=e,r}function er(){return pe||(pe=ae({renderable:!0,playable:!0,loading:c.AUTO}))}function K(){return se(er())}function me(e){return fe(e,K().loading)}var rr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(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 B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){tr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(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 nr(e,r){if(null==e)return{};var t,n,o=or(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 or(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 ar=function(){return!1},ir="about:blank",sr=function(e){return e&&e!=ir&&!e.includes("#")};function ur(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,l=e.title,u=e.matchesMessagingOrigin,f=void 0===u?ar:u,s=e.messageHandler,y=e.ready,b=void 0===y||y,O=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=nr(e,rr),w=K().playable,j=me(O),h=j!==c.UNLOAD,P=N(!1),S=Z(d),E=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),A=N(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return A.current}}}),[]),H((function(){h||E(!1)}),[h,E]),ie((function(){var e=A.current;if(!w&&e){var r=e.src;if(sr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=A.current;if(e&&h){var r=function(e){var r=A.current;!r||e.source!=r.contentWindow||!f(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[f,s,h,b]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&b&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return E(!0)},part:"iframe",ref:A,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}var X=y(ur);X.displayName="IframeEmbed";var ve=Object.prototype,vt=ve.hasOwnProperty,gt=ve.toString;function ee(e){return e||{}}var W=Array.isArray,f=self.AMP_CONFIG||{},vr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,_e=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Re(e){if(!self.document||!self.document.head||self.location&&_e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var gr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:vr,cdn:f.cdnUrl||Re("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:_e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Re("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Vn=self.__AMP_LOG;function Pe(e){return e.data}function we(e){return JSON.parse(e)}var hr=["captioned","requestResize","shortcode","title"];function Ce(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 xr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Ce(Object(t),!0).forEach((function(r){Er(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Er(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Me(e,r){return Sr(e)||Ar(e,r)||Or(e,r)||br()}function br(){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 Or(e,r){if(e){if("string"==typeof e)return Ie(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 Ie(e,r)}}function Ie(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 Ar(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function Sr(e){if(Array.isArray(e))return e}function _r(e,r){if(null==e)return{};var t,n,o=Rr(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 Rr(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 Pr=ee(),wr=function(e){return"https://www.instagram.com"===e};function Cr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=_r(e,hr),l=Me(G(Pr),2),u=l[0],f=l[1],s=Me(G(0),2),y=s[0],b=s[1],O=k((function(e){var r=we(Pe(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),f(ee({height:t})),b(1)}}),[n]);return p(X,xr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:wr,messageHandler:O,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Le=y(Cr);Le.displayName="Instagram"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.js.map |
@@ -1,3 +0,3 @@ | ||
import{Fragment as _t,cloneElement as yt,createContext as ye,createElement as xe,createRef as bt}from"react";import{hydrate as Ot,render as Et}from"react-dom";import{useCallback as Se,useContext as ve,useEffect as _e,useImperativeHandle as Ae,useLayoutEffect as be,useMemo as vt,useRef as Oe,useState as Ee}from"react";function c(e,t,r){return xe.apply(void 0,arguments)}function J(e){return ye(e,void 0)}function w(e){return Ee(e)}function S(e){return Oe(e)}function W(e,t){_e(e,t)}function C(e,t){be(e,t)}function Q(e){return ve(e)}function M(e,t){return Se(e,t)}function U(e,t,r){return Ae(e,t,r)}var u={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Re=[u.AUTO,u.LAZY,u.EAGER,u.UNLOAD],Y={[u.AUTO]:0,[u.LAZY]:1,[u.EAGER]:2,[u.UNLOAD]:3};function Z(e,t){let r=Y[e]||0,n=Y[t]||0,a=Math.max(r,n);return Re[a]}var A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};import{Children as Ct,createPortal as wt,forwardRef as Pe}from"react";function m(e){return Pe(e)}var we=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function K(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){Ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=Ne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ne(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Le=[null,"paint","layout","content","size","size paint","size layout","strict"],Ie={position:"relative",width:"100%",height:"100%"};function je(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:i,contentProps:s,contentRef:u,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:m,wrapperClassName:b,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return c(r,l(l({},Me(e,we)),{},{ref:t,className:`${a||""} ${b||""}`.trim()||null,style:l(l(l({},m),g),{},{contain:Le[d]})}),c(o,l(l({},s),{},{ref:u,className:i,style:l(l({},O&&Ie),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(je),De=["as","children","className","style","wrapperClassName","wrapperStyle"];function X(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){Te(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e,t){if(null==e)return{};var r,n,a=Ue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ue(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function ke(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:i}=e;return c(r,N(N({},Fe(e,De)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:N(N({},o),i)}),n)}var ee,$e=m(ke);function $(e){let t=S(null);return t.current=e,t}function Ve(){return ee||(ee=J({renderable:!0,playable:!0,loading:u.AUTO}))}function V(){return Q(Ve())}function te(e){let{loading:t}=V();return Z(e,t)}var Ge=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];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 L(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){He(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 He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ze(e,t){if(null==e)return{};var r,n,a=qe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function qe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Be=()=>!1,Je="about:blank",We=e=>e&&e!=Je&&!e.includes("#");function Qe(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=Be,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:m,src:b}=e,g=ze(e,Ge),{playable:d}=V(),w=te(y),h=w!==u.UNLOAD,j=S(!1),P=$(O),v=M((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),W((()=>{let e=E.current;if(!d&&e){let{src:t}=e;We(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),c(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&c("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:m,scrolling:"no",src:b,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var G=m(Qe);G.displayName="IframeEmbed";var{hasOwnProperty:cr,toString:lr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},rt=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,pe=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function me(e){if(!self.document||!self.document.head||self.location&&pe.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var nt={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:rt,cdn:a.cdnUrl||me("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:pe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||me("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Dn=self.__AMP_LOG;function de(e){return e.data}function ge(e){return JSON.parse(e)}var st=["captioned","requestResize","shortcode","title"];function he(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){at(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function at(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ut(e,t){if(null==e)return{};var r,n,a=ct(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ct(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var lt=H(),ft=e=>"https://www.instagram.com"===e;function pt(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=ut(e,st),{0:i,1:s}=w(lt),{0:u,1:p}=w(0),f=M((e=>{let t=ge(de(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),s(H({height:e})),p(1)}}),[n]);return c(G,it({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ft,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:i},l))}var mt=m(pt);mt.displayName="Instagram";export{mt as Instagram}; | ||
import{Fragment as _t,cloneElement as yt,createContext as ye,createElement as xe,createRef as bt}from"react";import{hydrate as Ot,render as Et}from"react-dom";import{useCallback as Se,useContext as ve,useEffect as _e,useImperativeHandle as Ae,useLayoutEffect as be,useMemo as vt,useRef as Oe,useState as Ee}from"react";function u(e,t,r){return xe.apply(void 0,arguments)}function J(e){return ye(e,void 0)}function w(e){return Ee(e)}function S(e){return Oe(e)}function W(e,t){_e(e,t)}function C(e,t){be(e,t)}function Q(e){return ve(e)}function M(e,t){return Se(e,t)}function U(e,t,r){return Ae(e,t,r)}var c={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Re=[c.AUTO,c.LAZY,c.EAGER,c.UNLOAD],Y={[c.AUTO]:0,[c.LAZY]:1,[c.EAGER]:2,[c.UNLOAD]:3};function Z(e,t){let r=Y[e]||0,n=Y[t]||0,a=Math.max(r,n);return Re[a]}var A={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};import{Children as Ct,createPortal as wt,forwardRef as Pe}from"react";function m(e){return Pe(e)}var we=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function K(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){Ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Me(e,t){if(null==e)return{};var r,n,a=Ne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ne(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Le=[null,"paint","layout","content","size","size paint","size layout","strict"],Ie={position:"relative",width:"100%",height:"100%"};function je(e,t){let{as:r="div",children:n,className:a,contentAs:o="div",contentClassName:c,contentProps:i,contentRef:s,contentStyle:p,layout:f=!1,paint:y=!1,size:O=!1,style:m,wrapperClassName:b,wrapperStyle:g}=e,d=(O?4:0)+(f?2:0)+(y?1:0);return u(r,l(l({},Me(e,we)),{},{ref:t,className:`${a||""} ${b||""}`.trim()||null,style:l(l(l({},m),g),{},{contain:Le[d]})}),u(o,l(l({},i),{},{ref:s,className:c,style:l(l({},O&&Ie),{},{overflow:y?"hidden":"visible"},p)}),n))}var k=m(je),De=["as","children","className","style","wrapperClassName","wrapperStyle"];function X(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 N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){Te(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e,t){if(null==e)return{};var r,n,a=Ue(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function Ue(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function ke(e,t){let{as:r="div",children:n,className:a,style:o,wrapperClassName:l,wrapperStyle:c}=e;return u(r,N(N({},Fe(e,De)),{},{ref:t,className:`${a||""} ${l||""}`.trim()||null,style:N(N({},o),c)}),n)}var ee,$e=m(ke);function $(e){let t=S(null);return t.current=e,t}function Ve(){return ee||(ee=J({renderable:!0,playable:!0,loading:c.AUTO}))}function V(){return Q(Ve())}function te(e){let{loading:t}=V();return Z(e,t)}var Ge=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];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 L(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){He(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 He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ze(e,t){if(null==e)return{};var r,n,a=qe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function qe(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var Be=()=>!1,Je="about:blank",We=e=>e&&e!=Je&&!e.includes("#");function Qe(e,t){let{allow:r,allowFullScreen:n,allowTransparency:a,iframeStyle:o,name:l,title:i,matchesMessagingOrigin:s=Be,messageHandler:p,ready:f=!0,loading:y,onReadyState:O,sandbox:m,src:b}=e,g=ze(e,Ge),{playable:d}=V(),w=te(y),h=w!==c.UNLOAD,j=S(!1),P=$(O),v=M((e=>{if(e!==j.current){j.current=e;let t=P.current;null==t||t(e?A.COMPLETE:A.LOADING)}}),[P]),E=S(null);return U(t,(()=>({get readyState(){return j.current?A.COMPLETE:A.LOADING},get node(){return E.current}})),[]),C((()=>{h||v(!1)}),[h,v]),W((()=>{let e=E.current;if(!d&&e){let{src:t}=e;We(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[d]),C((()=>{let e=E.current;if(!e||!h)return;let t=e=>{let t=E.current;!t||e.source!=t.contentWindow||!s(e.origin)||p(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[s,p,h,f]),u(k,L(L({},g),{},{layout:!0,size:!0,paint:!0}),h&&f&&u("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:w,name:l,onLoad:()=>v(!0),part:"iframe",ref:E,sandbox:m,scrolling:"no",src:b,style:L(L({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var G=m(Qe);G.displayName="IframeEmbed";var{hasOwnProperty:ur,toString:lr}=Object.prototype;function H(e){return e||{}}var a=self.AMP_CONFIG||{},rt=("string"==typeof a.thirdPartyFrameRegex?new RegExp(a.thirdPartyFrameRegex):a.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,pe=("string"==typeof a.cdnProxyRegex?new RegExp(a.cdnProxyRegex):a.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function me(e){if(!self.document||!self.document.head||self.location&&pe.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var nt={thirdParty:a.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:a.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:rt,cdn:a.cdnUrl||me("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:pe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:a.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:a.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:a.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:a.geoApiUrl||me("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Tn=self.__AMP_LOG;function de(e){return e.data}function ge(e){return JSON.parse(e)}var st=["captioned","requestResize","shortcode","title"];function he(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 it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){at(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function at(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ct(e,t){if(null==e)return{};var r,n,a=ut(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(a[r]=e[r]))}return a}function ut(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var lt=H(),ft=e=>"https://www.instagram.com"===e;function pt(e,t){let{captioned:r,requestResize:n,shortcode:a,title:o="Instagram"}=e,l=ct(e,st),{0:c,1:i}=w(lt),{0:s,1:p}=w(0),f=M((e=>{let t=ge(de(e));if("MEASURE"==t.type&&t.details){let e=t.details.height;n&&n(e),i(H({height:e})),p(1)}}),[n]);return u(G,it({allowTransparency:!0,iframeStyle:{opacity:s},matchesMessagingOrigin:ft,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:o,wrapperStyle:c},l))}var mt=m(pt);mt.displayName="Instagram";export{mt as Instagram}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.module.js.map |
{ | ||
"name": "@ampproject/amp-instagram", | ||
"version": "1.2107200040.0", | ||
"version": "1.2107202252.0", | ||
"description": "AMP HTML amp-instagram 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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
502645