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.2109222204.0 to 1.2110011758.0

README.md

2

dist/component-preact.js

@@ -1,2 +0,2 @@

var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,a=__getOwnPropNames(t),o=0,i=a.length;o<i;o++)n=a[o],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys(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 _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _objectWithoutPropertiesLoose(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}__export(exports,{BentoInstagram:function(){return BentoInstagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}var preact=__toModule(require("preact")),preactDOM=__toModule(require("preact")),hooks=__toModule(require("preact/hooks"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var compat=__toModule(require("preact/compat"));function forwardRef2(e){return compat.forwardRef(e)}var _excluded=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,a=e.children,o=e.class,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,d=e.contentStyle,p=e.layout,f=void 0!==p&&p,_=e.paint,y=void 0!==_&&_,m=e.size,g=void 0!==m&&m,b=e.style,v=e.wrapperClassName,h=e.wrapperStyle,O=(g?4:0)+(f?2:0)+(y?1:0);return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded)),{},{ref:t,class:"".concat(o||""," ").concat(v||"").trim()||null,style:_objectSpread2(_objectSpread2(_objectSpread2({},b),h),{},{contain:CONTAIN[O]})}),createElement2(c,_objectSpread2(_objectSpread2({},u),{},{ref:s,class:l,style:_objectSpread2(_objectSpread2({},g&&SIZE_CONTENT_STYLE),{},{"overflow":y?"hidden":"visible"},d)}),a))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","style","wrapperClassName","wrapperStyle"];function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,a=e.children,o=e.class,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded2)),{},{ref:t,class:"".concat(o||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),a)}var Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}var _MAP,viewportObservers=new WeakMap,viewportCallbacks=new WeakMap,Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,a=Math.max(r,n);return ORDER[a]}var context,ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,a=e.allowTransparency,o=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,s=e.messageHandler,d=e.ready,p=void 0===d||d,f=e.loading,_=e.onReadyState,y=e.sandbox,m=e.src,g=_objectWithoutPropertiesLoose(e,_excluded3),b=useAmpContext().playable,v=useLoading(f),h=v!==Loading.UNLOAD,O=useRef2(!1),A=useValueRef(_),S=useCallback2((function(e){if(e!==O.current){O.current=e;var t=A.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[A]),P=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return O.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return P.current}}}),[]),useLayoutEffect2((function(){h||S(!1)}),[h,S]),useEffect2((function(){var e=P.current;if(!b&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[b]),useLayoutEffect2((function(){var e=P.current;if(e&&h){var t=function(e){var t=P.current;t&&e.source==t.contentWindow&&u(e.origin)&&s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[u,s,h,p]),createElement2(ContainWrapper,_objectSpread2(_objectSpread2({},g),{},{layout:!0,size:!0,paint:!0}),h&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:v,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:P,sandbox:y,scrolling:"no",src:m,style:_objectSpread2(_objectSpread2({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);IframeEmbed.displayName="IframeEmbed";var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","onLoad","requestResize","shortcode","title"],NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function BentoInstagramWithRef(e,t){var r=e.captioned,n=e.onLoad,a=e.requestResize,o=e.shortcode,i=e.title,c=void 0===i?"Instagram":i,l=_objectWithoutPropertiesLoose(e,_excluded4),u=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),s=u[0],d=u[1],p=_slicedToArray(useState2(0),2),f=p[0],_=p[1],y=useValueRef(n),m=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r,n=t.details.height;a&&a(n),d(dict({"height":n})),_(1),null===(r=y.current)||void 0===r||r.call(y)}}),[a,y]);return createElement2(IframeEmbed,_objectSpread2({allowTransparency:!0,iframeStyle:{opacity:f},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:m,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:s},l))}var BentoInstagram=forwardRef2(BentoInstagramWithRef);BentoInstagram.displayName="Instagram";
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=__getOwnPropNames(t),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys(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 _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _objectWithoutPropertiesLoose(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}__export(exports,{BentoInstagram:function(){return BentoInstagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}var preact=__toModule(require("preact")),preactDOM=__toModule(require("preact")),hooks=__toModule(require("preact/hooks"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var compat=__toModule(require("preact/compat"));function forwardRef2(e){return compat.forwardRef(e)}var _excluded=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.class,i=e.contentAs,u=void 0===i?"div":i,c=e.contentClassName,l=e.contentProps,s=e.contentRef,d=e.contentStyle,f=e.layout,p=void 0!==f&&f,_=e.paint,m=void 0!==_&&_,b=e.size,g=void 0!==b&&b,v=e.style,y=e.wrapperClassName,S=e.wrapperStyle,h=(g?4:0)+(p?2:0)+(m?1:0);return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded)),{},{ref:t,class:"".concat(a||""," ").concat(y||"").trim()||null,style:_objectSpread2(_objectSpread2(_objectSpread2({},v),S),{},{contain:CONTAIN[h]})}),createElement2(u,_objectSpread2(_objectSpread2({},l),{},{ref:s,class:c,style:_objectSpread2(_objectSpread2({},g&&SIZE_CONTENT_STYLE),{},{"overflow":m?"hidden":"visible"},d)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","style","wrapperClassName","wrapperStyle"];function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.class,i=e.style,u=e.wrapperClassName,c=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded2)),{},{ref:t,class:"".concat(a||""," ").concat(u||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),c)}),o)}var Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}var _MAP,viewportObservers=new WeakMap,viewportCallbacks=new WeakMap,Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,o=Math.max(r,n);return ORDER[o]}var context,ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,o=e.iframeStyle,a=e.name,i=e.title,u=e.matchesMessagingOrigin,c=void 0===u?DEFAULT_MATCHES_MESSAGING_ORIGIN:u,l=e.messageHandler,s=e.ready,d=void 0===s||s,f=e.loading,p=e.onReadyState,_=e.sandbox,m=e.src,b=_objectWithoutPropertiesLoose(e,_excluded3),g=useAmpContext().playable,v=useLoading(f),y=v!==Loading.UNLOAD,S=useRef2(!1),h=useValueRef(p),A=useCallback2((function(e){if(e!==S.current){S.current=e;var t=h.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[h]),O=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return S.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return O.current}}}),[]),useLayoutEffect2((function(){y||A(!1)}),[y,A]),useEffect2((function(){var e=O.current;if(!g&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[g]),useLayoutEffect2((function(){var e=O.current;if(e&&y){var t=function(e){var t=O.current;t&&e.source==t.contentWindow&&c(e.origin)&&l(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[c,l,y,d]),createElement2(ContainWrapper,_objectSpread2(_objectSpread2({},b),{},{layout:!0,size:!0,paint:!0}),y&&d&&createElement2("iframe",{allow:r,allowFullScreen:n,frameborder:"0",loading:v,name:a,onLoad:function(){return A(!0)},part:"iframe",ref:O,sandbox:_,scrolling:"no",src:m,style:_objectSpread2(_objectSpread2({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);IframeEmbed.displayName="IframeEmbed";var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","onLoad","requestResize","shortcode","title"],NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function BentoInstagramWithRef(e,t){var r=e.captioned,n=e.onLoad,o=e.requestResize,a=e.shortcode,i=e.title,u=void 0===i?"Instagram":i,c=_objectWithoutPropertiesLoose(e,_excluded4),l=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),s=l[0],d=l[1],f=_slicedToArray(useState2(0),2),p=f[0],_=f[1],m=useValueRef(n),b=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r,n=t.details.height;o&&o(n),d(dict({"height":n})),_(1),null===(r=m.current)||void 0===r||r.call(m)}}),[o,m]);return createElement2(IframeEmbed,_objectSpread2({iframeStyle:{opacity:p},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:b,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:u,wrapperStyle:s},c))}var BentoInstagram=forwardRef2(BentoInstagramWithRef);BentoInstagram.displayName="Instagram";
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */

@@ -254,3 +254,3 @@ var __create = Object.create;

// src/preact/component/iframe.js
var _excluded3 = ["allow", "allowFullScreen", "allowTransparency", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
var _excluded3 = ["allow", "allowFullScreen", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
function _extends3() {

@@ -292,3 +292,3 @@ _extends3 = Object.assign || function(target) {

function IframeEmbedWithRef(_ref, ref) {
var allow = _ref.allow, allowFullScreen = _ref.allowFullScreen, allowTransparency = _ref.allowTransparency, iframeStyle = _ref.iframeStyle, name = _ref.name, title = _ref.title, _ref$matchesMessaging = _ref.matchesMessagingOrigin, matchesMessagingOrigin = _ref$matchesMessaging === void 0 ? DEFAULT_MATCHES_MESSAGING_ORIGIN : _ref$matchesMessaging, messageHandler = _ref.messageHandler, _ref$ready = _ref.ready, ready = _ref$ready === void 0 ? true : _ref$ready, loadingProp = _ref.loading, onReadyState = _ref.onReadyState, sandbox = _ref.sandbox, src = _ref.src, rest = _objectWithoutPropertiesLoose3(_ref, _excluded3);
var allow = _ref.allow, allowFullScreen = _ref.allowFullScreen, iframeStyle = _ref.iframeStyle, name = _ref.name, title = _ref.title, _ref$matchesMessaging = _ref.matchesMessagingOrigin, matchesMessagingOrigin = _ref$matchesMessaging === void 0 ? DEFAULT_MATCHES_MESSAGING_ORIGIN : _ref$matchesMessaging, messageHandler = _ref.messageHandler, _ref$ready = _ref.ready, ready = _ref$ready === void 0 ? true : _ref$ready, loadingProp = _ref.loading, onReadyState = _ref.onReadyState, sandbox = _ref.sandbox, src = _ref.src, rest = _objectWithoutPropertiesLoose3(_ref, _excluded3);
var _useAmpContext = useAmpContext(), playable = _useAmpContext.playable;

@@ -359,3 +359,2 @@ var loading = useLoading(loadingProp);

allowFullScreen: allowFullScreen,
allowTransparency: allowTransparency,
frameborder: "0",

@@ -411,3 +410,3 @@ loading: loading,

// src/log.js
// src/utils/log.js
self.__AMP_LOG = self.__AMP_LOG || {

@@ -420,3 +419,3 @@ user: null,

// src/event-helper.js
// src/utils/event-helper.js
function getData(event) {

@@ -480,3 +479,2 @@ return event.data;

return createElement2(IframeEmbed, _extends4({
allowTransparency: true,
iframeStyle: {

@@ -483,0 +481,0 @@ opacity: opacity

@@ -263,3 +263,3 @@ // src/core/types/object/index.js

// src/preact/component/iframe.js
var _excluded3 = ["allow", "allowFullScreen", "allowTransparency", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
var _excluded3 = ["allow", "allowFullScreen", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
function _extends3() {

@@ -300,3 +300,2 @@ _extends3 = Object.assign || function(target) {

allowFullScreen,
allowTransparency,
iframeStyle,

@@ -380,3 +379,2 @@ name,

allowFullScreen,
allowTransparency,
frameborder: "0",

@@ -430,3 +428,3 @@ loading,

// src/log.js
// src/utils/log.js
self.__AMP_LOG = self.__AMP_LOG || {

@@ -439,3 +437,3 @@ user: null,

// src/event-helper.js
// src/utils/event-helper.js
function getData(event) {

@@ -503,3 +501,2 @@ return event.data;

return createElement2(IframeEmbed, _extends4({
allowTransparency: true,
iframeStyle: {

@@ -506,0 +503,0 @@ opacity

@@ -1,2 +0,2 @@

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

@@ -1,2 +0,2 @@

var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,a=__getOwnPropNames(t),o=0,i=a.length;o<i;o++)n=a[o],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys(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 _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _objectWithoutPropertiesLoose(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}__export(exports,{BentoInstagram:function(){return BentoInstagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}var preact=__toModule(require("react")),preactDOM=__toModule(require("react-dom")),hooks=__toModule(require("react"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var compat=__toModule(require("react"));function forwardRef2(e){return compat.forwardRef(e)}var _excluded=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,a=e.children,o=e.class,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,d=e.contentStyle,p=e.layout,f=void 0!==p&&p,_=e.paint,y=void 0!==_&&_,m=e.size,g=void 0!==m&&m,b=e.style,v=e.wrapperClassName,h=e.wrapperStyle,O=(g?4:0)+(f?2:0)+(y?1:0);return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded)),{},{ref:t,class:"".concat(o||""," ").concat(v||"").trim()||null,style:_objectSpread2(_objectSpread2(_objectSpread2({},b),h),{},{contain:CONTAIN[O]})}),createElement2(c,_objectSpread2(_objectSpread2({},u),{},{ref:s,class:l,style:_objectSpread2(_objectSpread2({},g&&SIZE_CONTENT_STYLE),{},{"overflow":y?"hidden":"visible"},d)}),a))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","style","wrapperClassName","wrapperStyle"];function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,a=e.children,o=e.class,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded2)),{},{ref:t,class:"".concat(o||""," ").concat(c||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),l)}),a)}var Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}var _MAP,viewportObservers=new WeakMap,viewportCallbacks=new WeakMap,Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,a=Math.max(r,n);return ORDER[a]}var context,ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,a=e.allowTransparency,o=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?DEFAULT_MATCHES_MESSAGING_ORIGIN:l,s=e.messageHandler,d=e.ready,p=void 0===d||d,f=e.loading,_=e.onReadyState,y=e.sandbox,m=e.src,g=_objectWithoutPropertiesLoose(e,_excluded3),b=useAmpContext().playable,v=useLoading(f),h=v!==Loading.UNLOAD,O=useRef2(!1),A=useValueRef(_),S=useCallback2((function(e){if(e!==O.current){O.current=e;var t=A.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[A]),P=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return O.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return P.current}}}),[]),useLayoutEffect2((function(){h||S(!1)}),[h,S]),useEffect2((function(){var e=P.current;if(!b&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[b]),useLayoutEffect2((function(){var e=P.current;if(e&&h){var t=function(e){var t=P.current;t&&e.source==t.contentWindow&&u(e.origin)&&s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[u,s,h,p]),createElement2(ContainWrapper,_objectSpread2(_objectSpread2({},g),{},{layout:!0,size:!0,paint:!0}),h&&p&&createElement2("iframe",{allow:r,allowFullScreen:n,allowTransparency:a,frameborder:"0",loading:v,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:P,sandbox:y,scrolling:"no",src:m,style:_objectSpread2(_objectSpread2({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);IframeEmbed.displayName="IframeEmbed";var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","onLoad","requestResize","shortcode","title"],NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function BentoInstagramWithRef(e,t){var r=e.captioned,n=e.onLoad,a=e.requestResize,o=e.shortcode,i=e.title,c=void 0===i?"Instagram":i,l=_objectWithoutPropertiesLoose(e,_excluded4),u=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),s=u[0],d=u[1],p=_slicedToArray(useState2(0),2),f=p[0],_=p[1],y=useValueRef(n),m=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r,n=t.details.height;a&&a(n),d(dict({"height":n})),_(1),null===(r=y.current)||void 0===r||r.call(y)}}),[a,y]);return createElement2(IframeEmbed,_objectSpread2({allowTransparency:!0,iframeStyle:{opacity:f},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:m,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:s},l))}var BentoInstagram=forwardRef2(BentoInstagramWithRef);BentoInstagram.displayName="Instagram";
var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__markAsModule=function(e){return __defProp(e,"__esModule",{value:!0})},__export=function(e,t){for(var r in __markAsModule(e),t)__defProp(e,r,{get:t[r],enumerable:!0})},__reExport=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=__getOwnPropNames(t),a=0,i=o.length;a<i;a++)n=o[a],__hasOwnProp.call(e,n)||"default"===n||__defProp(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toModule=function(e){return __reExport(__markAsModule(__defProp(null!=e?__create(__getProtoOf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys(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 _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _objectWithoutPropertiesLoose(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}__export(exports,{BentoInstagram:function(){return BentoInstagram}});var _Object$prototype=Object.prototype,hasOwn_=_Object$prototype.hasOwnProperty,toString_=_Object$prototype.toString;function dict(e){return e||{}}var isArray=Array.isArray;function parseJson(e){return JSON.parse(e)}var preact=__toModule(require("react")),preactDOM=__toModule(require("react-dom")),hooks=__toModule(require("react"));function createElement2(e,t,r){return preact.createElement.apply(void 0,arguments)}function createContext2(e){return preact.createContext(e,void 0)}function useState2(e){return hooks.useState(e)}function useRef2(e){return hooks.useRef(e)}function useEffect2(e,t){hooks.useEffect(e,t)}function useLayoutEffect2(e,t){hooks.useLayoutEffect(e,t)}function useContext2(e){return hooks.useContext(e)}function useCallback2(e,t){return hooks.useCallback(e,t)}function useImperativeHandle2(e,t,r){return hooks.useImperativeHandle(e,t,r)}var compat=__toModule(require("react"));function forwardRef2(e){return compat.forwardRef(e)}var _excluded=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],CONTAIN=[null,"paint","layout","content","size","size paint","size layout","strict"],SIZE_CONTENT_STYLE={"position":"relative","width":"100%","height":"100%"};function ContainWrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.class,i=e.contentAs,u=void 0===i?"div":i,c=e.contentClassName,l=e.contentProps,s=e.contentRef,d=e.contentStyle,f=e.layout,p=void 0!==f&&f,_=e.paint,m=void 0!==_&&_,b=e.size,g=void 0!==b&&b,v=e.style,y=e.wrapperClassName,S=e.wrapperStyle,h=(g?4:0)+(p?2:0)+(m?1:0);return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded)),{},{ref:t,class:"".concat(a||""," ").concat(y||"").trim()||null,style:_objectSpread2(_objectSpread2(_objectSpread2({},v),S),{},{contain:CONTAIN[h]})}),createElement2(u,_objectSpread2(_objectSpread2({},l),{},{ref:s,class:c,style:_objectSpread2(_objectSpread2({},g&&SIZE_CONTENT_STYLE),{},{"overflow":m?"hidden":"visible"},d)}),o))}var ContainWrapper=forwardRef2(ContainWrapperWithRef),_excluded2=["as","children","class","style","wrapperClassName","wrapperStyle"];function WrapperWithRef(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.class,i=e.style,u=e.wrapperClassName,c=e.wrapperStyle;return createElement2(n,_objectSpread2(_objectSpread2({},_objectWithoutPropertiesLoose(e,_excluded2)),{},{ref:t,class:"".concat(a||""," ").concat(u||"").trim()||null,style:_objectSpread2(_objectSpread2({},i),c)}),o)}var Wrapper=forwardRef2(WrapperWithRef);function useValueRef(e){var t=useRef2(null);return t.current=e,t}var _MAP,viewportObservers=new WeakMap,viewportCallbacks=new WeakMap,Loading={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},ORDER=[Loading.AUTO,Loading.LAZY,Loading.EAGER,Loading.UNLOAD],MAP=(_defineProperty(_MAP={},Loading.AUTO,0),_defineProperty(_MAP,Loading.LAZY,1),_defineProperty(_MAP,Loading.EAGER,2),_defineProperty(_MAP,Loading.UNLOAD,3),_MAP);function reducer(e,t){var r=MAP[e]||0,n=MAP[t]||0,o=Math.max(r,n);return ORDER[o]}var context,ReadyState={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function getAmpContext(){return context||(context=createContext2({renderable:!0,playable:!0,loading:Loading.AUTO}))}function useAmpContext(){return useContext2(getAmpContext())}function useLoading(e){return reducer(e,useAmpContext().loading)}var _excluded3=["allow","allowFullScreen","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],DEFAULT_MATCHES_MESSAGING_ORIGIN=function(){return!1},ABOUT_BLANK="about:blank",canResetSrc=function(e){return e&&e!=ABOUT_BLANK&&!e.includes("#")};function IframeEmbedWithRef(e,t){var r=e.allow,n=e.allowFullScreen,o=e.iframeStyle,a=e.name,i=e.title,u=e.matchesMessagingOrigin,c=void 0===u?DEFAULT_MATCHES_MESSAGING_ORIGIN:u,l=e.messageHandler,s=e.ready,d=void 0===s||s,f=e.loading,p=e.onReadyState,_=e.sandbox,m=e.src,b=_objectWithoutPropertiesLoose(e,_excluded3),g=useAmpContext().playable,v=useLoading(f),y=v!==Loading.UNLOAD,S=useRef2(!1),h=useValueRef(p),A=useCallback2((function(e){if(e!==S.current){S.current=e;var t=h.current;null==t||t(e?ReadyState.COMPLETE:ReadyState.LOADING)}}),[h]),O=useRef2(null);return useImperativeHandle2(t,(function(){return{get readyState(){return S.current?ReadyState.COMPLETE:ReadyState.LOADING},get node(){return O.current}}}),[]),useLayoutEffect2((function(){y||A(!1)}),[y,A]),useEffect2((function(){var e=O.current;if(!g&&e){var t=e.src;canResetSrc(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[g]),useLayoutEffect2((function(){var e=O.current;if(e&&y){var t=function(e){var t=O.current;t&&e.source==t.contentWindow&&c(e.origin)&&l(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[c,l,y,d]),createElement2(ContainWrapper,_objectSpread2(_objectSpread2({},b),{},{layout:!0,size:!0,paint:!0}),y&&d&&createElement2("iframe",{allow:r,allowFullScreen:n,frameborder:"0",loading:v,name:a,onLoad:function(){return A(!0)},part:"iframe",ref:O,sandbox:_,scrolling:"no",src:m,style:_objectSpread2(_objectSpread2({},o),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var IframeEmbed=forwardRef2(IframeEmbedWithRef);IframeEmbed.displayName="IframeEmbed";var env=self.AMP_CONFIG||{},thirdPartyFrameRegex=("string"==typeof env.thirdPartyFrameRegex?new RegExp(env.thirdPartyFrameRegex):env.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,cdnProxyRegex=("string"==typeof env.cdnProxyRegex?new RegExp(env.cdnProxyRegex):env.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function getMetaUrl(e){if(!self.document||!self.document.head)return null;if(self.location&&cdnProxyRegex.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var urls={thirdParty:env.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:env.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:thirdPartyFrameRegex,cdn:env.cdnUrl||getMetaUrl("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:cdnProxyRegex,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:env.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:env.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:env.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:env.geoApiUrl||getMetaUrl("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var logs=self.__AMP_LOG;function getData(e){return e.data}var _excluded4=["captioned","onLoad","requestResize","shortcode","title"],NO_HEIGHT_STYLE=dict(),MATCHES_MESSAGING_ORIGIN=function(e){return"https://www.instagram.com"===e};function BentoInstagramWithRef(e,t){var r=e.captioned,n=e.onLoad,o=e.requestResize,a=e.shortcode,i=e.title,u=void 0===i?"Instagram":i,c=_objectWithoutPropertiesLoose(e,_excluded4),l=_slicedToArray(useState2(NO_HEIGHT_STYLE),2),s=l[0],d=l[1],f=_slicedToArray(useState2(0),2),p=f[0],_=f[1],m=useValueRef(n),b=useCallback2((function(e){var t=parseJson(getData(e));if("MEASURE"==t.type&&t.details){var r,n=t.details.height;o&&o(n),d(dict({"height":n})),_(1),null===(r=m.current)||void 0===r||r.call(m)}}),[o,m]);return createElement2(IframeEmbed,_objectSpread2({iframeStyle:{opacity:p},matchesMessagingOrigin:MATCHES_MESSAGING_ORIGIN,messageHandler:b,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(a)+"/embed/"+(r?"captioned/":"")+"?cr=1&v=12",title:u,wrapperStyle:s},c))}var BentoInstagram=forwardRef2(BentoInstagramWithRef);BentoInstagram.displayName="Instagram";
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */

@@ -254,3 +254,3 @@ var __create = Object.create;

// src/preact/component/iframe.js
var _excluded3 = ["allow", "allowFullScreen", "allowTransparency", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
var _excluded3 = ["allow", "allowFullScreen", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
function _extends3() {

@@ -292,3 +292,3 @@ _extends3 = Object.assign || function(target) {

function IframeEmbedWithRef(_ref, ref) {
var allow = _ref.allow, allowFullScreen = _ref.allowFullScreen, allowTransparency = _ref.allowTransparency, iframeStyle = _ref.iframeStyle, name = _ref.name, title = _ref.title, _ref$matchesMessaging = _ref.matchesMessagingOrigin, matchesMessagingOrigin = _ref$matchesMessaging === void 0 ? DEFAULT_MATCHES_MESSAGING_ORIGIN : _ref$matchesMessaging, messageHandler = _ref.messageHandler, _ref$ready = _ref.ready, ready = _ref$ready === void 0 ? true : _ref$ready, loadingProp = _ref.loading, onReadyState = _ref.onReadyState, sandbox = _ref.sandbox, src = _ref.src, rest = _objectWithoutPropertiesLoose3(_ref, _excluded3);
var allow = _ref.allow, allowFullScreen = _ref.allowFullScreen, iframeStyle = _ref.iframeStyle, name = _ref.name, title = _ref.title, _ref$matchesMessaging = _ref.matchesMessagingOrigin, matchesMessagingOrigin = _ref$matchesMessaging === void 0 ? DEFAULT_MATCHES_MESSAGING_ORIGIN : _ref$matchesMessaging, messageHandler = _ref.messageHandler, _ref$ready = _ref.ready, ready = _ref$ready === void 0 ? true : _ref$ready, loadingProp = _ref.loading, onReadyState = _ref.onReadyState, sandbox = _ref.sandbox, src = _ref.src, rest = _objectWithoutPropertiesLoose3(_ref, _excluded3);
var _useAmpContext = useAmpContext(), playable = _useAmpContext.playable;

@@ -359,3 +359,2 @@ var loading = useLoading(loadingProp);

allowFullScreen: allowFullScreen,
allowTransparency: allowTransparency,
frameborder: "0",

@@ -411,3 +410,3 @@ loading: loading,

// src/log.js
// src/utils/log.js
self.__AMP_LOG = self.__AMP_LOG || {

@@ -420,3 +419,3 @@ user: null,

// src/event-helper.js
// src/utils/event-helper.js
function getData(event) {

@@ -480,3 +479,2 @@ return event.data;

return createElement2(IframeEmbed, _extends4({
allowTransparency: true,
iframeStyle: {

@@ -483,0 +481,0 @@ opacity: opacity

@@ -263,3 +263,3 @@ // src/core/types/object/index.js

// src/preact/component/iframe.js
var _excluded3 = ["allow", "allowFullScreen", "allowTransparency", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
var _excluded3 = ["allow", "allowFullScreen", "iframeStyle", "name", "title", "matchesMessagingOrigin", "messageHandler", "ready", "loading", "onReadyState", "sandbox", "src"];
function _extends3() {

@@ -300,3 +300,2 @@ _extends3 = Object.assign || function(target) {

allowFullScreen,
allowTransparency,
iframeStyle,

@@ -380,3 +379,2 @@ name,

allowFullScreen,
allowTransparency,
frameborder: "0",

@@ -430,3 +428,3 @@ loading,

// src/log.js
// src/utils/log.js
self.__AMP_LOG = self.__AMP_LOG || {

@@ -439,3 +437,3 @@ user: null,

// src/event-helper.js
// src/utils/event-helper.js
function getData(event) {

@@ -503,3 +501,2 @@ return event.data;

return createElement2(IframeEmbed, _extends4({
allowTransparency: true,
iframeStyle: {

@@ -506,0 +503,0 @@ opacity

@@ -1,2 +0,2 @@

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

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