Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ampproject/amp-instagram

Package Overview
Dependencies
Maintainers
16
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ampproject/amp-instagram - npm Package Compare versions

Comparing version 1.2108132216.0 to 1.2108170213.0

2

dist/component-preact.module.js
;
bent;var{hasOwnProperty:e,toString:t}=Object.prototype;function r(e){return e||{}}import{cloneElement as n,createContext as o,createElement as a,createRef as c}from"preact";import{hydrate as l,render as i}from"preact";import{useCallback as s,useContext as u,useEffect as p,useImperativeHandle as f,useLayoutEffect as y,useMemo as b,useRef as O,useState as g}from"preact/hooks";function m(e,t,r){return a.apply(void 0,arguments)}function d(e){return g(e)}function w(e){return O(e)}function j(e,t){y(e,t)}function P(e,t){return s(e,t)}import{Children as h,createPortal as v,forwardRef as S}from"preact/compat";function x(e){return S(e)}var E=["auto","lazy","eager","unload"],D={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var k,A=[null,"paint","layout","content","size","size paint","size layout","strict"],F={"position":"relative","width":"100%","height":"100%"},I=x((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:b,wrapperStyle:O}=e;const g=(f?4:0)+(u?2:0)+(p?1:0);return m(r,z(z({},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,N)),{},{ref:t,className:`${o||""} ${b||""}`.trim()||null,style:z(z(z({},y),O),{},{contain:A[g]})}),m(a,z(z({},l),{},{ref:i,className:c,style:z(z({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","className","style","wrapperClassName","wrapperStyle"];function C(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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(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 $(){const e=k||(k=o({renderable:!0,playable:!0,loading:"auto"},void 0));return u(e)}x((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return m(r,U(U({},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,M)),{},{ref:t,className:`${o||""} ${c||""}`.trim()||null,style:U(U({},a),l)}),n)}));var G=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function H(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(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 V=()=>!1,B=x((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:i=V,messageHandler:s,ready:u=!0,loading:y,onReadyState:b,sandbox:O,src:g}=e,d=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,G);const{playable:h}=$(),v=function(e){const{loading:t}=$();return function(e,t){const r=D[e]||0,n=D[t]||0,o=Math.max(r,n);return E[o]}(e,t)}(y),S="unload"!==v,x=w(!1),N=function(e){const t=w(null);return t.current=e,t}(b),R=P((e=>{if(e!==x.current){x.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return z.current}})),[])}(t),j((()=>{S||R(!1)}),[S,R]),p((()=>{const e=z.current;if(!h&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),j((()=>{const e=z.current;if(!e||!S)return;const t=e=>{const t=z.current;t&&e.source==t.contentWindow&&i(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[i,s,S,u]),m(I,T(T({},d),{},{layout:!0,size:!0,paint:!0}),S&&u&&m("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,sandbox:O,scrolling:"no",src:g,style:T(T({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));B.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},W=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Z(e){if(!self.document||!self.document.head)return null;if(self.location&&W.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||Z("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||Z("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var K=["captioned","requestResize","shortcode","title"];function Q(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 X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=r(),ee=e=>"https://www.instagram.com"===e,te=x((function(e,t){let{captioned:n,requestResize:o,shortcode:a,title:c="Instagram"}=e,l=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,K);const{0:i,1:s}=d(Y),{0:u,1:p}=d(0),f=P((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),s(r({"height":e})),p(1)}}),[o]);return m(B,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){X(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ee,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:i},l))}));te.displayName="Instagram";export{te as Instagram};
bent;var{hasOwnProperty:e,toString:t}=Object.prototype;function r(e){return e||{}}import{cloneElement as n,createContext as o,createElement as a,createRef as c}from"preact";import{hydrate as l,render as i}from"preact";import{useCallback as s,useContext as u,useEffect as p,useImperativeHandle as f,useLayoutEffect as y,useMemo as b,useRef as O,useState as g}from"preact/hooks";function m(e,t,r){return a.apply(void 0,arguments)}function d(e){return g(e)}function w(e){return O(e)}function j(e,t){y(e,t)}function P(e,t){return s(e,t)}import{Children as h,createPortal as v,forwardRef as S}from"preact/compat";function x(e){return S(e)}var E=["auto","lazy","eager","unload"],D={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var k,A=[null,"paint","layout","content","size","size paint","size layout","strict"],F={"position":"relative","width":"100%","height":"100%"},I=x((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:b,wrapperStyle:O}=e;const g=(f?4:0)+(u?2:0)+(p?1:0);return m(r,z(z({},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,N)),{},{ref:t,className:`${o||""} ${b||""}`.trim()||null,style:z(z(z({},y),O),{},{contain:A[g]})}),m(a,z(z({},l),{},{ref:i,className:c,style:z(z({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","className","style","wrapperClassName","wrapperStyle"];function C(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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(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 $(){const e=k||(k=o({renderable:!0,playable:!0,loading:"auto"},void 0));return u(e)}x((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return m(r,U(U({},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,M)),{},{ref:t,className:`${o||""} ${c||""}`.trim()||null,style:U(U({},a),l)}),n)}));var G=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function H(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(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 V=()=>!1,B=x((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:i=V,messageHandler:s,ready:u=!0,loading:y,onReadyState:b,sandbox:O,src:g}=e,d=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,G);const{playable:h}=$(),v=function(e){const{loading:t}=$();return function(e,t){const r=D[e]||0,n=D[t]||0,o=Math.max(r,n);return E[o]}(e,t)}(y),S="unload"!==v,x=w(!1),N=function(e){const t=w(null);return t.current=e,t}(b),R=P((e=>{if(e!==x.current){x.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return z.current}})),[])}(t),j((()=>{S||R(!1)}),[S,R]),p((()=>{const e=z.current;if(!h&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),j((()=>{const e=z.current;if(!e||!S)return;const t=e=>{const t=z.current;t&&e.source==t.contentWindow&&i(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[i,s,S,u]),m(I,T(T({},d),{},{layout:!0,size:!0,paint:!0}),S&&u&&m("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,sandbox:O,scrolling:"no",src:g,style:T(T({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));B.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},W=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Z(e){if(!self.document||!self.document.head)return null;if(self.location&&W.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||Z("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||Z("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var K=["captioned","requestResize","shortcode","title"];function Q(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 X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=r(),ee=e=>"https://www.instagram.com"===e,te=x((function(e,t){let{captioned:n,requestResize:o,shortcode:a,title:c="Instagram"}=e,l=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,K);const[i,s]=d(Y),[u,p]=d(0),f=P((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),s(r({"height":e})),p(1)}}),[o]);return m(B,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){X(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ee,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:i},l))}));te.displayName="Instagram";export{te as Instagram};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
;
bent;var{hasOwnProperty:e,toString:t}=Object.prototype;function r(e){return e||{}}import{cloneElement as n,createContext as o,createElement as a,createRef as c}from"react";import{hydrate as l,render as i}from"react-dom";import{useCallback as s,useContext as u,useEffect as p,useImperativeHandle as f,useLayoutEffect as y,useMemo as b,useRef as O,useState as g}from"react";function m(e,t,r){return a.apply(void 0,arguments)}function d(e){return g(e)}function w(e){return O(e)}function j(e,t){y(e,t)}function P(e,t){return s(e,t)}import{Children as h,createPortal as v,forwardRef as S}from"react";function x(e){return S(e)}var E=["auto","lazy","eager","unload"],D={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var A,k=[null,"paint","layout","content","size","size paint","size layout","strict"],F={"position":"relative","width":"100%","height":"100%"},I=x((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:b,wrapperStyle:O}=e;const g=(f?4:0)+(u?2:0)+(p?1:0);return m(r,z(z({},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,N)),{},{ref:t,className:`${o||""} ${b||""}`.trim()||null,style:z(z(z({},y),O),{},{contain:k[g]})}),m(a,z(z({},l),{},{ref:i,className:c,style:z(z({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","className","style","wrapperClassName","wrapperStyle"];function C(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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(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 $(){const e=A||(A=o({renderable:!0,playable:!0,loading:"auto"},void 0));return u(e)}x((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return m(r,U(U({},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,M)),{},{ref:t,className:`${o||""} ${c||""}`.trim()||null,style:U(U({},a),l)}),n)}));var G=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function H(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(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 V=()=>!1,B=x((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:i=V,messageHandler:s,ready:u=!0,loading:y,onReadyState:b,sandbox:O,src:g}=e,d=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,G);const{playable:h}=$(),v=function(e){const{loading:t}=$();return function(e,t){const r=D[e]||0,n=D[t]||0,o=Math.max(r,n);return E[o]}(e,t)}(y),S="unload"!==v,x=w(!1),N=function(e){const t=w(null);return t.current=e,t}(b),R=P((e=>{if(e!==x.current){x.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return z.current}})),[])}(t),j((()=>{S||R(!1)}),[S,R]),p((()=>{const e=z.current;if(!h&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),j((()=>{const e=z.current;if(!e||!S)return;const t=e=>{const t=z.current;t&&e.source==t.contentWindow&&i(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[i,s,S,u]),m(I,T(T({},d),{},{layout:!0,size:!0,paint:!0}),S&&u&&m("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,sandbox:O,scrolling:"no",src:g,style:T(T({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));B.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},W=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Z(e){if(!self.document||!self.document.head)return null;if(self.location&&W.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||Z("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||Z("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var K=["captioned","requestResize","shortcode","title"];function Q(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 X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=r(),ee=e=>"https://www.instagram.com"===e,te=x((function(e,t){let{captioned:n,requestResize:o,shortcode:a,title:c="Instagram"}=e,l=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,K);const{0:i,1:s}=d(Y),{0:u,1:p}=d(0),f=P((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),s(r({"height":e})),p(1)}}),[o]);return m(B,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){X(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ee,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:i},l))}));te.displayName="Instagram";export{te as Instagram};
bent;var{hasOwnProperty:e,toString:t}=Object.prototype;function r(e){return e||{}}import{cloneElement as n,createContext as o,createElement as a,createRef as c}from"react";import{hydrate as l,render as i}from"react-dom";import{useCallback as s,useContext as u,useEffect as p,useImperativeHandle as f,useLayoutEffect as y,useMemo as b,useRef as O,useState as g}from"react";function m(e,t,r){return a.apply(void 0,arguments)}function d(e){return g(e)}function w(e){return O(e)}function j(e,t){y(e,t)}function P(e,t){return s(e,t)}import{Children as h,createPortal as v,forwardRef as S}from"react";function x(e){return S(e)}var E=["auto","lazy","eager","unload"],D={auto:0,lazy:1,eager:2,unload:3},N=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function R(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 z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var A,k=[null,"paint","layout","content","size","size paint","size layout","strict"],F={"position":"relative","width":"100%","height":"100%"},I=x((function(e,t){let{as:r="div",children:n,"className":o,contentAs:a="div",contentClassName:c,contentProps:l,contentRef:i,contentStyle:s,layout:u=!1,paint:p=!1,size:f=!1,"style":y,wrapperClassName:b,wrapperStyle:O}=e;const g=(f?4:0)+(u?2:0)+(p?1:0);return m(r,z(z({},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,N)),{},{ref:t,className:`${o||""} ${b||""}`.trim()||null,style:z(z(z({},y),O),{},{contain:k[g]})}),m(a,z(z({},l),{},{ref:i,className:c,style:z(z({},f&&F),{},{"overflow":p?"hidden":"visible"},s)}),n))})),M=["as","children","className","style","wrapperClassName","wrapperStyle"];function C(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 U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(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 $(){const e=A||(A=o({renderable:!0,playable:!0,loading:"auto"},void 0));return u(e)}x((function(e,t){let{as:r="div",children:n,"className":o,"style":a,wrapperClassName:c,wrapperStyle:l}=e;return m(r,U(U({},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,M)),{},{ref:t,className:`${o||""} ${c||""}`.trim()||null,style:U(U({},a),l)}),n)}));var G=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function H(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(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 V=()=>!1,B=x((function(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:c,title:l,matchesMessagingOrigin:i=V,messageHandler:s,ready:u=!0,loading:y,onReadyState:b,sandbox:O,src:g}=e,d=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,G);const{playable:h}=$(),v=function(e){const{loading:t}=$();return function(e,t){const r=D[e]||0,n=D[t]||0,o=Math.max(r,n);return E[o]}(e,t)}(y),S="unload"!==v,x=w(!1),N=function(e){const t=w(null);return t.current=e,t}(b),R=P((e=>{if(e!==x.current){x.current=e;const t=N.current;null==t||t(e?"complete":"loading")}}),[N]),z=w(null);return function(e,t,r){f(e,(()=>({get readyState(){return x.current?"complete":"loading"},get node(){return z.current}})),[])}(t),j((()=>{S||R(!1)}),[S,R]),p((()=>{const e=z.current;if(!h&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[h]),j((()=>{const e=z.current;if(!e||!S)return;const t=e=>{const t=z.current;t&&e.source==t.contentWindow&&i(e.origin)&&s(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[i,s,S,u]),m(I,T(T({},d),{},{layout:!0,size:!0,paint:!0}),S&&u&&m("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:v,name:c,onLoad:()=>R(!0),part:"iframe",ref:z,sandbox:O,scrolling:"no",src:g,style:T(T({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));B.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},W=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function Z(e){if(!self.document||!self.document.head)return null;if(self.location&&W.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||Z("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||Z("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var K=["captioned","requestResize","shortcode","title"];function Q(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 X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=r(),ee=e=>"https://www.instagram.com"===e,te=x((function(e,t){let{captioned:n,requestResize:o,shortcode:a,title:c="Instagram"}=e,l=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,K);const[i,s]=d(Y),[u,p]=d(0),f=P((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){const e=t.details.height;o&&o(e),s(r({"height":e})),p(1)}}),[o]);return m(B,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){X(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({allowTransparency:!0,iframeStyle:{opacity:u},matchesMessagingOrigin:ee,messageHandler:f,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:i},l))}));te.displayName="Instagram";export{te as Instagram};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
{
"name": "@ampproject/amp-instagram",
"version": "1.2108132216.0",
"version": "1.2108170213.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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc